jsonpath 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a93fe71b722f53a4e02e2ea53e98a98acb281f09
4
- data.tar.gz: afad26b3e7d0ff73db16afe367103562fc3324f8
2
+ SHA256:
3
+ metadata.gz: '090827e0ad9fbdb81bf8a03fbd783b3ec6791fe75f272f34a867d4230941acbc'
4
+ data.tar.gz: 1590a5a7c869b86f6c8f9cd2f6fc356fffb7d1456012adbdcd1c39a2cad08ca3
5
5
  SHA512:
6
- metadata.gz: e680652eaffb4d056c69038cf3abceaebc94c37de6f987aa2e0923c65bd9c7ff3c0609ce6fcbcafa0a2406ca333318d4353bbe2920c5df4d6e13820c9f49e237
7
- data.tar.gz: 10f6f6dd70bc861974141cb9c8eff68f3da85958ca5efc8df98679ce291bb0788c997156180b5231b37f7d36f2e9caba1bbcfb87dfcf2fb7a3b3f24d49410d29
6
+ metadata.gz: 46e38791ff5794763c762360b7721944f283c32f317e10e046171c6a57b40afb62b0f9cc5db924f52a95b2135b248a8e055a7da08341b95641dc38fec3e8b26f
7
+ data.tar.gz: 52e95058cf0373fc98c3773585542960bd3a1cac2f13e3b038820cc6c91311f165441a2aa80644c20ad60be1c9c04cb17b5dfd79c8307e7a70627969aabe7c90
@@ -4,3 +4,6 @@ rvm:
4
4
  - 2.3.1
5
5
  - ruby-head
6
6
  - jruby-head
7
+
8
+ before_install:
9
+ - gem install bundler -v '< 2'
@@ -47,7 +47,7 @@ class JsonPath
47
47
  elsif t == 'false'
48
48
  false
49
49
  else
50
- operator.strip == '=~' ? t.to_regexp : t.gsub(%r{^'|'$}, '').strip
50
+ operator.to_s.strip == '=~' ? t.to_regexp : t.gsub(%r{^'|'$}, '').strip
51
51
  end
52
52
  elsif t = scanner.scan(/\/\w+\//)
53
53
  elsif t = scanner.scan(/.*/)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class JsonPath
4
- VERSION = '0.9.8'.freeze
4
+ VERSION = '0.9.9'.freeze
5
5
  end
@@ -84,6 +84,11 @@ class TestJsonpath < MiniTest::Unit::TestCase
84
84
  assert_equal [@object['store']['book'][1]], JsonPath.new("$..book[?(@['price'] < 23 && @['price'] > 9)]").on(@object)
85
85
  end
86
86
 
87
+ def test_nested_grouping
88
+ path = "$..book[?((@['price'] == 19 && @['author'] == 'Herman Melville') || @['price'] == 23)]"
89
+ assert_equal [@object['store']['book'][3]], JsonPath.new(path).on(@object)
90
+ end
91
+
87
92
  def test_eval_with_floating_point_and_and
88
93
  assert_equal [@object['store']['book'][1]], JsonPath.new("$..book[?(@['price'] < 23.0 && @['price'] > 9.0)]").on(@object)
89
94
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonpath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hull
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-12-06 00:00:00.000000000 Z
12
+ date: 2019-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
@@ -158,8 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubyforge_project: jsonpath
162
- rubygems_version: 2.6.13
161
+ rubygems_version: 3.0.2
163
162
  signing_key:
164
163
  specification_version: 4
165
164
  summary: Ruby implementation of http://goessner.net/articles/JsonPath/