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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d34ca348e2b3543d6cf6c92a43c2d29e83989a0a5b2547a679503aeb89fab290
4
- data.tar.gz: cb4c301a3b999b5f1a392da16d2e334196a822b5936404f4c575e3e3ce87911b
3
+ metadata.gz: ae3444c6b0be4fc77c338286c25e97acc5501aeac9af722a53bf1182dad6034c
4
+ data.tar.gz: 75461556470937cd50f91326e591c73aea3a089cbfe3961200a8420d6682c019
5
5
  SHA512:
6
- metadata.gz: 3213d27c0d4271028350bc835f119e23ec1417a00b7d55a5d7acb19b30488797863f92a217a495d007c765e12a0955de5a280bd7384948c079b8780bddd75cee
7
- data.tar.gz: cbf3d45247712a2ed0ab2d2fbc069fbc2e9a8893b865fb0da5a37344f9d3ff1575fdeca2e65c7673321435d5db1d086d2706ca1e923dc49da974aa55f48b47b1
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bright_serializer (0.2.4)
4
+ bright_serializer (0.2.5)
5
5
  oj (~> 3)
6
6
 
7
7
  GEM
@@ -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] || object[key.to_s]
24
+ object.key?(key) ? object[key] : object[key.to_s]
25
25
  else
26
26
  object.send(key)
27
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrightSerializer
4
- VERSION = '0.2.4'
4
+ VERSION = '0.2.5'
5
5
  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
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-02-19 00:00:00.000000000 Z
11
+ date: 2021-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj