json_to_ruby_class 0.1.1 → 0.1.2

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: 2d4b496618f50ce3db3c2289f2b45b0b061401f3
4
- data.tar.gz: e42dbca984291f936ac947c5feee50ee9dcfb336
3
+ metadata.gz: 5e79ab780159d9945a39fe7cf39caac3a000c28a
4
+ data.tar.gz: f719b74af8acd984a12d16af3e0fbc320c819a9c
5
5
  SHA512:
6
- metadata.gz: 472017c0bb8540751f2d9501d4b3fc99e2cad8170c9cb297c863cb3ac63a02cd5ff43d9fd099a1a61159c04325d2a1a115c9543bf07d18c13b4c11d68a9669a7
7
- data.tar.gz: bcaf802d4be506ac8689fede841269badafab01c8540efde8ede556d92d945ce16b258573ec8dfd3fcbd7cb90b58b2cebec27e7c9ad859324c01712129886aba
6
+ metadata.gz: 37c14cf8e61ee28d5b745131147d636d8e25aa7c9231dbcdd41e63bec5011ed0eca61156badf7f58d66f80b0f5cd4fa756be360a34dfc3c4f41650637816683b
7
+ data.tar.gz: ed523f23f1d9092da2fbc185dfe3077277638a3ade575e5ca5b691dcf6e367dd308eef1aba4ab92dd198ac12594b56542e484dfef149393df9237344efa66870
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.2 (2016-07-12)
2
+
3
+ Bug fixes
4
+ * Don't break once given key is not a Hash or an Array.
5
+
1
6
  ## 0.1.1 (2016-07-09)
2
7
 
3
8
  Bug fixes
@@ -1,3 +1,3 @@
1
1
  module JsonToRubyClass
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -21,7 +21,9 @@ module JsonToRubyClass
21
21
  collect_info_from_json(value, constructed_model_name, existing_models_array)
22
22
  elsif value.class == Array
23
23
  value.each do |array_element|
24
- collect_info_from_json(array_element, constructed_model_name, existing_models_array)
24
+ if array_element.class == Hash || array_element.class == Array
25
+ collect_info_from_json(array_element, constructed_model_name, existing_models_array)
26
+ end
25
27
  end
26
28
  end
27
29
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_to_ruby_class
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasilis Kalligas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-09 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler