super_serialize 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffb0fc6a6ee999a3eae3cc4c757e4514b0a890f4
4
- data.tar.gz: 919cfc6f7ea3ddbb37618f6d1faa02c8ef46be80
3
+ metadata.gz: 01786a69a2421f173b5caaca4c5545f94b6c6762
4
+ data.tar.gz: 3b1052d17f4d938cbd1b623458bbeb686ff343fa
5
5
  SHA512:
6
- metadata.gz: eb0ebec6718656c3ca577eb7a38d3071a54bab5fb8eba66f84ef743db2065c78d76d84bd964526821bac6fa7873755e6ad5b7044c72c46359d9bc0137fdd9706
7
- data.tar.gz: efb3b1c2af822078b80cf9f88d9e9e35b8eb7418d73507235f93f7787928687141518d001e1fc96fb4033df03bf76c106e90345208ad29239aefa70eb98ef12b
6
+ metadata.gz: 8fe2507216bd560c8ce8bad1e7c1f9fedaf555c047d43825e502abbea5c8287f9b06b8a2c01bcf4d3233481e4aa73bd39f21e39adcedde2f9b94128ca166789e
7
+ data.tar.gz: dbe429d9ae48bf5700e121088bf87ab8300262d7112ce0ed4fa08703b9acdee89005ef35251a418bfdc36160c7213357eb9164ff622fee17868c3c74752113b2
@@ -1,3 +1,3 @@
1
1
  module SuperSerialize
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  module SuperSerialize
2
2
  extend ActiveSupport::Concern
3
-
3
+
4
4
  included do
5
5
  end
6
6
 
@@ -112,6 +112,8 @@ module SuperSerialize
112
112
  value = attempt_to_sanitize_hash_syntax(value)
113
113
  elsif is_number_string_starting_with_zero?(value)
114
114
  value = value.to_yaml
115
+ elsif value == ''
116
+ value = nil
115
117
  end
116
118
  end
117
119
 
@@ -176,6 +178,9 @@ module SuperSerialize
176
178
 
177
179
  def is_valid_yaml?(value)
178
180
  begin
181
+ # YAML::load('') returns false
182
+ return true if value == ''
183
+
179
184
  !!YAML.load(value)
180
185
  rescue
181
186
  false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_serialize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Quiñones
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-06 00:00:00.000000000 Z
11
+ date: 2015-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails