jmespath 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jmespath might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4498ed69dc541e13ec1b682b754419a7ea88aa7d
4
- data.tar.gz: c98d5347758fe4eb6418b1f15a0b253f4a903e88
3
+ metadata.gz: c8820ed17e6f9787ede5e1dd38a89919a25f33c6
4
+ data.tar.gz: d659228a88a0e06bc4808291ce158b6764fab47d
5
5
  SHA512:
6
- metadata.gz: a81a6a8994b7fa722a8dc77f70ac5ee43c1799a756046ebd4b44f29a31c0a5e7a269df180163b2c83925ca78593025172a73ad059cc5326ceabaa5ff15d7d9fa
7
- data.tar.gz: ad285ecab333df630843157cc6c5c93be080152cd84efcb79fe44108bbff17adc2ef437cb9e22aa2ffd7eca36151b69f35c33ba68036dc01f51840af8a952d07
6
+ metadata.gz: 64f48b9e2eb981b36963bb508f22d6637f3f53de11766e0e4d27b0bc39f109ec09371bf9591d9564241bde85d121a210032d3ddb3e9cea356917075677e52822
7
+ data.tar.gz: dd5233ed7508f33e7b527b1b3c13d7789439274dda656136bfa8775c6780aa2e46704dab79cb5dbee6000ab6baf3545d8e2ed50aad99a0186cde85a9603f827f
@@ -21,10 +21,11 @@ module JMESPath
21
21
  case node[:type]
22
22
 
23
23
  when :field
24
+ # hash_like?
24
25
  key = node[:key]
25
26
  case value
26
27
  when Hash then value.key?(key) ? value[key] : value[key.to_sym]
27
- when Struct then value[key]
28
+ when Struct then value.respond_to?(key) ? value[key] : nil
28
29
  else nil
29
30
  end
30
31
 
@@ -1,3 +1,3 @@
1
1
  module JMESPath
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jmespath
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Rowe