abroad 4.1.2 → 4.1.3

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: b46d62e7ba153afa73884e35c5bc6f1ecaa7a8e3
4
- data.tar.gz: 2b40cc7ffbff3270a2e20e66851a253e7b3fead4
3
+ metadata.gz: 8f814fbe28b3a7cc583852c28b409cb1af6fae4d
4
+ data.tar.gz: 1e3a91d89598201db9b378884caabda6bca16918
5
5
  SHA512:
6
- metadata.gz: 89b758b0a1bb58e8a0242e1f9f8ce5213981ba338bdd7255e4fe6f7b9afb2c9a2138f35de3da6b291b7c9e90ee0168af42979571072e4662a9a6ed0b32e7b358
7
- data.tar.gz: 7708f3064b712244753192b8dfa2e19f11b7c05270e0e51c3b0c68825b4f76bd276e91a1a52716aafa482d1ac9d78ebaa2656e1b2bbed59ff471467aa2619714
6
+ metadata.gz: ed65796bcf2919b65b0379899a5b09e37be18fa5a510344a83b6eb3e11ddb2b9734a58578ce4f248a037208ea437596899f4d7b8b53cf427d7b19a9d9b77bf35
7
+ data.tar.gz: 57f8ef7d24417e3bc58c3271452a35a4d744bd81ae453539d66324c58cf77e9b3ea5337e74f05683eb632ca99fd9f58b38f93ed7e42ab816ff6d2e72db674b39
@@ -93,7 +93,7 @@ module Abroad
93
93
  end
94
94
 
95
95
  def write_value(node, parent_key)
96
- value = coerce((node ? node.value : '') || '')
96
+ value = coerce(node ? node.value : '')
97
97
 
98
98
  if writer.in_map?
99
99
  writer.write_key_value(parent_key, value)
@@ -1,3 +1,3 @@
1
1
  module Abroad
2
- VERSION = '4.1.2'
2
+ VERSION = '4.1.3'
3
3
  end
@@ -30,4 +30,18 @@ describe Abroad::Extractors::Yaml::DottedKeyExtractor do
30
30
  'foo.bar.0.baz' => 'boo'
31
31
  )
32
32
  end
33
+
34
+ it 'handles nils' do
35
+ content = YAML.dump(foo: nil)
36
+ extractor = Abroad::Extractors::Yaml::DottedKeyExtractor.from_string(content)
37
+ enum = extractor.extract_each
38
+
39
+ phrases = enum.with_object({}) do |(key, value), ret|
40
+ ret[key] = value
41
+ end
42
+
43
+ expect(phrases).to eq(
44
+ 'foo' => nil
45
+ )
46
+ end
33
47
  end
@@ -228,12 +228,4 @@ describe Abroad::Serializers::Yaml::RailsSerializer do
228
228
  }
229
229
  })
230
230
  end
231
-
232
- it 'converts nils to empty strings' do
233
- result = serialize do
234
- serializer.write_key_value('foo.bar', nil)
235
- end
236
-
237
- expect(result).to eq('fr' => { 'foo' => { 'bar' => '' } })
238
- end
239
231
  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: 4.1.2
4
+ version: 4.1.3
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-08-09 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  version: '0'
182
182
  requirements: []
183
183
  rubyforge_project:
184
- rubygems_version: 2.2.3
184
+ rubygems_version: 2.6.6
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: A set of parsers and serializers for dealing with localization file formats.