bright_serializer 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/bright_serializer/attribute.rb +1 -1
- data/lib/bright_serializer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae3444c6b0be4fc77c338286c25e97acc5501aeac9af722a53bf1182dad6034c
|
4
|
+
data.tar.gz: 75461556470937cd50f91326e591c73aea3a089cbfe3961200a8420d6682c019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17d5c832abe849c799e4c5240bdfda4ed8e292f0284a3004908d0e812a0bb90268f85be8f1e416c83b596446aec0bcef38d02d1e26e607fe6da902dfc6daa69f
|
7
|
+
data.tar.gz: 7e78a38854d53707fd8f6cd4eb3df7368f045fc20f086df1fd592c07cf723b69de458c2bfc2890457d245633f716bbc1e8d379cb0318f8486809fc42ff37fd72
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
|
5
5
|
* Your contribution
|
6
6
|
|
7
|
+
## 0.2.5 (2021-03-08)
|
8
|
+
|
9
|
+
* When serializing an Hash, check present of the key before trying string ([#57](https://github.com/petalmd/bright_serializer/pull/57))
|
10
|
+
|
7
11
|
## 0.2.4 (2021-02-19)
|
8
12
|
|
9
13
|
* Try symbol and string keys when the object to serialize is an Hash ([#54](https://github.com/petalmd/bright_serializer/pull/54))
|
data/Gemfile.lock
CHANGED
@@ -21,7 +21,7 @@ module BrightSerializer
|
|
21
21
|
if @block
|
22
22
|
@block.arity.abs == 1 ? object.instance_eval(&@block) : object.instance_exec(object, params, &@block)
|
23
23
|
elsif object.is_a?(Hash)
|
24
|
-
object[key]
|
24
|
+
object.key?(key) ? object[key] : object[key.to_s]
|
25
25
|
else
|
26
26
|
object.send(key)
|
27
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bright_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Francis Bastien
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|