enumerations 2.5.2 → 2.5.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/CHANGELOG.md +11 -0
- data/README.md +1 -1
- data/lib/enumerations/base.rb +6 -0
- data/lib/enumerations/version.rb +1 -1
- data/test/value_test.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7415435429c08e2093220592c091dffca83b50fd26f6d71836873594da483778
|
4
|
+
data.tar.gz: 63538f83e93d43926f2401297c213a03c814efb667d96259f8f86cfa241072e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfcb47a129cd32afa78c25897aa681bef271266c878ba9fc077df12ed15543ebdab1f97e71c580adb9e19523bbf3287b3ec0a46a52b247f42030c4f9ade31b1d
|
7
|
+
data.tar.gz: 2dbce2808dcadd1cb3e0b16193b9f66e567846c8d9dca89478d30edc6c1b583e8b8b9e8443e08ec162e7e30dc78423cf7b90edf5de41de2b64722b664785a1d2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v2.5.3](https://github.com/infinum/enumerations/tree/v2.5.3) (2022-02-02)
|
4
|
+
[Full Changelog](https://github.com/infinum/enumerations/compare/v2.5.2...v2.5.3)
|
5
|
+
|
6
|
+
**Fixed bugs:**
|
7
|
+
|
8
|
+
- Prevent `method_missing` instantiates new instance of `Enumerations::Base`; returns `String` instead
|
9
|
+
|
10
|
+
**Merged pull requests:**
|
11
|
+
|
12
|
+
- Prevent method_missing to instantiates new Enumerations::Base [\#58](https://github.com/infinum/enumerations/pull/58) ([PetarCurkovic](https://github.com/PetarCurkovic))
|
13
|
+
|
3
14
|
## [v2.5.2](https://github.com/infinum/enumerations/tree/v2.5.2) (2022-01-27)
|
4
15
|
[Full Changelog](https://github.com/infinum/enumerations/compare/v2.5.1...v2.5.2)
|
5
16
|
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Enumerations
|
|
4
4
|
[](https://badge.fury.io/rb/enumerations)
|
5
5
|
[](https://codeclimate.com/github/infinum/enumerations/maintainability)
|
6
6
|
[](https://codeclimate.com/github/infinum/enumerations/test_coverage)
|
7
|
-
|
7
|
+

|
8
8
|
|
9
9
|
Rails plugin for Enumerations in ActiveRecord models.
|
10
10
|
|
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
|