json_paths 0.0.4 → 0.0.5

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: 378041b2d0f3e8addc5323c3d53edc170c5c5fa9
4
- data.tar.gz: 334f213651826ff3e7bbf55ac7c08f622e3e6fff
3
+ metadata.gz: 26020d07baca7cda99cf1512c22bc073e571f994
4
+ data.tar.gz: a26325589844c2bcf89e60cae943e5842e59150d
5
5
  SHA512:
6
- metadata.gz: b161ab7b5e9306d63fea45abba61e88257f9d9bd04ec83e1b8bd4c677b1e121dab3014388984b0221de815dafd690bfd43bfb4798ea0d55beae9cd981bf5a8a1
7
- data.tar.gz: 115a265f4a05092852c555a1ae347a53688bf145b17c31159690375c4324664bf3fe6b9504dc7c81b38623007cdf55ced53d2a6cc8d0a14800672da66129bb8a
6
+ metadata.gz: 535e6d578af9b6b5e74202aa4ada0490eedcb40d93135eb7e4daa6b22840ac37881fbb1e2cba17f4103e7854e90ebadec05f0bf53e63e8af10f02a15825f8be4
7
+ data.tar.gz: a0d6f83570d93cf49e2ed3822a4d656b1d0e64581cfbc0ba67bb41c8004a069f0c52e9f68d2ee5bca878bd724c6c2fa4162e8120a0ff20d0d94d441ad2e444dd
data/README.md CHANGED
@@ -27,7 +27,7 @@ JsonPaths.new(json).map { |path| path }
27
27
 
28
28
  ## Contributing
29
29
 
30
- 1. Fork it ( http://github.com/<my-github-username>/json_paths/fork )
30
+ 1. Fork it ( http://github.com/guitsaru/json_paths/fork )
31
31
  2. Create your feature branch (`git checkout -b my-new-feature`)
32
32
  3. Commit your changes (`git commit -am 'Add some feature'`)
33
33
  4. Push to the branch (`git push origin my-new-feature`)
@@ -34,7 +34,10 @@ class JsonPaths
34
34
 
35
35
  if value.respond_to?(:keys)
36
36
  value.each_key do |k|
37
- paths_for_key << key_to_path(value, k).map { |ktp| key + "." + ktp }
37
+ paths_for_key << key_to_path(value, k).map do |ktp|
38
+ ktp = ktp.first unless ktp.is_a?(String)
39
+ key + "." + ktp
40
+ end
38
41
  end
39
42
  elsif value.respond_to?(:each_with_index)
40
43
  value.each_with_index do |v,i|
@@ -1,3 +1,3 @@
1
1
  class JsonPaths
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_paths
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Pruitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-04 00:00:00.000000000 Z
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler