Skip to content

Commit

Permalink
Remove EOL Rails versions
Browse files Browse the repository at this point in the history
  • Loading branch information
alpaca-tc committed Aug 13, 2024
1 parent d39e94a commit 5914309
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 70 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: ['6.0_stable', '6.1_stable', '7.0_stable', '7.1_stable']
gemfile: ['6.1_stable', '7.0_stable', '7.1_stable']
ruby-version: ['3.1', '3.2']
exclude:
- ruby-version: '3.2'
gemfile: '6.0_stable'
- ruby-version: '3.1'
gemfile: '6.0_stable'
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
Expand Down
4 changes: 0 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# frozen_string_literal: true

appraise '6.0-stable' do
gem 'activerecord', '~> 6.0.0'
end

appraise '6.1-stable' do
gem 'activerecord', '~> 6.1.0'
end
Expand Down
2 changes: 1 addition & 1 deletion active_record_bitmask.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
end
spec.require_paths = ['lib']

spec.add_dependency 'activerecord', '>= 6.0'
spec.add_dependency 'activerecord', '>= 6.1'
end
13 changes: 0 additions & 13 deletions gemfiles/5.0_stable.gemfile

This file was deleted.

13 changes: 0 additions & 13 deletions gemfiles/5.1_stable.gemfile

This file was deleted.

13 changes: 0 additions & 13 deletions gemfiles/5.2_stable.gemfile

This file was deleted.

13 changes: 0 additions & 13 deletions gemfiles/6.0_stable.gemfile

This file was deleted.

9 changes: 2 additions & 7 deletions lib/active_record_bitmask/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,16 @@ def bitmask_for(attribute)
private

def define_bitmask_attribute(attribute, map)
if ActiveRecord.gem_version >= Gem::Version.new('7.0.0.alpha1')
if ActiveRecord.gem_version >= Gem::Version.new('7.0.0')
# Greater than or equal to 7.0.0
attribute(attribute) do |subtype|
ActiveRecordBitmask::BitmaskType.new(attribute, map, subtype)
end
elsif ActiveRecord.gem_version >= Gem::Version.new('6.1.0')
else
# Equal to 6.1.0
decorate_attribute_type(attribute) do |subtype|
ActiveRecordBitmask::BitmaskType.new(attribute, map, subtype)
end
else
# Less than 6.1.0
decorate_attribute_type(attribute, :bitmask) do |subtype|
ActiveRecordBitmask::BitmaskType.new(attribute, map, subtype)
end
end
end

Expand Down

0 comments on commit 5914309

Please sign in to comment.