enumerations 2.5.0 → 2.5.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/test.yml +24 -0
- data/CHANGELOG.md +14 -0
- data/lib/enumerations/finder_methods.rb +1 -1
- data/lib/enumerations/value.rb +2 -2
- data/lib/enumerations/version.rb +1 -1
- metadata +7 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54447b9967c65df1318cac0ec59daab41b5f41ad118ad0ba32e260b8cbcf36d9
|
4
|
+
data.tar.gz: fa276b02570956e52d22915957154a125585983c5a2923453d3cc0c6146d908f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63e002298b8365cc55c296d85963b3bf410bcd02501394666d45efbfffd3f0fd70a276e9413a51b3a7c81571599f9958a98a3d0b9d5c7671cff60cfd77002591
|
7
|
+
data.tar.gz: f7e3d0337b42d668fe78a6ea3037ad59820803db1ae65f1ddbcfaf6fcfc1e5d19e6081c0582fc5a1766e27b2c24747901117d78e9f03f2b5e690b87e79a7bb8f
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Test suite
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
name: Ruby ${{ matrix.ruby }}
|
12
|
+
runs-on: ubuntu-18.04
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
ruby: [2.6, 2.7, 3.0]
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
bundler-cache: true
|
23
|
+
- name: Run tests
|
24
|
+
run: bundle exec rake test
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v2.5.1](https://github.com/infinum/enumerations/tree/v2.5.1) (YYYY-MM-DD)
|
4
|
+
[Full Changelog](https://github.com/infinum/enumerations/compare/v2.5.0...v2.5.1)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Add support for Ruby 3 [\#52](https://github.com/infinum/enumerations/issues/52)
|
9
|
+
|
10
|
+
## [v2.5.0](https://github.com/infinum/enumerations/tree/v2.5.0) (2021-03-03)
|
11
|
+
[Full Changelog](https://github.com/infinum/enumerations/compare/v2.4.0...v2.5.0)
|
12
|
+
|
13
|
+
**Implemented enhancements:**
|
14
|
+
|
15
|
+
- Add `raise_invalid_value_error` configuration option to disable raising errors on invalid values
|
16
|
+
|
3
17
|
## [v2.4.0](https://github.com/infinum/enumerations/tree/v2.4.0) (2019-02-07)
|
4
18
|
[Full Changelog](https://github.com/infinum/enumerations/compare/v2.3.3...v2.4.0)
|
5
19
|
|
data/lib/enumerations/value.rb
CHANGED
@@ -54,7 +54,7 @@ module Enumerations
|
|
54
54
|
#
|
55
55
|
def define_attributes_getters
|
56
56
|
@attributes.each do |key, _|
|
57
|
-
next if
|
57
|
+
next if self.class.method_defined?(key)
|
58
58
|
|
59
59
|
self.class.send :define_method, key do |locale: I18n.locale|
|
60
60
|
case @attributes[key]
|
@@ -102,7 +102,7 @@ module Enumerations
|
|
102
102
|
@attributes.each do |key, _|
|
103
103
|
method_name = "#{key}?"
|
104
104
|
|
105
|
-
next if
|
105
|
+
next if self.class.method_defined?(method_name.to_sym)
|
106
106
|
|
107
107
|
self.class.send :define_method, method_name do
|
108
108
|
@attributes[key].present?
|
data/lib/enumerations/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enumerations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomislav Car
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
- Nikola Santić
|
10
10
|
- Stjepan Hadjić
|
11
11
|
- Petar Ćurković
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
date: 2017-09-08 00:00:00.000000000 Z
|
@@ -123,6 +123,7 @@ executables: []
|
|
123
123
|
extensions: []
|
124
124
|
extra_rdoc_files: []
|
125
125
|
files:
|
126
|
+
- ".github/workflows/test.yml"
|
126
127
|
- ".gitignore"
|
127
128
|
- ".rubocop.yml"
|
128
129
|
- CHANGELOG.md
|
@@ -157,7 +158,7 @@ files:
|
|
157
158
|
homepage: https://github.com/infinum/enumerations
|
158
159
|
licenses: []
|
159
160
|
metadata: {}
|
160
|
-
post_install_message:
|
161
|
+
post_install_message:
|
161
162
|
rdoc_options: []
|
162
163
|
require_paths:
|
163
164
|
- lib
|
@@ -172,23 +173,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
173
|
- !ruby/object:Gem::Version
|
173
174
|
version: '0'
|
174
175
|
requirements: []
|
175
|
-
rubygems_version: 3.1
|
176
|
-
signing_key:
|
176
|
+
rubygems_version: 3.0.1
|
177
|
+
signing_key:
|
177
178
|
specification_version: 4
|
178
179
|
summary: Enumerations for ActiveRecord!
|
179
|
-
test_files:
|
180
|
-
- test/base_test.rb
|
181
|
-
- test/configuration/configuration.rb
|
182
|
-
- test/configuration/custom_configuration_test.rb
|
183
|
-
- test/configuration/enumerations_test.rb
|
184
|
-
- test/configuration/finder_test.rb
|
185
|
-
- test/configuration_test.rb
|
186
|
-
- test/enumerations_test.rb
|
187
|
-
- test/finder_test.rb
|
188
|
-
- test/helpers/database_helper.rb
|
189
|
-
- test/helpers/locale_helper.rb
|
190
|
-
- test/helpers/test_helper.rb
|
191
|
-
- test/locales/hr.yml
|
192
|
-
- test/reflection_test.rb
|
193
|
-
- test/translation_test.rb
|
194
|
-
- test/value_test.rb
|
180
|
+
test_files: []
|