Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove eol #28

Merged
merged 6 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
ruby-version: ['3.1', '3.2']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -30,25 +30,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: ['6.0_stable', '6.1_stable', '7.0_stable', '7.1_stable']
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
exclude:
- ruby-version: '3.2'
gemfile: '6.0_stable'
- ruby-version: '3.1'
gemfile: '6.0_stable'
- ruby-version: '2.5'
gemfile: '7.0_stable'
- ruby-version: '2.6'
gemfile: '7.0_stable'
- ruby-version: '2.5'
gemfile: '7.1_stable'
- ruby-version: '2.6'
gemfile: '7.1_stable'
gemfile: ['6.1_stable', '7.0_stable', '7.1_stable']
ruby-version: ['3.1', '3.2', '3.3']
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AllCops:
- 'vendor/**/*'
- 'gemfiles/**/*'
- Gemfile
TargetRubyVersion: 2.5
TargetRubyVersion: 3.1
DisplayCopNames: true

Bundler:
Expand Down
7 changes: 3 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# 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'
gem 'sqlite3', '~> 1.7.0'
end

appraise '7.0-stable' do
gem 'activerecord', '~> 7.0.0'
gem 'sqlite3', '~> 1.7.0'
end

appraise '7.1-stable' do
gem 'activerecord', '~> 7.1.0'
gem 'sqlite3', '~> 1.7.0'
end
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Next Version

* **Breaking Changes** Rails 6.0 is no longer supported. #28

## 1.0.0

* **Breaking Changes** Rails 5.0, 5.1 and 5.2 are no longer supported. #23
Expand Down
4 changes: 2 additions & 2 deletions active_record_bitmask.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.summary = 'Simple bitmask attribute support for ActiveRecord'
spec.homepage = 'https://github.com/alpaca-tc/active_record_bitmask'

spec.required_ruby_version = '>= 2.5.0'
spec.required_ruby_version = '>= 3.1.0'

spec.metadata = {
'homepage_uri' => 'https://github.com/alpaca-tc/active_record_bitmask',
Expand All @@ -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.

2 changes: 1 addition & 1 deletion gemfiles/6.1_stable.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "rubocop", "1.28.2"
gem "appraisal"
gem "rake"
gem "rspec"
gem "sqlite3"
gem "sqlite3", "~> 1.7.0"
gem "activerecord", "~> 6.1.0"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/7.0_stable.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "rubocop", "1.28.2"
gem "appraisal"
gem "rake"
gem "rspec"
gem "sqlite3"
gem "sqlite3", "~> 1.7.0"
gem "activerecord", "~> 7.0.0"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/7.1_stable.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "rubocop", "1.28.2"
gem "appraisal"
gem "rake"
gem "rspec"
gem "sqlite3"
gem "sqlite3", "~> 1.7.0"
gem "activerecord", "~> 7.1.0"

gemspec path: "../"
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
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
end
end

Dir['./spec/support/**/*.rb'].sort.each { |f| require f }
Dir['./spec/support/**/*.rb'].each { |f| require f }
Loading