enum_machine 2.1.0 → 2.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a93f18555b77dbf6370ff79f6e8a541a60f0b65e70a97673dca07c87ab6a83e8
4
- data.tar.gz: 4bcf47330cc5492f55fe119d04a814caadfeb47becceb4e5bb9f408976255842
3
+ metadata.gz: 22866d6d5f37dd78718e7e5eb27dd0066450d8730b821ffb13977888009b6ddd
4
+ data.tar.gz: fc4c40aa5ea99a6d14143ebec78d2a40b2c8bce58d21ff5507b4d3d2ee67bcf1
5
5
  SHA512:
6
- metadata.gz: 4cf9904e3c40b0a864ff4fde87a6e0b5c841b92c3279890ee15d18cf7191361f96a96dcf4ba67892b2f541f30072b8c677d8098b77965bb030f07a585ee46193
7
- data.tar.gz: c93349f003295b86b1414765d2e844d3d7025c9d6b64da3e5a023eb86765bd627dc47a8c18a0d7ed7e636b9821ac596aee5c3e4d508c676fcdb2b79f406f3f46
6
+ metadata.gz: 247ea0d77022905062d7688dd1153037517fa71521c15f51477f66e4f8d368cf008262c0095a1465b068b24da3262ed01334f787504dce9a65265839bffa2726
7
+ data.tar.gz: 969db73142c57fcf94f82fa6c1eca59c79310a6c6e0399961fbee835c5da8596802039d699657f306f07ac0f0e64ba5692cb4d3dee0f3d02359313cd61b07bc5
data/Gemfile CHANGED
@@ -10,4 +10,4 @@ gem "pry", "~> 0.12"
10
10
  gem "rake", "~> 13.0"
11
11
  gem "rspec", "~> 3.9"
12
12
  gem "rubocop-gp", github: "corp-gp/rubocop-gp"
13
- gem "sqlite3", "~> 1.4"
13
+ gem "sqlite3"
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
 
9
9
  GIT
10
10
  remote: https://github.com/corp-gp/rubocop-gp.git
11
- revision: 867f7e1351c3730897cacdc20ce2d727604de245
11
+ revision: e3d33016bb3b9945ce9d8d22e77825a223de1a5c
12
12
  specs:
13
13
  rubocop-gp (0.0.4)
14
14
  rubocop
@@ -22,7 +22,7 @@ GIT
22
22
  PATH
23
23
  remote: .
24
24
  specs:
25
- enum_machine (2.0.1)
25
+ enum_machine (2.2.0)
26
26
  activemodel
27
27
  activerecord
28
28
  activesupport
@@ -30,125 +30,146 @@ PATH
30
30
  GEM
31
31
  remote: https://rubygems.org/
32
32
  specs:
33
- activemodel (7.2.1)
34
- activesupport (= 7.2.1)
35
- activerecord (7.2.1)
36
- activemodel (= 7.2.1)
37
- activesupport (= 7.2.1)
33
+ activemodel (8.1.2)
34
+ activesupport (= 8.1.2)
35
+ activerecord (8.1.2)
36
+ activemodel (= 8.1.2)
37
+ activesupport (= 8.1.2)
38
38
  timeout (>= 0.4.0)
39
- activesupport (7.2.1)
39
+ activesupport (8.1.2)
40
40
  base64
41
41
  bigdecimal
42
42
  concurrent-ruby (~> 1.0, >= 1.3.1)
43
43
  connection_pool (>= 2.2.5)
44
44
  drb
45
45
  i18n (>= 1.6, < 2)
46
+ json
46
47
  logger (>= 1.4.2)
47
48
  minitest (>= 5.1)
48
49
  securerandom (>= 0.3)
49
50
  tzinfo (~> 2.0, >= 2.0.5)
50
- ast (2.4.2)
51
- base64 (0.2.0)
52
- bigdecimal (3.1.8)
51
+ uri (>= 0.13.1)
52
+ ast (2.4.3)
53
+ base64 (0.3.0)
54
+ bigdecimal (4.0.1)
53
55
  coderay (1.1.3)
54
56
  colorize (0.8.1)
55
- concurrent-ruby (1.3.4)
56
- connection_pool (2.4.1)
57
- diff-lcs (1.5.1)
58
- drb (2.2.1)
59
- dry-core (1.0.1)
57
+ concurrent-ruby (1.3.6)
58
+ connection_pool (3.0.2)
59
+ diff-lcs (1.6.2)
60
+ drb (2.2.3)
61
+ dry-core (1.2.0)
60
62
  concurrent-ruby (~> 1.0)
63
+ logger
61
64
  zeitwerk (~> 2.6)
62
- dry-inflector (1.1.0)
63
- dry-logic (1.5.0)
65
+ dry-inflector (1.3.0)
66
+ dry-logic (1.6.0)
67
+ bigdecimal
64
68
  concurrent-ruby (~> 1.0)
65
- dry-core (~> 1.0, < 2)
69
+ dry-core (~> 1.1)
66
70
  zeitwerk (~> 2.6)
67
- dry-types (1.7.2)
68
- bigdecimal (~> 3.0)
71
+ dry-types (1.9.0)
72
+ bigdecimal (>= 3.0)
69
73
  concurrent-ruby (~> 1.0)
70
74
  dry-core (~> 1.0)
71
75
  dry-inflector (~> 1.0)
72
76
  dry-logic (~> 1.4)
73
77
  zeitwerk (~> 2.6)
74
- i18n (1.14.6)
78
+ i18n (1.14.8)
75
79
  concurrent-ruby (~> 1.0)
76
- json (2.9.0)
77
- language_server-protocol (3.17.0.3)
78
- logger (1.6.1)
80
+ io-console (0.8.2)
81
+ json (2.18.0)
82
+ language_server-protocol (3.17.0.5)
83
+ lint_roller (1.1.0)
84
+ logger (1.7.0)
79
85
  method_source (1.1.0)
80
- minitest (5.25.2)
81
- parallel (1.26.3)
82
- parser (3.3.6.0)
86
+ minitest (6.0.1)
87
+ prism (~> 1.5)
88
+ parallel (1.27.0)
89
+ parser (3.3.10.0)
83
90
  ast (~> 2.4.1)
84
91
  racc
85
- pry (0.14.2)
92
+ prism (1.7.0)
93
+ pry (0.16.0)
86
94
  coderay (~> 1.1)
87
95
  method_source (~> 1.0)
96
+ reline (>= 0.6.0)
88
97
  racc (1.8.1)
89
- rack (3.1.8)
98
+ rack (3.2.4)
90
99
  rainbow (3.1.1)
91
- rake (13.2.1)
92
- regexp_parser (2.9.3)
93
- rspec (3.13.0)
100
+ rake (13.3.1)
101
+ regexp_parser (2.11.3)
102
+ reline (0.6.3)
103
+ io-console (~> 0.5)
104
+ rspec (3.13.2)
94
105
  rspec-core (~> 3.13.0)
95
106
  rspec-expectations (~> 3.13.0)
96
107
  rspec-mocks (~> 3.13.0)
97
- rspec-core (3.13.1)
108
+ rspec-core (3.13.6)
98
109
  rspec-support (~> 3.13.0)
99
- rspec-expectations (3.13.3)
110
+ rspec-expectations (3.13.5)
100
111
  diff-lcs (>= 1.2.0, < 2.0)
101
112
  rspec-support (~> 3.13.0)
102
- rspec-mocks (3.13.1)
113
+ rspec-mocks (3.13.7)
103
114
  diff-lcs (>= 1.2.0, < 2.0)
104
115
  rspec-support (~> 3.13.0)
105
- rspec-support (3.13.1)
106
- rubocop (1.69.2)
116
+ rspec-support (3.13.6)
117
+ rubocop (1.82.1)
107
118
  json (~> 2.3)
108
- language_server-protocol (>= 3.17.0)
119
+ language_server-protocol (~> 3.17.0.2)
120
+ lint_roller (~> 1.1.0)
109
121
  parallel (~> 1.10)
110
122
  parser (>= 3.3.0.2)
111
123
  rainbow (>= 2.2.2, < 4.0)
112
124
  regexp_parser (>= 2.9.3, < 3.0)
113
- rubocop-ast (>= 1.36.2, < 2.0)
125
+ rubocop-ast (>= 1.48.0, < 2.0)
114
126
  ruby-progressbar (~> 1.7)
115
127
  unicode-display_width (>= 2.4.0, < 4.0)
116
- rubocop-ast (1.37.0)
117
- parser (>= 3.3.1.0)
118
- rubocop-capybara (2.21.0)
119
- rubocop (~> 1.41)
120
- rubocop-factory_bot (2.26.1)
121
- rubocop (~> 1.61)
122
- rubocop-performance (1.23.0)
123
- rubocop (>= 1.48.1, < 2.0)
124
- rubocop-ast (>= 1.31.1, < 2.0)
125
- rubocop-rails (2.27.0)
128
+ rubocop-ast (1.49.0)
129
+ parser (>= 3.3.7.2)
130
+ prism (~> 1.7)
131
+ rubocop-capybara (2.22.1)
132
+ lint_roller (~> 1.1)
133
+ rubocop (~> 1.72, >= 1.72.1)
134
+ rubocop-factory_bot (2.28.0)
135
+ lint_roller (~> 1.1)
136
+ rubocop (~> 1.72, >= 1.72.1)
137
+ rubocop-performance (1.26.1)
138
+ lint_roller (~> 1.1)
139
+ rubocop (>= 1.75.0, < 2.0)
140
+ rubocop-ast (>= 1.47.1, < 2.0)
141
+ rubocop-rails (2.34.3)
126
142
  activesupport (>= 4.2.0)
143
+ lint_roller (~> 1.1)
127
144
  rack (>= 1.1)
128
- rubocop (>= 1.52.0, < 2.0)
129
- rubocop-ast (>= 1.31.1, < 2.0)
130
- rubocop-rspec (3.2.0)
131
- rubocop (~> 1.61)
132
- rubocop-rspec_rails (2.30.0)
133
- rubocop (~> 1.61)
134
- rubocop-rspec (~> 3, >= 3.0.1)
145
+ rubocop (>= 1.75.0, < 2.0)
146
+ rubocop-ast (>= 1.44.0, < 2.0)
147
+ rubocop-rspec (3.9.0)
148
+ lint_roller (~> 1.1)
149
+ rubocop (~> 1.81)
150
+ rubocop-rspec_rails (2.32.0)
151
+ lint_roller (~> 1.1)
152
+ rubocop (~> 1.72, >= 1.72.1)
153
+ rubocop-rspec (~> 3.5)
135
154
  ruby-progressbar (1.13.0)
136
155
  rumoji (0.5.0)
137
- securerandom (0.3.2)
138
- sqlite3 (1.7.3-arm64-darwin)
139
- sqlite3 (1.7.3-x86_64-darwin)
140
- sqlite3 (1.7.3-x86_64-linux)
141
- timeout (0.4.2)
156
+ securerandom (0.4.1)
157
+ sqlite3 (2.9.0-arm64-darwin)
158
+ sqlite3 (2.9.0-x86_64-darwin)
159
+ sqlite3 (2.9.0-x86_64-linux-gnu)
160
+ timeout (0.6.0)
142
161
  tzinfo (2.0.6)
143
162
  concurrent-ruby (~> 1.0)
144
- unicode-display_width (3.1.2)
145
- unicode-emoji (~> 4.0, >= 4.0.4)
146
- unicode-emoji (4.0.4)
147
- zeitwerk (2.6.18)
163
+ unicode-display_width (3.2.0)
164
+ unicode-emoji (~> 4.1)
165
+ unicode-emoji (4.2.0)
166
+ uri (1.1.1)
167
+ zeitwerk (2.7.4)
148
168
 
149
169
  PLATFORMS
150
170
  arm64-darwin-21
151
171
  arm64-darwin-23
172
+ arm64-darwin-24
152
173
  x86_64-darwin-21
153
174
  x86_64-linux
154
175
 
@@ -160,7 +181,7 @@ DEPENDENCIES
160
181
  rake (~> 13.0)
161
182
  rspec (~> 3.9)
162
183
  rubocop-gp!
163
- sqlite3 (~> 1.4)
184
+ sqlite3
164
185
 
165
186
  BUNDLED WITH
166
187
  2.3.15
data/README.md CHANGED
@@ -74,6 +74,8 @@ end
74
74
 
75
75
  Product::COLOR.values # => ["red", "green"]
76
76
  Product::COLOR::RED # => "red"
77
+ Product::COLOR::RED.red? # => true
78
+ Product::COLOR::RED.human_name # => "Красный"
77
79
  Product::COLOR::RED__GREEN # => ["red", "green"]
78
80
 
79
81
  Product::COLOR["red"].red? # => true
@@ -36,7 +36,7 @@ module EnumMachine
36
36
  end
37
37
 
38
38
  enum_values.each do |enum_value|
39
- const_set enum_value.underscore.upcase, enum_value.to_s.freeze
39
+ const_set enum_value.underscore.upcase, value_class.new(enum_value).freeze
40
40
  end
41
41
 
42
42
  aliases.each_key do |key|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EnumMachine
4
- VERSION = "2.1.0"
4
+ VERSION = "2.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enum_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ermolaev Andrey
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-12-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activemodel
@@ -86,7 +85,6 @@ metadata:
86
85
  homepage_uri: https://github.com/corp-gp/enum_machine
87
86
  source_code_uri: https://github.com/corp-gp/enum_machine
88
87
  rubygems_mfa_required: 'true'
89
- post_install_message:
90
88
  rdoc_options: []
91
89
  require_paths:
92
90
  - lib
@@ -101,8 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
99
  - !ruby/object:Gem::Version
102
100
  version: '0'
103
101
  requirements: []
104
- rubygems_version: 3.3.17
105
- signing_key:
102
+ rubygems_version: 3.6.9
106
103
  specification_version: 4
107
104
  summary: fast and siple usage state machine in your app
108
105
  test_files: []