abroad 3.0.0 → 3.0.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cbe6a333acda4b792403b71bed3161dd123ee5d
|
4
|
+
data.tar.gz: 20790811f1e0927b0a0b2962f8f433f6e6b7ec7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bb927936eff4941f64c053da29d1aca9452b58ba1ac92f0844da29390383c22b7be982ae678ec2c462e346d538fa29b04b2cecd5202ffe8caec7ab37aa47b85
|
7
|
+
data.tar.gz: c23e65ec8f4783daf0e3609aad162996c2e241bf6316bbdb30525d4a62f45c5acb5d76ff380fc85de0f76e7ec632be750c9022a0396846dc7bc7ab655dbb74d4
|
@@ -16,7 +16,7 @@ module Abroad
|
|
16
16
|
|
17
17
|
def write_key_value(key, value)
|
18
18
|
key_parts = split_key(key)
|
19
|
-
encoded_value = value.encode(encoding)
|
19
|
+
encoded_value = value.encode(encoding) if value
|
20
20
|
trie.add(key_parts, encoded_value)
|
21
21
|
end
|
22
22
|
|
@@ -57,7 +57,7 @@ module Abroad
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def write_value(node, parent_key)
|
60
|
-
value = node ? node.value : ''
|
60
|
+
value = (node ? node.value : '') || ''
|
61
61
|
if writer.in_map?
|
62
62
|
writer.write_key_value(parent_key, value)
|
63
63
|
else
|
data/lib/abroad/version.rb
CHANGED
@@ -168,4 +168,12 @@ describe Yaml::RailsSerializer do
|
|
168
168
|
}
|
169
169
|
})
|
170
170
|
end
|
171
|
+
|
172
|
+
it 'converts nils to empty strings' do
|
173
|
+
result = serialize do
|
174
|
+
serializer.write_key_value('foo.bar', nil)
|
175
|
+
end
|
176
|
+
|
177
|
+
expect(result).to eq('fr' => { 'foo' => { 'bar' => '' } })
|
178
|
+
end
|
171
179
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abroad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|