enumbler 0.9.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,96 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ enumbler (0.10.0)
5
+ activerecord (>= 5.2.3, < 8)
6
+ activesupport (>= 5.2.3, < 8)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (7.0.8.7)
12
+ activesupport (= 7.0.8.7)
13
+ activerecord (7.0.8.7)
14
+ activemodel (= 7.0.8.7)
15
+ activesupport (= 7.0.8.7)
16
+ activesupport (7.0.8.7)
17
+ concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ i18n (>= 1.6, < 2)
19
+ minitest (>= 5.1)
20
+ tzinfo (~> 2.0)
21
+ ast (2.4.3)
22
+ coderay (1.1.3)
23
+ concurrent-ruby (1.3.4)
24
+ database_cleaner (1.8.5)
25
+ database_cleaner-active_record (1.8.0)
26
+ activerecord
27
+ database_cleaner (~> 1.8.0)
28
+ diff-lcs (1.6.2)
29
+ fuubar (2.5.1)
30
+ rspec-core (~> 3.0)
31
+ ruby-progressbar (~> 1.4)
32
+ i18n (1.14.7)
33
+ concurrent-ruby (~> 1.0)
34
+ method_source (1.1.0)
35
+ minitest (5.25.5)
36
+ parallel (1.27.0)
37
+ parser (3.3.8.0)
38
+ ast (~> 2.4.1)
39
+ racc
40
+ pry (0.15.2)
41
+ coderay (~> 1.1)
42
+ method_source (~> 1.0)
43
+ racc (1.8.1)
44
+ rainbow (3.1.1)
45
+ rake (12.3.3)
46
+ regexp_parser (2.10.0)
47
+ rexml (3.4.1)
48
+ rspec (3.9.0)
49
+ rspec-core (~> 3.9.0)
50
+ rspec-expectations (~> 3.9.0)
51
+ rspec-mocks (~> 3.9.0)
52
+ rspec-core (3.9.3)
53
+ rspec-support (~> 3.9.3)
54
+ rspec-expectations (3.9.4)
55
+ diff-lcs (>= 1.2.0, < 2.0)
56
+ rspec-support (~> 3.9.0)
57
+ rspec-mocks (3.9.1)
58
+ diff-lcs (>= 1.2.0, < 2.0)
59
+ rspec-support (~> 3.9.0)
60
+ rspec-support (3.9.4)
61
+ rubocop (0.91.1)
62
+ parallel (~> 1.10)
63
+ parser (>= 2.7.1.1)
64
+ rainbow (>= 2.2.2, < 4.0)
65
+ regexp_parser (>= 1.7)
66
+ rexml
67
+ rubocop-ast (>= 0.4.0, < 1.0)
68
+ ruby-progressbar (~> 1.7)
69
+ unicode-display_width (>= 1.4.0, < 2.0)
70
+ rubocop-ast (0.8.0)
71
+ parser (>= 2.7.1.5)
72
+ ruby-progressbar (1.13.0)
73
+ sqlite3 (1.7.3-arm64-darwin)
74
+ tzinfo (2.0.6)
75
+ concurrent-ruby (~> 1.0)
76
+ unicode-display_width (1.8.0)
77
+
78
+ PLATFORMS
79
+ arm64-darwin-24
80
+
81
+ DEPENDENCIES
82
+ activemodel (= 7.0.8.7)
83
+ activerecord (= 7.0.8.7)
84
+ activesupport (= 7.0.8.7)
85
+ concurrent-ruby (= 1.3.4)
86
+ database_cleaner-active_record (~> 1.8.0)
87
+ enumbler!
88
+ fuubar (~> 2.5)
89
+ pry
90
+ rake (~> 12.0)
91
+ rspec (~> 3.9.0)
92
+ rubocop (~> 0.91.0)
93
+ sqlite3 (~> 1.6)
94
+
95
+ BUNDLED WITH
96
+ 2.4.12
data/Gemfile.rails7.1 ADDED
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activemodel", "7.1.5.1"
6
+ gem "activerecord", "7.1.5.1"
7
+ gem "activesupport", "7.1.5.1"
8
+
9
+ # The 1.3.5 version of concurrent-ruby is causing an issue with rails.
10
+ # Once that issue is resolved we can unpin this and upgrade > 1.3.5
11
+ # See: https://github.com/rails/rails/issues/54271
12
+ gem "concurrent-ruby", "1.3.4"
13
+
14
+ # Specify your gem's dependencies in enumbler.gemspec
15
+ gemspec
16
+
17
+ # Specify any additional dependencies that are not in the gemspec
18
+ # but are needed for development or testing.
19
+
20
+ group :development, :test do
21
+ gem "database_cleaner-active_record", "~> 2.0"
22
+ gem "fuubar", "~> 2.5"
23
+ gem "pry"
24
+ gem "rake", "~> 12.0"
25
+ gem "rspec", "~> 3.9.0"
26
+ gem "rubocop", "~> 0.91.0", require: false
27
+ gem "sqlite3", "~> 1.5.0"
28
+ end
@@ -0,0 +1,114 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ enumbler (0.10.0)
5
+ activerecord (>= 5.2.3, < 8)
6
+ activesupport (>= 5.2.3, < 8)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (7.1.5.1)
12
+ activesupport (= 7.1.5.1)
13
+ activerecord (7.1.5.1)
14
+ activemodel (= 7.1.5.1)
15
+ activesupport (= 7.1.5.1)
16
+ timeout (>= 0.4.0)
17
+ activesupport (7.1.5.1)
18
+ base64
19
+ benchmark (>= 0.3)
20
+ bigdecimal
21
+ concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ connection_pool (>= 2.2.5)
23
+ drb
24
+ i18n (>= 1.6, < 2)
25
+ logger (>= 1.4.2)
26
+ minitest (>= 5.1)
27
+ mutex_m
28
+ securerandom (>= 0.3)
29
+ tzinfo (~> 2.0)
30
+ ast (2.4.3)
31
+ base64 (0.2.0)
32
+ benchmark (0.4.0)
33
+ bigdecimal (3.1.9)
34
+ coderay (1.1.3)
35
+ concurrent-ruby (1.3.4)
36
+ connection_pool (2.5.3)
37
+ database_cleaner-active_record (2.2.1)
38
+ activerecord (>= 5.a)
39
+ database_cleaner-core (~> 2.0.0)
40
+ database_cleaner-core (2.0.1)
41
+ diff-lcs (1.6.2)
42
+ drb (2.2.3)
43
+ fuubar (2.5.1)
44
+ rspec-core (~> 3.0)
45
+ ruby-progressbar (~> 1.4)
46
+ i18n (1.14.7)
47
+ concurrent-ruby (~> 1.0)
48
+ logger (1.7.0)
49
+ method_source (1.1.0)
50
+ minitest (5.25.5)
51
+ mutex_m (0.3.0)
52
+ parallel (1.27.0)
53
+ parser (3.3.8.0)
54
+ ast (~> 2.4.1)
55
+ racc
56
+ pry (0.15.2)
57
+ coderay (~> 1.1)
58
+ method_source (~> 1.0)
59
+ racc (1.8.1)
60
+ rainbow (3.1.1)
61
+ rake (12.3.3)
62
+ regexp_parser (2.10.0)
63
+ rexml (3.4.1)
64
+ rspec (3.9.0)
65
+ rspec-core (~> 3.9.0)
66
+ rspec-expectations (~> 3.9.0)
67
+ rspec-mocks (~> 3.9.0)
68
+ rspec-core (3.9.3)
69
+ rspec-support (~> 3.9.3)
70
+ rspec-expectations (3.9.4)
71
+ diff-lcs (>= 1.2.0, < 2.0)
72
+ rspec-support (~> 3.9.0)
73
+ rspec-mocks (3.9.1)
74
+ diff-lcs (>= 1.2.0, < 2.0)
75
+ rspec-support (~> 3.9.0)
76
+ rspec-support (3.9.4)
77
+ rubocop (0.91.1)
78
+ parallel (~> 1.10)
79
+ parser (>= 2.7.1.1)
80
+ rainbow (>= 2.2.2, < 4.0)
81
+ regexp_parser (>= 1.7)
82
+ rexml
83
+ rubocop-ast (>= 0.4.0, < 1.0)
84
+ ruby-progressbar (~> 1.7)
85
+ unicode-display_width (>= 1.4.0, < 2.0)
86
+ rubocop-ast (0.8.0)
87
+ parser (>= 2.7.1.5)
88
+ ruby-progressbar (1.13.0)
89
+ securerandom (0.4.1)
90
+ sqlite3 (1.5.4-arm64-darwin)
91
+ timeout (0.4.3)
92
+ tzinfo (2.0.6)
93
+ concurrent-ruby (~> 1.0)
94
+ unicode-display_width (1.8.0)
95
+
96
+ PLATFORMS
97
+ arm64-darwin-24
98
+
99
+ DEPENDENCIES
100
+ activemodel (= 7.1.5.1)
101
+ activerecord (= 7.1.5.1)
102
+ activesupport (= 7.1.5.1)
103
+ concurrent-ruby (= 1.3.4)
104
+ database_cleaner-active_record (~> 2.0)
105
+ enumbler!
106
+ fuubar (~> 2.5)
107
+ pry
108
+ rake (~> 12.0)
109
+ rspec (~> 3.9.0)
110
+ rubocop (~> 0.91.0)
111
+ sqlite3 (~> 1.5.0)
112
+
113
+ BUNDLED WITH
114
+ 2.4.12
data/Gemfile.rails7.2 ADDED
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activemodel", "<= 8"
6
+ gem "activerecord", "<= 8"
7
+ gem "activesupport", "<= 8"
8
+
9
+ # The 1.3.5 version of concurrent-ruby is causing an issue with rails.
10
+ # Once that issue is resolved we can unpin this and upgrade > 1.3.5
11
+ # See: https://github.com/rails/rails/issues/54271
12
+ gem "concurrent-ruby", "1.3.4"
13
+
14
+ # Specify your gem's dependencies in enumbler.gemspec
15
+ gemspec
16
+
17
+ # Specify any additional dependencies that are not in the gemspec
18
+ # but are needed for development or testing.
19
+
20
+ group :development, :test do
21
+ gem "database_cleaner-active_record", "~> 2.0"
22
+ gem "fuubar", "~> 2.5"
23
+ gem "pry"
24
+ gem "rake", "~> 12.0"
25
+ gem "rspec", "~> 3.9.0"
26
+ gem "rubocop", "~> 0.91.0", require: false
27
+ gem "sqlite3", "~> 1.5.0"
28
+ end
@@ -0,0 +1,112 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ enumbler (0.10.0)
5
+ activerecord (>= 5.2.3, < 8)
6
+ activesupport (>= 5.2.3, < 8)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (7.2.2.1)
12
+ activesupport (= 7.2.2.1)
13
+ activerecord (7.2.2.1)
14
+ activemodel (= 7.2.2.1)
15
+ activesupport (= 7.2.2.1)
16
+ timeout (>= 0.4.0)
17
+ activesupport (7.2.2.1)
18
+ base64
19
+ benchmark (>= 0.3)
20
+ bigdecimal
21
+ concurrent-ruby (~> 1.0, >= 1.3.1)
22
+ connection_pool (>= 2.2.5)
23
+ drb
24
+ i18n (>= 1.6, < 2)
25
+ logger (>= 1.4.2)
26
+ minitest (>= 5.1)
27
+ securerandom (>= 0.3)
28
+ tzinfo (~> 2.0, >= 2.0.5)
29
+ ast (2.4.3)
30
+ base64 (0.2.0)
31
+ benchmark (0.4.0)
32
+ bigdecimal (3.1.9)
33
+ coderay (1.1.3)
34
+ concurrent-ruby (1.3.4)
35
+ connection_pool (2.5.3)
36
+ database_cleaner-active_record (2.2.1)
37
+ activerecord (>= 5.a)
38
+ database_cleaner-core (~> 2.0.0)
39
+ database_cleaner-core (2.0.1)
40
+ diff-lcs (1.6.2)
41
+ drb (2.2.3)
42
+ fuubar (2.5.1)
43
+ rspec-core (~> 3.0)
44
+ ruby-progressbar (~> 1.4)
45
+ i18n (1.14.7)
46
+ concurrent-ruby (~> 1.0)
47
+ logger (1.7.0)
48
+ method_source (1.1.0)
49
+ minitest (5.25.5)
50
+ parallel (1.27.0)
51
+ parser (3.3.8.0)
52
+ ast (~> 2.4.1)
53
+ racc
54
+ pry (0.15.2)
55
+ coderay (~> 1.1)
56
+ method_source (~> 1.0)
57
+ racc (1.8.1)
58
+ rainbow (3.1.1)
59
+ rake (12.3.3)
60
+ regexp_parser (2.10.0)
61
+ rexml (3.4.1)
62
+ rspec (3.9.0)
63
+ rspec-core (~> 3.9.0)
64
+ rspec-expectations (~> 3.9.0)
65
+ rspec-mocks (~> 3.9.0)
66
+ rspec-core (3.9.3)
67
+ rspec-support (~> 3.9.3)
68
+ rspec-expectations (3.9.4)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.9.0)
71
+ rspec-mocks (3.9.1)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.9.0)
74
+ rspec-support (3.9.4)
75
+ rubocop (0.91.1)
76
+ parallel (~> 1.10)
77
+ parser (>= 2.7.1.1)
78
+ rainbow (>= 2.2.2, < 4.0)
79
+ regexp_parser (>= 1.7)
80
+ rexml
81
+ rubocop-ast (>= 0.4.0, < 1.0)
82
+ ruby-progressbar (~> 1.7)
83
+ unicode-display_width (>= 1.4.0, < 2.0)
84
+ rubocop-ast (0.8.0)
85
+ parser (>= 2.7.1.5)
86
+ ruby-progressbar (1.13.0)
87
+ securerandom (0.4.1)
88
+ sqlite3 (1.5.4-arm64-darwin)
89
+ timeout (0.4.3)
90
+ tzinfo (2.0.6)
91
+ concurrent-ruby (~> 1.0)
92
+ unicode-display_width (1.8.0)
93
+
94
+ PLATFORMS
95
+ arm64-darwin-24
96
+
97
+ DEPENDENCIES
98
+ activemodel (<= 8)
99
+ activerecord (<= 8)
100
+ activesupport (<= 8)
101
+ concurrent-ruby (= 1.3.4)
102
+ database_cleaner-active_record (~> 2.0)
103
+ enumbler!
104
+ fuubar (~> 2.5)
105
+ pry
106
+ rake (~> 12.0)
107
+ rspec (~> 3.9.0)
108
+ rubocop (~> 0.91.0)
109
+ sqlite3 (~> 1.5.0)
110
+
111
+ BUNDLED WITH
112
+ 2.4.12
data/Gemfile.rails8.0 ADDED
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activemodel", ">= 8"
6
+ gem "activerecord", ">= 8"
7
+ gem "activesupport", ">= 8"
8
+
9
+ # The 1.3.5 version of concurrent-ruby is causing an issue with rails.
10
+ # Once that issue is resolved we can unpin this and upgrade > 1.3.5
11
+ # See: https://github.com/rails/rails/issues/54271
12
+ gem "concurrent-ruby", "1.3.4"
13
+
14
+ # Specify your gem's dependencies in enumbler.gemspec
15
+ gemspec
16
+
17
+ # Specify any additional dependencies that are not in the gemspec
18
+ # but are needed for development or testing.
19
+
20
+ group :development, :test do
21
+ gem "database_cleaner-active_record", "~> 2.0"
22
+ gem "fuubar", "~> 2.5"
23
+ gem "pry"
24
+ gem "rake", "~> 13.0"
25
+ gem "rspec", "~> 3.9"
26
+ gem "rubocop", "~> 0.91.0", require: false
27
+ gem "sqlite3", ">= 2.1"
28
+ end
@@ -0,0 +1,112 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ enumbler (0.10.0)
5
+ activerecord (>= 6.0, < 9)
6
+ activesupport (>= 6.0, < 9)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (8.0.2)
12
+ activesupport (= 8.0.2)
13
+ activerecord (8.0.2)
14
+ activemodel (= 8.0.2)
15
+ activesupport (= 8.0.2)
16
+ timeout (>= 0.4.0)
17
+ activesupport (8.0.2)
18
+ base64
19
+ benchmark (>= 0.3)
20
+ bigdecimal
21
+ concurrent-ruby (~> 1.0, >= 1.3.1)
22
+ connection_pool (>= 2.2.5)
23
+ drb
24
+ i18n (>= 1.6, < 2)
25
+ logger (>= 1.4.2)
26
+ minitest (>= 5.1)
27
+ securerandom (>= 0.3)
28
+ tzinfo (~> 2.0, >= 2.0.5)
29
+ uri (>= 0.13.1)
30
+ ast (2.4.1)
31
+ base64 (0.2.0)
32
+ benchmark (0.4.0)
33
+ bigdecimal (3.1.9)
34
+ coderay (1.1.2)
35
+ concurrent-ruby (1.3.4)
36
+ connection_pool (2.5.3)
37
+ database_cleaner-active_record (2.2.1)
38
+ activerecord (>= 5.a)
39
+ database_cleaner-core (~> 2.0.0)
40
+ database_cleaner-core (2.0.1)
41
+ diff-lcs (1.6.2)
42
+ drb (2.2.3)
43
+ fuubar (2.5.0)
44
+ rspec-core (~> 3.0)
45
+ ruby-progressbar (~> 1.4)
46
+ i18n (1.14.7)
47
+ concurrent-ruby (~> 1.0)
48
+ logger (1.7.0)
49
+ method_source (1.0.0)
50
+ minitest (5.25.5)
51
+ parallel (1.19.1)
52
+ parser (2.7.1.4)
53
+ ast (~> 2.4.1)
54
+ pry (0.13.1)
55
+ coderay (~> 1.1)
56
+ method_source (~> 1.0)
57
+ rainbow (3.0.0)
58
+ rake (13.2.1)
59
+ regexp_parser (1.7.1)
60
+ rexml (3.4.0)
61
+ rspec (3.13.1)
62
+ rspec-core (~> 3.13.0)
63
+ rspec-expectations (~> 3.13.0)
64
+ rspec-mocks (~> 3.13.0)
65
+ rspec-core (3.13.4)
66
+ rspec-support (~> 3.13.0)
67
+ rspec-expectations (3.13.5)
68
+ diff-lcs (>= 1.2.0, < 2.0)
69
+ rspec-support (~> 3.13.0)
70
+ rspec-mocks (3.13.5)
71
+ diff-lcs (>= 1.2.0, < 2.0)
72
+ rspec-support (~> 3.13.0)
73
+ rspec-support (3.13.4)
74
+ rubocop (0.91.0)
75
+ parallel (~> 1.10)
76
+ parser (>= 2.7.1.1)
77
+ rainbow (>= 2.2.2, < 4.0)
78
+ regexp_parser (>= 1.7)
79
+ rexml
80
+ rubocop-ast (>= 0.4.0, < 1.0)
81
+ ruby-progressbar (~> 1.7)
82
+ unicode-display_width (>= 1.4.0, < 2.0)
83
+ rubocop-ast (0.4.0)
84
+ parser (>= 2.7.1.4)
85
+ ruby-progressbar (1.10.1)
86
+ securerandom (0.4.1)
87
+ sqlite3 (2.6.0-arm64-darwin)
88
+ timeout (0.4.3)
89
+ tzinfo (2.0.6)
90
+ concurrent-ruby (~> 1.0)
91
+ unicode-display_width (1.7.0)
92
+ uri (1.0.3)
93
+
94
+ PLATFORMS
95
+ arm64-darwin
96
+
97
+ DEPENDENCIES
98
+ activemodel (>= 8)
99
+ activerecord (>= 8)
100
+ activesupport (>= 8)
101
+ concurrent-ruby (= 1.3.4)
102
+ database_cleaner-active_record (~> 2.0)
103
+ enumbler!
104
+ fuubar (~> 2.5)
105
+ pry
106
+ rake (~> 13.0)
107
+ rspec (~> 3.9)
108
+ rubocop (~> 0.91.0)
109
+ sqlite3 (>= 2.1)
110
+
111
+ BUNDLED WITH
112
+ 2.6.7
data/README.md CHANGED
@@ -24,12 +24,12 @@ Suppose you have a `House` and you want to add some `colors` to the house. You
24
24
 
25
25
  ```ruby
26
26
  ActiveRecord::Schema.define do
27
- create_table :colors|t|
27
+ create_table :colors do |t|
28
28
  t.string :label, null: false, index: { unique: true }
29
29
  t.string :hex, null: true
30
30
  end
31
31
 
32
- create_table :houses|t|
32
+ create_table :houses do |t|
33
33
  t.references :color, foreign_key: true, null: false
34
34
  end
35
35
  end
@@ -80,7 +80,7 @@ Color.find_enumble(:black) # => Enumbler::Enumble<:black>
80
80
  Color.find_enumble('Dark_Brown') # => Enumbler::Enumble<:dark-brown>
81
81
 
82
82
  # raises errors if none found
83
- Color.find_enumbles!!(:black, 'does-no-exist') # => raises Enumbler::Error
83
+ Color.find_enumbles!(:black, 'does-no-exist') # => raises Enumbler::Error
84
84
  Color.find_enumble!(:does_not_exist) # => raises Enumbler::Error
85
85
 
86
86
  # Get ids flexibly, without raising an error if none found
@@ -168,6 +168,15 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
168
168
 
169
169
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
170
170
 
171
+ ### Matrix testing
172
+
173
+ This gem supporst different versions of Ruby and Rails. To test against all supported versions, run:
174
+
175
+ ```bash
176
+ BUNDLE_GEMFILE=Gemfile.rails7.2 bundle install
177
+ BUNDLE_GEMFILE=Gemfile.rails7.2 bundle exec rspec
178
+ ```
179
+
171
180
  ## Roadmap
172
181
 
173
182
  * Ideally, we could make this work more like a traditional `enum`; for example, overriding the `.where` method by allowing something like: `House.where(color: :blue)` instead of `House.color(:blue)`. But right now am in a rush and not sure how to go about doing that properly.
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+
2
3
  # frozen_string_literal: true
3
4
 
4
5
  # Put this file into your path and use `<file> install` to add a new hook
@@ -29,6 +30,14 @@ end
29
30
  else
30
31
  " --parallel"
31
32
  end)
32
- result = `bundle exec rubocop #{parallel} --color --force-exclusion #{changed.shelljoin}`
33
- puts result unless $CHILD_STATUS.success?
34
- exit $CHILD_STATUS.exitstatus
33
+
34
+ # grab the Process::Status from $?
35
+ status = $?
36
+
37
+ unless status.success?
38
+ puts result
39
+ exit status.exitstatus
40
+ end
41
+
42
+ # if we got here, rubocop passed
43
+ exit 0
data/enumbler.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "A more complete description is forthcoming."
13
13
  spec.homepage = "https://github.com/linguabee/enumbler"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.1")
16
16
 
17
17
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
18
 
@@ -29,14 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_dependency "activerecord", [">= 5.2.3", "< 7"]
33
- spec.add_dependency "activesupport", [">= 5.2.3", "< 7"]
34
-
35
- spec.add_development_dependency "database_cleaner-active_record", "~> 1.8.0"
36
- spec.add_development_dependency "fuubar", "~> 2.5"
37
- spec.add_development_dependency "pry"
38
- spec.add_development_dependency "rake", "~> 12.0"
39
- spec.add_development_dependency "rspec", "~> 3.9.0"
40
- spec.add_development_dependency "rubocop", "~> 0.91.0"
41
- spec.add_development_dependency "sqlite3", "~> 1.4.0"
32
+ spec.add_dependency "activerecord", [">= 6.0", "< 9"]
33
+ spec.add_dependency "activesupport", [">= 6.0", "< 9"]
34
+ spec.metadata["rubygems_mfa_required"] = "true"
42
35
  end
@@ -9,14 +9,14 @@ module Enumbler
9
9
  # Color.enumbles.black # => [Enumbler::Enumble]
10
10
  # ```
11
11
  class Collection < Array
12
- def method_missing(method_name, *args, &block)
12
+ def method_missing(method_name, *args, &)
13
13
  enumble = find { |e| e.enum == method_name }
14
14
  return enumble if enumble.present?
15
15
 
16
16
  super
17
17
  end
18
18
 
19
- def respond_to_missing?(method_name, *args, &block)
19
+ def respond_to_missing?(method_name, *args, &)
20
20
  enumble = find { |e| e.enum == method_name }
21
21
  enumble.present? || super
22
22
  end
@@ -11,8 +11,8 @@
11
11
  class Symbol
12
12
  def ===(other)
13
13
  super ||
14
- other.class.included_modules.include?(Enumbler::Enabler) &&
15
- other.enumble.enum == self
14
+ (other.class.included_modules.include?(Enumbler::Enabler) &&
15
+ other.enumble.enum == self)
16
16
 
17
17
  # Calling #enumble on a new instance that has not been defined raises an
18
18
  # error, so catching that edge case here