enum_ish 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +17 -3
- data/CHANGELOG.md +4 -0
- data/gemfiles/rails60.gemfile +1 -0
- data/gemfiles/rails70.gemfile +5 -0
- data/lib/enum_ish/active_record_definer.rb +11 -7
- data/lib/enum_ish/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fb31764431d97fa544b90f3d7534f3c96d2fc1acbbfb7d3d44fcaa73da3064e
|
4
|
+
data.tar.gz: 84897de0db79b886700f9d061159798aab16dbc120ec52d87d94677a8417de49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9130d50fa059e0a1a0e9237e07b73ad7564a55e500a712ea7c15efdd232cfe69ef67cc09e222b124a819a44b57b2e9da078d9b9bb590c08b8f21e6980392cfac
|
7
|
+
data.tar.gz: 204ae64789c49108e1e9faa137aa6737c5f1d7a1c5f79cf55e354e8a80ae4fb11c89235f4dfb5f018ec89a7a7b9c50141f9a2777235a90bced4d946444e9038f
|
data/.github/workflows/ci.yml
CHANGED
@@ -4,27 +4,41 @@ on: [push, pull_request]
|
|
4
4
|
|
5
5
|
jobs:
|
6
6
|
test:
|
7
|
-
runs-on: ubuntu-
|
7
|
+
runs-on: ubuntu-20.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]
|
12
|
+
gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61', 'rails70']
|
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
|
18
20
|
- ruby: 2.4
|
19
21
|
gemfile: rails60
|
20
22
|
- ruby: 2.4
|
21
23
|
gemfile: rails61
|
24
|
+
- ruby: 2.4
|
25
|
+
gemfile: rails70
|
26
|
+
- ruby: 2.5
|
27
|
+
gemfile: rails70
|
28
|
+
- ruby: 2.6
|
29
|
+
gemfile: rails70
|
22
30
|
- ruby: 3.0
|
23
31
|
gemfile: rails50
|
24
32
|
- ruby: 3.0
|
25
33
|
gemfile: rails51
|
26
34
|
- ruby: 3.0
|
27
35
|
gemfile: rails52
|
36
|
+
- ruby: 3.1
|
37
|
+
gemfile: rails50
|
38
|
+
- ruby: 3.1
|
39
|
+
gemfile: rails51
|
40
|
+
- ruby: 3.1
|
41
|
+
gemfile: rails52
|
28
42
|
|
29
43
|
name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
30
44
|
|
data/CHANGELOG.md
CHANGED
data/gemfiles/rails60.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/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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- gemfiles/rails52.gemfile
|
116
116
|
- gemfiles/rails60.gemfile
|
117
117
|
- gemfiles/rails61.gemfile
|
118
|
+
- gemfiles/rails70.gemfile
|
118
119
|
- lib/enum_ish.rb
|
119
120
|
- lib/enum_ish/active_record_definer.rb
|
120
121
|
- lib/enum_ish/active_record_enum_type.rb
|
@@ -145,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
146
|
- !ruby/object:Gem::Version
|
146
147
|
version: '0'
|
147
148
|
requirements: []
|
148
|
-
rubygems_version: 3.1.
|
149
|
+
rubygems_version: 3.1.2
|
149
150
|
signing_key:
|
150
151
|
specification_version: 4
|
151
152
|
summary: A ruby and rails extension to generate enum-like methods
|