enumerations 2.5.2 → 2.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/LICENSE +21 -0
- data/README.md +1 -1
- data/enumerations.gemspec +1 -0
- data/lib/enumerations/base.rb +6 -0
- data/lib/enumerations/version.rb +1 -1
- data/test/value_test.rb +8 -0
- metadata +21 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96fda6cfaff4da9dfd29920b976700cb73ac86717712db80e65f255188ee5c42
|
4
|
+
data.tar.gz: 2bc62be14144f04d162423d9d36f9949e397f6a325464d4e4fd5488e16688b83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd955f210f7747cfd692f7ee2f333e66aeca3a280ab20d1eee9fb96c9287505f95b438cc0576339b03ac171d7abbb362bef81de212bad37acb799f14a256d13c
|
7
|
+
data.tar.gz: c9b384db06f64b3b10e335416fbb7855949d0d859273776de100865ee5ed858d7efc80ff9daf69b827eaecd40831dc372014203bc9b82fa95215957c4fb357b0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v2.5.4](https://github.com/infinum/enumerations/tree/v2.5.4) (2023-01-09)
|
4
|
+
[Full Changelog](https://github.com/infinum/enumerations/compare/v2.5.3...v2.5.4)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Add MIT license file.
|
9
|
+
|
10
|
+
## [v2.5.3](https://github.com/infinum/enumerations/tree/v2.5.3) (2022-02-02)
|
11
|
+
[Full Changelog](https://github.com/infinum/enumerations/compare/v2.5.2...v2.5.3)
|
12
|
+
|
13
|
+
**Fixed bugs:**
|
14
|
+
|
15
|
+
- Prevent `method_missing` instantiates new instance of `Enumerations::Base`; returns `String` instead
|
16
|
+
|
17
|
+
**Merged pull requests:**
|
18
|
+
|
19
|
+
- Prevent method_missing to instantiates new Enumerations::Base [\#58](https://github.com/infinum/enumerations/pull/58) ([PetarCurkovic](https://github.com/PetarCurkovic))
|
20
|
+
|
3
21
|
## [v2.5.2](https://github.com/infinum/enumerations/tree/v2.5.2) (2022-01-27)
|
4
22
|
[Full Changelog](https://github.com/infinum/enumerations/compare/v2.5.1...v2.5.2)
|
5
23
|
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 Infinum
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Enumerations
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/enumerations.svg)](https://badge.fury.io/rb/enumerations)
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/c3b96c5afceaa9be2173/maintainability)](https://codeclimate.com/github/infinum/enumerations/maintainability)
|
6
6
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/c3b96c5afceaa9be2173/test_coverage)](https://codeclimate.com/github/infinum/enumerations/test_coverage)
|
7
|
-
|
7
|
+
![Build Status](https://github.com/infinum/enumerations/actions/workflows/test.yml/badge.svg)
|
8
8
|
|
9
9
|
Rails plugin for Enumerations in ActiveRecord models.
|
10
10
|
|
data/enumerations.gemspec
CHANGED
@@ -7,6 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.summary = 'Enumerations for ActiveRecord!'
|
8
8
|
s.description = 'Extends ActiveRecord with enumeration capabilites.'
|
9
9
|
s.homepage = 'https://github.com/infinum/enumerations'
|
10
|
+
s.license = 'MIT'
|
10
11
|
|
11
12
|
s.authors = [
|
12
13
|
'Tomislav Car', 'Nikica Jokić', 'Nikola Santić', 'Stjepan Hadjić', 'Petar Ćurković'
|
data/lib/enumerations/base.rb
CHANGED
data/lib/enumerations/version.rb
CHANGED
data/test/value_test.rb
CHANGED
@@ -100,4 +100,12 @@ class ValueTest < Minitest::Test
|
|
100
100
|
|
101
101
|
assert_equal enum.foobar.respond_to?(:name), false
|
102
102
|
end
|
103
|
+
|
104
|
+
def test_string_methods_on_value
|
105
|
+
enum = Class.new(Enumerations::Base) do
|
106
|
+
value :foobar
|
107
|
+
end
|
108
|
+
|
109
|
+
assert_equal enum.foobar.upcase, 'FOOBAR'
|
110
|
+
end
|
103
111
|
end
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomislav Car
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- ".rubocop.yml"
|
129
129
|
- CHANGELOG.md
|
130
130
|
- Gemfile
|
131
|
+
- LICENSE
|
131
132
|
- MIGRATE.md
|
132
133
|
- README.md
|
133
134
|
- Rakefile
|
@@ -156,7 +157,8 @@ files:
|
|
156
157
|
- test/translation_test.rb
|
157
158
|
- test/value_test.rb
|
158
159
|
homepage: https://github.com/infinum/enumerations
|
159
|
-
licenses:
|
160
|
+
licenses:
|
161
|
+
- MIT
|
160
162
|
metadata: {}
|
161
163
|
post_install_message:
|
162
164
|
rdoc_options: []
|
@@ -173,8 +175,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
175
|
- !ruby/object:Gem::Version
|
174
176
|
version: '0'
|
175
177
|
requirements: []
|
176
|
-
rubygems_version: 3.
|
178
|
+
rubygems_version: 3.4.5
|
177
179
|
signing_key:
|
178
180
|
specification_version: 4
|
179
181
|
summary: Enumerations for ActiveRecord!
|
180
|
-
test_files:
|
182
|
+
test_files:
|
183
|
+
- test/base_test.rb
|
184
|
+
- test/configuration/configuration.rb
|
185
|
+
- test/configuration/custom_configuration_test.rb
|
186
|
+
- test/configuration/enumerations_test.rb
|
187
|
+
- test/configuration/finder_test.rb
|
188
|
+
- test/configuration_test.rb
|
189
|
+
- test/enumerations_test.rb
|
190
|
+
- test/finder_test.rb
|
191
|
+
- test/helpers/database_helper.rb
|
192
|
+
- test/helpers/locale_helper.rb
|
193
|
+
- test/helpers/test_helper.rb
|
194
|
+
- test/locales/hr.yml
|
195
|
+
- test/reflection_test.rb
|
196
|
+
- test/translation_test.rb
|
197
|
+
- test/value_test.rb
|