attribute_struct 0.2.16 → 0.2.18

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: c0e791d7859e8be3556c850e185838bc7a27fa06
4
- data.tar.gz: 0cf83a94bf5f113f9c4e0d36bd5346f483fe7416
3
+ metadata.gz: 296a50061afc99819ed64be8d8c061764919143a
4
+ data.tar.gz: 653c84658406cad94a334e899678cf4c2ed211a1
5
5
  SHA512:
6
- metadata.gz: 90d8ad05ab187dd2c47371675cf28a600c88eb73555d9003af1bee26d48d8ad09e7f5d74f609787e1e4f356e6fd69446d820eef0c4f5f01ff01c196c751673b5
7
- data.tar.gz: 30d3794e724353d024317e8a50a794c92a662fccfe6544aecc4ba3bb455c29b1eb6b92cda6f698ea5bdab7d0042131588802b773afaa02bbebefcf2ba92dbc76
6
+ metadata.gz: 2748e3dce1d87b3d984b0573802fa13f02314c448cb88e7f817e4c935f630e30ef4c4ca00d86fa439396aaeb84f319e34897b763ec15ebd0acfe1eb0e41b01f8
7
+ data.tar.gz: 056717b9c002ae84792f691443b4cf7d1ff2cd5d55fa62957f1ecaa28661ca0c5736d1552395d856ba9c0e57c95196ec376b8b4bd3d43b520fa68bdec18c304e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v0.2.18
2
+ * Fix `AttributeStruct#dump!` to properly handle nil-type values
3
+
1
4
  ## v0.2.16
2
5
  * Fix regression mixed argument and block set returning second level struct
3
6
 
@@ -273,10 +273,10 @@ class AttributeStruct < BasicObject
273
273
  v.is_a?(_klass) ? v._dump : v
274
274
  end
275
275
  val = value.is_a?(::Hash) ? __hashish[*flat.flatten(1)] : flat
276
- elsif(value.is_a?(_klass))
276
+ elsif(value.is_a?(_klass) && !value.nil?)
277
277
  val = value._dump
278
278
  else
279
- val = value
279
+ val = value.nil? ? nil : value
280
280
  end
281
281
  [key, val]
282
282
  end
@@ -2,5 +2,5 @@ require 'attribute_struct/attribute_struct'
2
2
 
3
3
  class AttributeStruct
4
4
  # Current library version
5
- VERSION = ::Gem::Version.new('0.2.16')
5
+ VERSION = ::Gem::Version.new('0.2.18')
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attribute_struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Attribute structures
14
14
  email: chrisroberts.code@gmail.com
@@ -52,4 +52,3 @@ signing_key:
52
52
  specification_version: 4
53
53
  summary: Attribute structures
54
54
  test_files: []
55
- has_rdoc: