json_data 0.0.1 → 0.0.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: dfadc670ce76f8ce51b9f6f7765aa3b2822a456d
4
- data.tar.gz: a9bd30009a7ed8ad6895f5e8a3c6e86a5aad5a5b
3
+ metadata.gz: 013a405e26c0e4befeaf50ae3dd3fb34ea5546f5
4
+ data.tar.gz: c7eb177173a2c5d566b475ba9f8d6db6e3dc8df7
5
5
  SHA512:
6
- metadata.gz: 748396ef7632a761505c8370e21c9a654302f13c57dc68b44ffa6ddb05e04fa9ea14adb34ff27954635ffddce99aed06796cd91d6b88e4737dbb23bcc758836b
7
- data.tar.gz: 1c4a779b3cf5898c2715eaf27f8fcb3990840e96483b2a723394fd144b972b686e8bff8e8cfc73eb14c1fdc7478dd84d6f9b7250eb27f7fc8bbcbee26ea747e4
6
+ metadata.gz: a7db9918bbf6b5403bd3d4adee3468815dfa7b25c7d9d6c4c74c4a6f843757236446754c6fc66b82e0d0aa7ff1953d7786fb9868a784bf8962a6f978dac00014
7
+ data.tar.gz: ec304fc1d9f2fca768e2bada6729d9f61d5ba94b4986a422562207e35c8ca6a63bdc9a05fee0a0b32337ed26068bf8667db0be3115956f1846951077c482d4db
Binary file
@@ -22,7 +22,7 @@ module JSONData
22
22
  end
23
23
 
24
24
  def data_source=(json)
25
- @data_source = json.is_a?(Array) ? json : JSON.parse(json)
25
+ @data_source = json.is_a?(String) ? JSON.parse(json) : json
26
26
  create_data_objects
27
27
  end
28
28
 
@@ -40,7 +40,7 @@ module JSONData
40
40
  end
41
41
 
42
42
  def data_source=(json)
43
- data_source = json.is_a?(Hash) ? json : JSON.parse(json)
43
+ data_source = json.is_a?(String) ? JSON.parse(json) : json
44
44
  @data_source = OpenStruct.new(data_source)
45
45
  end
46
46
 
@@ -1,3 +1,3 @@
1
1
  module JsonData
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Zheng
@@ -68,6 +68,7 @@ files:
68
68
  - Rakefile
69
69
  - bin/console
70
70
  - bin/setup
71
+ - json_data-0.0.1.gem
71
72
  - json_data.gemspec
72
73
  - lib/json_data.rb
73
74
  - lib/json_data/collection.rb