Skip to content

Commit efd6153

Browse files
committed
Drop Ruby 3.0 and Rails 6.1
1 parent f6a4de8 commit efd6153

File tree

7 files changed

+38
-39
lines changed

7 files changed

+38
-39
lines changed

.github/workflows/ruby.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
ruby-version: ['3.0', '3.1', '3.2', '3.3']
35+
ruby-version: ['3.1', '3.2', '3.3']
3636
test: ['minitest', 'rspec']
3737
gemfile:
38-
- Gemfile.rails61
3938
- Gemfile.rails70
4039
- Gemfile.rails71
40+
- Gemfile.rails80
4141
- Gemfile.railsmaster
4242
- Gemfile.mongo_mapper
4343
db:
@@ -47,11 +47,9 @@ jobs:
4747
exclude:
4848
- gemfile: Gemfile.mongo_mapper
4949
db: postgresql
50-
- ruby-version: '3.0'
51-
gemfile: Gemfile.mongo_mapper
5250
- ruby-version: '3.1'
5351
gemfile: Gemfile.mongo_mapper
54-
- ruby-version: '3.0'
52+
- ruby-version: '3.1'
5553
gemfile: Gemfile.railsmaster
5654
env:
5755
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## master
2+
3+
### bug fix
4+
5+
### enchancements
6+
7+
* Support only Ruby 3.1+ and Rails 7.0+. (by [@nashby](https://github.com/nashby))
8+
19
## 2.8.1 (March 25, 2024)
210

311
### bug fix

Gemfile.rails61

-9
This file was deleted.

Gemfile.rails80

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
eval_gemfile('Gemfile.global')
2+
3+
gem 'minitest', '~> 5.8'
4+
gem 'rails', github: 'rails/rails', branch: '8-0-stable', require: false
5+
6+
gem 'mongoid', github: 'mongodb/mongoid'
7+
8+
gem 'sqlite3', platforms: [:ruby, :mswin, :mingw]

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Or install it yourself as:
4646

4747
## Supported Versions
4848

49-
- Ruby 3.0+
50-
- Rails 6.1+
49+
- Ruby 3.1+
50+
- Rails 7.0+
5151

5252
## Usage
5353

lib/enumerize/activerecord.rb

-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ def enumerize(name, options={})
3131
attribute(name) do |subtype|
3232
Type.new(enumerized_attributes[name], subtype)
3333
end
34-
elsif ::ActiveRecord.version >= ::Gem::Version.new("6.1.0.alpha")
35-
decorate_attribute_type(name.to_s) do |subtype|
36-
Type.new(enumerized_attributes[name], subtype)
37-
end
3834
else
3935
decorate_attribute_type(name, :enumerize) do |subtype|
4036
Type.new(enumerized_attributes[name], subtype)

test/activerecord_test.rb

+17-19
Original file line numberDiff line numberDiff line change
@@ -731,29 +731,27 @@ class AdminUser < User
731731
expect(admin.account_type).must_equal 'pro'
732732
end
733733

734-
if Rails::VERSION::MAJOR >= 6
735-
it 'supports AR#insert_all' do
736-
User.delete_all
734+
it 'supports AR#insert_all' do
735+
User.delete_all
737736

738-
User.insert_all([{ sex: :male }])
739-
User.insert_all([{ status: :active }])
740-
User.insert_all([{ interests: [:music, :sports] }])
737+
User.insert_all([{ sex: :male }])
738+
User.insert_all([{ status: :active }])
739+
User.insert_all([{ interests: [:music, :sports] }])
741740

742-
expect(User.exists?(sex: :male)).must_equal true
743-
expect(User.exists?(status: :active)).must_equal true
744-
expect(User.exists?(interests: [:music, :sports])).must_equal true
745-
end
741+
expect(User.exists?(sex: :male)).must_equal true
742+
expect(User.exists?(status: :active)).must_equal true
743+
expect(User.exists?(interests: [:music, :sports])).must_equal true
744+
end
746745

747-
it 'supports AR#upsert_all' do
748-
User.delete_all
746+
it 'supports AR#upsert_all' do
747+
User.delete_all
749748

750-
User.upsert_all([{ sex: :male }])
751-
User.upsert_all([{ status: :active }])
752-
User.upsert_all([{ interests: [:music, :sports] }])
749+
User.upsert_all([{ sex: :male }])
750+
User.upsert_all([{ status: :active }])
751+
User.upsert_all([{ interests: [:music, :sports] }])
753752

754-
expect(User.exists?(sex: :male)).must_equal true
755-
expect(User.exists?(status: :active)).must_equal true
756-
expect(User.exists?(interests: [:music, :sports])).must_equal true
757-
end
753+
expect(User.exists?(sex: :male)).must_equal true
754+
expect(User.exists?(status: :active)).must_equal true
755+
expect(User.exists?(interests: [:music, :sports])).must_equal true
758756
end
759757
end

0 commit comments

Comments
 (0)