enum_ish 1.3.2 → 1.3.3
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 +47 -0
- data/CHANGELOG.md +4 -0
- data/gemfiles/rails61.gemfile +5 -0
- data/lib/enum_ish/active_record_definer.rb +7 -1
- data/lib/enum_ish/version.rb +1 -1
- metadata +5 -4
- data/.travis.yml +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aad3607cc8b6c21e15582ee8ec3240d664c9c145c270f322f2e9cda3966ef920
|
4
|
+
data.tar.gz: 4dc14db67c76e0d7e23b8ce287605b1a10c965824b19aa45dc53f3f855a1b092
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d4f274982727f7aa04b6b71b3a6017ba598fa27287065a1703412f94a58332eb478cb4ea7da0c218fbb2fd0f7cc08f5439c1520986ec7107a6fbd2b093a2133
|
7
|
+
data.tar.gz: a2038ffa1f1ab5ce99d5166565339f84b6711698537dda7c918d1db9873780bf60bfcdd2e7db38f68282ff58410d866f9b2a02a60d05c6d7e771b13c0dcbc82b
|
@@ -0,0 +1,47 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-16.04
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, 3.0]
|
12
|
+
gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61']
|
13
|
+
exclude:
|
14
|
+
- ruby: 2.3
|
15
|
+
gemfile: rails60
|
16
|
+
- ruby: 2.3
|
17
|
+
gemfile: rails61
|
18
|
+
- ruby: 2.4
|
19
|
+
gemfile: rails60
|
20
|
+
- ruby: 2.4
|
21
|
+
gemfile: rails61
|
22
|
+
- ruby: 3.0
|
23
|
+
gemfile: rails50
|
24
|
+
- ruby: 3.0
|
25
|
+
gemfile: rails51
|
26
|
+
- ruby: 3.0
|
27
|
+
gemfile: rails52
|
28
|
+
|
29
|
+
name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
30
|
+
|
31
|
+
env:
|
32
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
33
|
+
|
34
|
+
steps:
|
35
|
+
- uses: actions/checkout@v2
|
36
|
+
- uses: ruby/setup-ruby@v1
|
37
|
+
with:
|
38
|
+
ruby-version: ${{ matrix.ruby }}
|
39
|
+
bundler-cache: true
|
40
|
+
- name: Prepare test
|
41
|
+
run: |
|
42
|
+
cd spec/dummy
|
43
|
+
BUNDLE_GEMFILE=../../${{ env.BUNDLE_GEMFILE }} RAILS_ENV=test bundle exec rake db:create db:migrate db:seed
|
44
|
+
cd ../..
|
45
|
+
- name: Run test
|
46
|
+
run: |
|
47
|
+
bundle exec rspec
|
data/CHANGELOG.md
CHANGED
@@ -24,7 +24,13 @@ module EnumIsh
|
|
24
24
|
enum.mapping.fetch(value, value)
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
args =
|
28
|
+
if ActiveRecord.version > Gem::Version.new('6.1.0.a')
|
29
|
+
[enum.name]
|
30
|
+
else
|
31
|
+
[enum.name, :enum]
|
32
|
+
end
|
33
|
+
decorate_attribute_type(*args) do |subtype|
|
28
34
|
EnumIsh::ActiveRecordEnumType.new(enum.name, enum.mapping, subtype)
|
29
35
|
end
|
30
36
|
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.3.
|
4
|
+
version: 1.3.3
|
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: 2021-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -101,9 +101,9 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".github/workflows/ci.yml"
|
104
105
|
- ".gitignore"
|
105
106
|
- ".rspec"
|
106
|
-
- ".travis.yml"
|
107
107
|
- CHANGELOG.md
|
108
108
|
- Gemfile
|
109
109
|
- LICENSE
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- gemfiles/rails51.gemfile
|
115
115
|
- gemfiles/rails52.gemfile
|
116
116
|
- gemfiles/rails60.gemfile
|
117
|
+
- gemfiles/rails61.gemfile
|
117
118
|
- lib/enum_ish.rb
|
118
119
|
- lib/enum_ish/active_record_definer.rb
|
119
120
|
- lib/enum_ish/active_record_enum_type.rb
|
@@ -141,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
142
|
- !ruby/object:Gem::Version
|
142
143
|
version: '0'
|
143
144
|
requirements: []
|
144
|
-
rubygems_version: 3.
|
145
|
+
rubygems_version: 3.2.3
|
145
146
|
signing_key:
|
146
147
|
specification_version: 4
|
147
148
|
summary: A ruby and rails extension to generate enum-like methods
|
data/.travis.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 2.3
|
4
|
-
- 2.4
|
5
|
-
- 2.5
|
6
|
-
- 2.6
|
7
|
-
- 2.7
|
8
|
-
gemfile:
|
9
|
-
- gemfiles/rails50.gemfile
|
10
|
-
- gemfiles/rails51.gemfile
|
11
|
-
- gemfiles/rails52.gemfile
|
12
|
-
- gemfiles/rails60.gemfile
|
13
|
-
matrix:
|
14
|
-
exclude:
|
15
|
-
- rvm: 2.3
|
16
|
-
gemfile: gemfiles/rails60.gemfile
|
17
|
-
- rvm: 2.4
|
18
|
-
gemfile: gemfiles/rails60.gemfile
|
19
|
-
before_script:
|
20
|
-
- cd spec/dummy
|
21
|
-
- bundle exec rake db:create db:migrate db:seed RAILS_ENV=test
|
22
|
-
- cd ../..
|
23
|
-
script:
|
24
|
-
- bundle exec rspec
|