enum_ish 1.6.0 → 1.6.2
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 +4 -4
- data/.github/workflows/ci.yml +38 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +8 -0
- data/gemfiles/rails50.gemfile +1 -0
- data/gemfiles/rails51.gemfile +1 -0
- data/gemfiles/rails52.gemfile +1 -0
- data/gemfiles/rails60.gemfile +2 -0
- data/gemfiles/rails61.gemfile +1 -0
- data/gemfiles/rails70.gemfile +6 -0
- data/gemfiles/rails71.gemfile +6 -0
- data/lib/enum_ish/active_record_definer.rb +11 -7
- data/lib/enum_ish/base.rb +2 -0
- data/lib/enum_ish/dictionary_lookup.rb +2 -0
- data/lib/enum_ish/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9ba2d3bf75254c8f3254a3724f7445e88624da78b10fc2bef8a8bfcc1824677
|
|
4
|
+
data.tar.gz: 757fb848eb78f79a97b419a789622d467d14f8aece08f38e042c64823ac782de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9245c499e7a19f8d25941573e04f76828815fd3cb8842faf9e8a6428ee09092d1bea871f1d080fb2e1b2a47b89ce178816e76244f763f4ad9b72176eca4a6fc
|
|
7
|
+
data.tar.gz: 1c953c8ab828e06929b3cb118ac72000a0355eb00e7600cc4aa2abc14183734a715dc90963ce961f61d56fe341f7891b5d4ba4b73d8468bd471c35f48e96ea4d
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -4,27 +4,61 @@ on: [push, pull_request]
|
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
6
|
test:
|
|
7
|
-
runs-on: ubuntu-
|
|
7
|
+
runs-on: ubuntu-22.04
|
|
8
8
|
strategy:
|
|
9
9
|
fail-fast: false
|
|
10
10
|
matrix:
|
|
11
|
-
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, 3.0]
|
|
12
|
-
gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61']
|
|
11
|
+
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3]
|
|
12
|
+
gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61', 'rails70', 'rails71']
|
|
13
13
|
exclude:
|
|
14
14
|
- ruby: 2.3
|
|
15
15
|
gemfile: rails60
|
|
16
16
|
- ruby: 2.3
|
|
17
17
|
gemfile: rails61
|
|
18
|
+
- ruby: 2.3
|
|
19
|
+
gemfile: rails70
|
|
20
|
+
- ruby: 2.3
|
|
21
|
+
gemfile: rails71
|
|
18
22
|
- ruby: 2.4
|
|
19
23
|
gemfile: rails60
|
|
20
24
|
- ruby: 2.4
|
|
21
25
|
gemfile: rails61
|
|
26
|
+
- ruby: 2.4
|
|
27
|
+
gemfile: rails70
|
|
28
|
+
- ruby: 2.4
|
|
29
|
+
gemfile: rails71
|
|
30
|
+
- ruby: 2.5
|
|
31
|
+
gemfile: rails70
|
|
32
|
+
- ruby: 2.5
|
|
33
|
+
gemfile: rails71
|
|
34
|
+
- ruby: 2.6
|
|
35
|
+
gemfile: rails70
|
|
36
|
+
- ruby: 2.6
|
|
37
|
+
gemfile: rails71
|
|
22
38
|
- ruby: 3.0
|
|
23
39
|
gemfile: rails50
|
|
24
40
|
- ruby: 3.0
|
|
25
41
|
gemfile: rails51
|
|
26
42
|
- ruby: 3.0
|
|
27
43
|
gemfile: rails52
|
|
44
|
+
- ruby: 3.1
|
|
45
|
+
gemfile: rails50
|
|
46
|
+
- ruby: 3.1
|
|
47
|
+
gemfile: rails51
|
|
48
|
+
- ruby: 3.1
|
|
49
|
+
gemfile: rails52
|
|
50
|
+
- ruby: 3.2
|
|
51
|
+
gemfile: rails50
|
|
52
|
+
- ruby: 3.2
|
|
53
|
+
gemfile: rails51
|
|
54
|
+
- ruby: 3.2
|
|
55
|
+
gemfile: rails52
|
|
56
|
+
- ruby: 3.3
|
|
57
|
+
gemfile: rails50
|
|
58
|
+
- ruby: 3.3
|
|
59
|
+
gemfile: rails51
|
|
60
|
+
- ruby: 3.3
|
|
61
|
+
gemfile: rails52
|
|
28
62
|
|
|
29
63
|
name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
|
30
64
|
|
|
@@ -32,7 +66,7 @@ jobs:
|
|
|
32
66
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
|
33
67
|
|
|
34
68
|
steps:
|
|
35
|
-
- uses: actions/checkout@
|
|
69
|
+
- uses: actions/checkout@v4
|
|
36
70
|
- uses: ruby/setup-ruby@v1
|
|
37
71
|
with:
|
|
38
72
|
ruby-version: ${{ matrix.ruby }}
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/gemfiles/rails50.gemfile
CHANGED
data/gemfiles/rails51.gemfile
CHANGED
data/gemfiles/rails52.gemfile
CHANGED
data/gemfiles/rails60.gemfile
CHANGED
data/gemfiles/rails61.gemfile
CHANGED
|
@@ -26,14 +26,18 @@ module EnumIsh
|
|
|
26
26
|
enum.mapping.fetch(value, value)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
if ActiveRecord.version > Gem::Version.new('7.0.0.a')
|
|
30
|
+
attribute(enum.name) do |subtype|
|
|
31
|
+
EnumIsh::ActiveRecordEnumType.new(enum.name, enum.mapping, subtype)
|
|
32
|
+
end
|
|
33
|
+
elsif ActiveRecord.version > Gem::Version.new('6.1.0.a')
|
|
34
|
+
decorate_attribute_type(enum.name) do |subtype|
|
|
35
|
+
EnumIsh::ActiveRecordEnumType.new(enum.name, enum.mapping, subtype)
|
|
36
|
+
end
|
|
37
|
+
else
|
|
38
|
+
decorate_attribute_type(enum.name, :enum) do |subtype|
|
|
39
|
+
EnumIsh::ActiveRecordEnumType.new(enum.name, enum.mapping, subtype)
|
|
34
40
|
end
|
|
35
|
-
decorate_attribute_type(*args) do |subtype|
|
|
36
|
-
EnumIsh::ActiveRecordEnumType.new(enum.name, enum.mapping, subtype)
|
|
37
41
|
end
|
|
38
42
|
end
|
|
39
43
|
end
|
data/lib/enum_ish/base.rb
CHANGED
data/lib/enum_ish/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: enum_ish
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yoshikazu Kaneta
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-06-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -115,6 +115,8 @@ files:
|
|
|
115
115
|
- gemfiles/rails52.gemfile
|
|
116
116
|
- gemfiles/rails60.gemfile
|
|
117
117
|
- gemfiles/rails61.gemfile
|
|
118
|
+
- gemfiles/rails70.gemfile
|
|
119
|
+
- gemfiles/rails71.gemfile
|
|
118
120
|
- lib/enum_ish.rb
|
|
119
121
|
- lib/enum_ish/active_record_definer.rb
|
|
120
122
|
- lib/enum_ish/active_record_enum_type.rb
|
|
@@ -130,7 +132,7 @@ files:
|
|
|
130
132
|
homepage: https://github.com/kanety/enum_ish
|
|
131
133
|
licenses: []
|
|
132
134
|
metadata: {}
|
|
133
|
-
post_install_message:
|
|
135
|
+
post_install_message:
|
|
134
136
|
rdoc_options: []
|
|
135
137
|
require_paths:
|
|
136
138
|
- lib
|
|
@@ -145,8 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
145
147
|
- !ruby/object:Gem::Version
|
|
146
148
|
version: '0'
|
|
147
149
|
requirements: []
|
|
148
|
-
rubygems_version: 3.
|
|
149
|
-
signing_key:
|
|
150
|
+
rubygems_version: 3.3.3
|
|
151
|
+
signing_key:
|
|
150
152
|
specification_version: 4
|
|
151
153
|
summary: A ruby and rails extension to generate enum-like methods
|
|
152
154
|
test_files: []
|