Skip to content
This repository was archived by the owner on Mar 10, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
2d44300
Update env path, since /usr/local/env not always availalbe
yangdong Dec 5, 2013
8ad7c74
Path join feature added
Dec 14, 2013
06e855c
Detect unmatched brackets
knu Jul 2, 2015
680c53a
Merge pull request #33 from knu/bracket_matching
joshbuddy Jul 10, 2015
ddad513
Merge pull request #27 from mrkamel/join_feature
joshbuddy Jul 10, 2015
f76b757
Merge pull request #26 from yangdong/patch-1
joshbuddy Jul 10, 2015
792ff9a
Bump version
joshbuddy Jul 10, 2015
e5f91f7
Added possibility to watch over the current node in sub query. For ex…
Sep 29, 2015
9295a80
Merge branch 'deep_sub_query'
Sep 29, 2015
216656c
getting empty array if no matches
Sep 29, 2015
50c44ab
Merge branch 'deep_sub_query'
Sep 29, 2015
6458af8
Replacing match empty data with empty array is usless, removed replac…
Sep 29, 2015
3999b57
Lost the symbol existance check for method evals, it's back again
Sep 29, 2015
721528d
written test for the deep search filter
Oct 29, 2015
de76dfb
Fixed bug when filtering using hash accessor like $..[?(@['price'] < …
Oct 30, 2015
b82317a
Merge pull request #35 from PositiveAlex/master
joshbuddy Nov 9, 2015
248826c
Bump version
joshbuddy Nov 9, 2015
e4474e0
Example should be < 10, not < 20
joshbuddy Dec 9, 2015
a605269
A lot of refactoring and addresses pull #39 and #41. (#46)
Skarlso May 2, 2017
2299e9f
add simplecov test coverage
May 2, 2017
b975386
Merge pull request #47 from Cosaquee/feature/add-test-coverage
Skarlso May 2, 2017
b159dbf
Just a regular Readme Update.
Skarlso May 2, 2017
fd086ad
Merge pull request #48 from Skarlso/readme-update
Skarlso May 3, 2017
100f3b4
Support '@' and '$' as part of member names
Nov 20, 2013
2d5ada5
Merge pull request #25 from pezra/sigils-in-member-names
Skarlso May 4, 2017
839d943
Closes #49
Skarlso May 7, 2017
6bec446
Merge pull request #50 from joshbuddy/conditional_operators
Skarlso May 7, 2017
44e1d80
Fix for #52
Skarlso May 9, 2017
3ed0d4b
Merge pull request #53 from joshbuddy/52_float_value
Skarlso May 9, 2017
a266c08
Eliminating the use of eval step by step (#55)
Skarlso May 26, 2017
021c1bc
Fix dig (#56)
Skarlso May 29, 2017
38c5c9c
Fixed #57. (#58)
Skarlso Jun 10, 2017
2446785
Bumped version. (#60)
Skarlso Jun 14, 2017
744d8cf
Fixed delete with index as delete. Closes #61 (#62)
Skarlso Aug 4, 2017
6691a47
Bumped version.
Skarlso Aug 4, 2017
afcec9a
Closes #63 (#64)
Skarlso Aug 11, 2017
f3a1dca
Bumped version.
Skarlso Aug 11, 2017
09795f4
Closes #67 (#68)
Skarlso Oct 1, 2017
8caab76
Version bump for bugfix.
Skarlso Oct 1, 2017
aa641cd
Filter with underscore (#71)
carld Oct 27, 2017
c222c50
Removing trailing and leading parentheses rather than nuking everythi…
Skarlso Oct 27, 2017
0cc948f
Bumped version for release.
Skarlso Oct 27, 2017
d8e2436
Added regex parser (#75)
maniodev Jan 2, 2018
3857997
Bumped version.
Skarlso Jan 2, 2018
4d53500
Added boolean flag test. (#78)
Skarlso Feb 8, 2018
bcc6c61
Fix regession reported in #79 (#80)
Skarlso May 12, 2018
f6475b0
Bumped version.
Skarlso May 12, 2018
8fc1874
Slowly fixing the regression. (#81)
Skarlso May 13, 2018
bc0ae7a
Bumped version.
Skarlso May 13, 2018
7222715
Regression fixing for issue: #83 #82. (#85)
Skarlso Jun 8, 2018
a1a4efe
Updated version for bug fix release.
Skarlso Jun 8, 2018
dbacecb
Support returning null for missing leaves in a path (#86)
Seikitsu Jun 13, 2018
65ee068
Fixed using root element as matcher. (#87)
Skarlso Jun 14, 2018
74a5a5b
Bumped version.
Skarlso Jun 14, 2018
e2d2e8a
Fixed a problem where deleting slices was not working. (#90)
Skarlso Jul 8, 2018
9ef512e
Updated version.
Skarlso Jul 8, 2018
e94b452
Delete elements with path (#95)
Skarlso Aug 27, 2018
613b2fd
Bumped version.
Skarlso Aug 27, 2018
dbd0f13
Fix quote in value. Closes #96 (#97)
Skarlso Oct 15, 2018
2064e09
Bumped version.
Skarlso Oct 15, 2018
d9522fa
Fixing curly brackets not allowed in root element name. (#99)
Skarlso Oct 30, 2018
19cdda1
Bumped version to release fix.
Skarlso Oct 30, 2018
7172d65
Allow for symbolizing result array by passing on value for on. (#101)
Skarlso Dec 3, 2018
8ab6e6f
Bumped version to release fix.
Skarlso Dec 3, 2018
2e6fdcc
End index in array slicing should be exclusive (#103)
khairihafsham Dec 6, 2018
897dc59
Bumped version to release.
Skarlso Dec 6, 2018
2b77fba
Fix bug related to nested groupings (#104)
johnallen3d Jan 7, 2019
fd06d86
Bumped version for release.
Jan 7, 2019
f91f82f
Fix proper handling of nested groups (#106)
Skarlso Jan 20, 2019
8dbe341
Bumped version to release.
Skarlso Jan 20, 2019
b2525b8
Added a user friendly error message (#107)
Skarlso Jan 25, 2019
1b6bf61
add support for `!=` filter (#109)
doits May 14, 2019
f8d8c8c
Support dot notation in filters (#111)
doits May 14, 2019
3e1861a
Support traversing ruby objects (#112)
doits May 16, 2019
024e0ec
Bumped version for release.
May 16, 2019
0b7a4b2
Handle nested json elements by indexing the filter. (#113)
Skarlso May 26, 2019
54e031b
Bumped for release.
Skarlso May 26, 2019
16cfe87
Selecting multiple keys/values (#114)
Skarlso Jun 3, 2019
17a03e9
Only check respond_to in case we are not dealing with a built in type…
Skarlso Oct 14, 2019
56c2fd0
Increased version for new release.
Oct 15, 2019
39a8423
Apparently after 2.6 this error is no longer raised (#131)
Nov 18, 2020
ccfb39b
drop support for EOL rubies (#130)
grosser Nov 18, 2020
7ec50e6
remove to_regex dependency and the warnings it causes (#128)
grosser Nov 18, 2020
8e2c4af
Bumped version for release
Nov 18, 2020
64f919a
split regex tests and add %r (#132)
grosser Nov 19, 2020
85c8b15
Update .travis.yml (#133)
gogainda Nov 27, 2020
fb73c17
Closes #134 (#135)
Skarlso Dec 15, 2020
a5983ba
bumped version and added ignore
Skarlso Dec 15, 2020
f9ab9d4
Factorize `dig` logic ; add a few options ; more tests ; fix README (…
blambeau Dec 28, 2020
5fc71cc
bumped version for release
Skarlso Dec 28, 2020
3ea11b0
update json_path.rb
mohanapriya2308 May 15, 2021
b1b2f71
test cases
mohanapriya2308 May 15, 2021
5855ee5
Update README.md
mohanapriya2308 May 15, 2021
f9535a1
test case update
mohanapriya2308 May 20, 2021
b0d0c40
referencing self in the methods
mohanapriya2308 May 20, 2021
3126545
dummy commit
mohanapriya2308 May 20, 2021
c92b65d
update *.gemspec
mohana-rengasamy Jun 21, 2021
b4b765b
Revert "update *.gemspec"
mohana-rengasamy Jun 21, 2021
60f2152
dummy commit
mohanapriya2308 Jun 21, 2021
7c08124
Update jsonpath.gemspec
mohanapriya2308 Jun 21, 2021
8fd2cc5
replace travis with github workflow for test CI
notEthan Jan 21, 2022
a247799
Merge pull request #140 from notEthan/ci
joshbuddy Jan 22, 2022
0e4c7ba
Add Option to configure max_nesting
bk-chovatiya Mar 8, 2022
1081648
Fix Test
bk-chovatiya Mar 11, 2022
083d858
bug #144: dn not convert expressions (eg. "@.isTrue") to alternate re…
gongfarmer Apr 23, 2022
add40df
bug #145: when evaluating compound expressions, convert sub-expressio…
gongfarmer Apr 23, 2022
a5939a6
Merge pull request #146 from gongfarmer/compound_query_fixes
joshbuddy Apr 23, 2022
f3521af
Merge pull request #142 from bk-chovatiya/max-nesting
joshbuddy Apr 23, 2022
e773c2e
Merge pull request #138 from mohanapriya2308/master
joshbuddy Apr 23, 2022
0cc23fa
Bump version
joshbuddy Apr 23, 2022
6f3f441
bug #147: stop at character '!' when scanning key name, to avoid cons…
gongfarmer Apr 24, 2022
17aafb0
Merge pull request #148 from gongfarmer/master
joshbuddy Apr 24, 2022
7fe0e55
Remove rubocop for now
joshbuddy Apr 24, 2022
a023208
Merge pull request #150 from joshbuddy/remove-rubocop-temporarily
joshbuddy Apr 24, 2022
26f6570
Bump version to 1.1.2
joshbuddy Apr 24, 2022
c7d7f6b
skip when node size is zero
a5-stable Mar 26, 2023
b526cdc
fix hanging on LF character
ipost Mar 31, 2023
268c672
Jsonpath with keyname $ not working
anuravi98 May 1, 2023
9eb3d04
Merge pull request #157 from anuravi98/master
joshbuddy May 9, 2023
6a3f044
Merge pull request #155 from ipost/master
joshbuddy May 9, 2023
9068f9b
Merge pull request #154 from a5-stable/aviod-zero-division-error
joshbuddy May 9, 2023
2c7cea8
Fix method typo
joshbuddy May 9, 2023
804a5af
Handle any failure to match a token
joshbuddy May 9, 2023
4e31ac9
Bump version
joshbuddy May 9, 2023
bae8ab0
Update enumerable.rb
mohanapriya2308 May 15, 2023
aa2868c
Update enumerable.rb
mohanapriya2308 May 15, 2023
7aa2052
filter elements with unknown key
mohanapriya2308 May 15, 2023
7228506
Update test_jsonpath.rb
mohanapriya2308 May 15, 2023
647829b
dummy commit
mohanapriya2308 May 15, 2023
695630c
Update test.yml
mohanapriya2308 May 15, 2023
c16dc73
Merge pull request #1 from mohanapriya2308/mohanapriya2308-patch-1
mohanapriya2308 May 15, 2023
b524dee
nesting of 101 too deep
anupama-kumari Jul 5, 2023
da4e1dc
test cases
anupama-kumari Jul 5, 2023
50d0bbf
other test cases
anupama-kumari Jul 5, 2023
0225e64
Update member name regexp to support UTF8 alphabetic and numeric char…
jgoodw1n Sep 6, 2023
c0e0640
Update member name regexp to allow spaces
jgoodw1n Sep 12, 2023
db362cd
Merge pull request #159 from mohanapriya2308/master
joshbuddy Sep 27, 2023
2a1fe15
Merge pull request #160 from anupama-kumari/ak_nesting_too_deep
joshbuddy Sep 27, 2023
b6da998
Merge pull request #164 from jgoodw1n/umlauts-in-member-names
joshbuddy Sep 27, 2023
34ab4f3
Drop 2.5
joshbuddy Sep 27, 2023
3102fb3
Bump to 1.1.4
joshbuddy Sep 27, 2023
139787e
symbolize_keys option doesn't work as the README says
anupama-kumari Oct 10, 2023
b8bd29f
test sample correction
anupama-kumari Oct 10, 2023
96210e5
Merge pull request #165 from anupama-kumari/master
joshbuddy Oct 12, 2023
725f187
Bump version to 1.1.5
joshbuddy Oct 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: test
on:
- push
- pull_request
jobs:
test:
strategy:
fail-fast: false
matrix:
ruby-version:
- '2.6'
- '2.7'
- '3.2'
- '3.1'
- '3.0'
- ruby-head
- jruby-head
- truffleruby-head
runs-on:
- ubuntu-latest

runs-on: ${{ matrix.runs-on }}

steps:

- uses: actions/checkout@v2

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- run: bundle exec rake test
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ Gemfile.lock
coverage/*
doc/*
.yardoc
.DS_Store
.idea
vendor
.tags
*.gem
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inherit_from: .rubocop_todo.yml
127 changes: 127 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-01-25 09:23:04 +0100 using RuboCop version 0.63.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 15
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
- 'lib/jsonpath.rb'
- 'lib/jsonpath/parser.rb'

# Offense count: 1
Lint/IneffectiveAccessModifier:
Exclude:
- 'lib/jsonpath.rb'

# Offense count: 17
Metrics/AbcSize:
Max: 60

# Offense count: 2
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 37

# Offense count: 1
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 4

# Offense count: 3
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 739

# Offense count: 7
Metrics/CyclomaticComplexity:
Max: 20

# Offense count: 26
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 52

# Offense count: 1
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 6

# Offense count: 6
Metrics/PerceivedComplexity:
Max: 21

# Offense count: 1
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at, ip, db
Naming/UncommunicativeMethodParamName:
Exclude:
- 'lib/jsonpath/parser.rb'

# Offense count: 15
# Configuration parameters: AllowedChars.
Style/AsciiComments:
Exclude:
- 'lib/jsonpath/parser.rb'

# Offense count: 2
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/jsonpath/enumerable.rb'
- 'lib/jsonpath/proxy.rb'

# Offense count: 3
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'lib/jsonpath/enumerable.rb'
- 'lib/jsonpath/parser.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/IfUnlessModifier:
Exclude:
- 'lib/jsonpath/enumerable.rb'

# Offense count: 1
Style/MultipleComparison:
Exclude:
- 'lib/jsonpath/parser.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'lib/jsonpath/enumerable.rb'
- 'lib/jsonpath/parser.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Exclude:
- 'lib/jsonpath/parser.rb'

# Offense count: 4
# Cop supports --auto-correct.
Style/RescueModifier:
Exclude:
- 'lib/jsonpath/enumerable.rb'
- 'lib/jsonpath/parser.rb'

# Offense count: 89
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 296
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
source "http://rubygems.org"
gemspec
# frozen_string_literal: true

source 'http://rubygems.org'
gemspec
# gem 'rubocop', require: true, group: :test
gem 'simplecov', require: false, group: :test
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Joshua Lin & Gergely Brautigam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading