json_select 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +3 -0
- data/.travis.yml +1 -1
- data/Gemfile +1 -0
- data/README.md +52 -1
- data/Rakefile +12 -1
- data/lib/json_select/helpers/depth.rb +6 -2
- data/lib/json_select/helpers/key.rb +6 -2
- data/lib/json_select/helpers/position.rb +15 -7
- data/lib/json_select/helpers/size.rb +14 -6
- data/lib/json_select/helpers/type.rb +8 -4
- data/lib/json_select/selector.rb +47 -11
- data/lib/json_select/selector_parser.rb +179 -44
- data/lib/json_select/selector_parser.tt +9 -2
- data/lib/json_select/version.rb +1 -1
- data/spec/conformance_spec.rb +94 -38
- data/spec/fixtures/{basic_children.selector → parser/level_1/basic_children.output} +0 -0
- data/spec/fixtures/parser/level_1/basic_children.selector +1 -0
- data/spec/fixtures/{basic_combination.selector → parser/level_1/basic_combination.output} +0 -0
- data/spec/fixtures/parser/level_1/basic_combination.selector +1 -0
- data/spec/fixtures/parser/level_1/basic_first-child.output +1 -0
- data/spec/fixtures/{basic_first-child.selector → parser/level_1/basic_first-child.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_grouping.output +1 -0
- data/spec/fixtures/{basic_grouping.selector → parser/level_1/basic_grouping.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_id.output +1 -0
- data/spec/fixtures/{basic_id.selector → parser/level_1/basic_id.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_id_multiple.output +1 -0
- data/spec/fixtures/{basic_id_multiple.selector → parser/level_1/basic_id_multiple.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_id_quotes.output +1 -0
- data/spec/fixtures/{basic_id_quotes.selector → parser/level_1/basic_id_quotes.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_id_with_type.output +1 -0
- data/spec/fixtures/{basic_id_with_type.selector → parser/level_1/basic_id_with_type.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_last-child.output +1 -0
- data/spec/fixtures/{basic_last-child.selector → parser/level_1/basic_last-child.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_nth-child-2.output +1 -0
- data/spec/fixtures/{basic_nth-child-2.selector → parser/level_1/basic_nth-child-2.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_nth-child.output +1 -0
- data/spec/fixtures/{basic_nth-child.selector → parser/level_1/basic_nth-child.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_nth-last-child.output +1 -0
- data/spec/fixtures/{basic_nth-last-child.selector → parser/level_1/basic_nth-last-child.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_root_pseudo.output +1 -0
- data/spec/fixtures/{basic_root_pseudo.selector → parser/level_1/basic_root_pseudo.selector} +0 -0
- data/spec/fixtures/{basic_type.selector → parser/level_1/basic_type.output} +0 -0
- data/spec/fixtures/parser/level_1/basic_type.selector +1 -0
- data/spec/fixtures/{basic_type2.selector → parser/level_1/basic_type2.output} +0 -0
- data/spec/fixtures/parser/level_1/basic_type2.selector +1 -0
- data/spec/fixtures/parser/level_1/basic_type3.output +1 -0
- data/spec/fixtures/{basic_type3.selector → parser/level_1/basic_type3.selector} +0 -0
- data/spec/fixtures/parser/level_1/basic_universal.output +1 -0
- data/spec/fixtures/{basic_universal.selector → parser/level_1/basic_universal.selector} +0 -0
- data/spec/fixtures/parser/level_3/basic_has-sans-paren.output +1 -0
- data/spec/fixtures/parser/level_3/basic_has-sans-paren.selector +2 -0
- data/spec/fixtures/parser/level_3/basic_has-whitespace.output +1 -0
- data/spec/fixtures/parser/level_3/basic_has-whitespace.selector +3 -0
- data/spec/fixtures/parser/level_3/basic_has.output +1 -0
- data/spec/fixtures/parser/level_3/basic_has.selector +1 -0
- data/spec/parser_spec.rb +52 -0
- metadata +123 -148
- data/spec/fixtures/README.md +0 -14
- data/spec/fixtures/alltests.txt +0 -31
- data/spec/fixtures/basic.json +0 -31
- data/spec/fixtures/basic.xml +0 -31
- data/spec/fixtures/basic_children.ast +0 -14
- data/spec/fixtures/basic_children.output +0 -1
- data/spec/fixtures/basic_combination.ast +0 -13
- data/spec/fixtures/basic_combination.output +0 -1
- data/spec/fixtures/basic_first-child.ast +0 -11
- data/spec/fixtures/basic_first-child.output +0 -2
- data/spec/fixtures/basic_grouping.ast +0 -22
- data/spec/fixtures/basic_grouping.output +0 -4
- data/spec/fixtures/basic_id.ast +0 -7
- data/spec/fixtures/basic_id.output +0 -1
- data/spec/fixtures/basic_id_multiple.ast +0 -7
- data/spec/fixtures/basic_id_multiple.output +0 -3
- data/spec/fixtures/basic_id_quotes.ast +0 -7
- data/spec/fixtures/basic_id_quotes.output +0 -2
- data/spec/fixtures/basic_id_with_type.ast +0 -10
- data/spec/fixtures/basic_id_with_type.output +0 -1
- data/spec/fixtures/basic_last-child.ast +0 -11
- data/spec/fixtures/basic_last-child.output +0 -2
- data/spec/fixtures/basic_nth-child-2.ast +0 -11
- data/spec/fixtures/basic_nth-child-2.output +0 -4
- data/spec/fixtures/basic_nth-child.ast +0 -11
- data/spec/fixtures/basic_nth-child.output +0 -3
- data/spec/fixtures/basic_nth-last-child.ast +0 -11
- data/spec/fixtures/basic_nth-last-child.output +0 -2
- data/spec/fixtures/basic_root_pseudo.ast +0 -6
- data/spec/fixtures/basic_root_pseudo.output +0 -31
- data/spec/fixtures/basic_type.ast +0 -7
- data/spec/fixtures/basic_type.output +0 -14
- data/spec/fixtures/basic_type2.ast +0 -7
- data/spec/fixtures/basic_type2.output +0 -1
- data/spec/fixtures/basic_type3.ast +0 -7
- data/spec/fixtures/basic_type3.output +0 -47
- data/spec/fixtures/basic_universal.ast +0 -5
- data/spec/fixtures/basic_universal.output +0 -86
@@ -63,7 +63,8 @@ grammar JSONSelectSelector
|
|
63
63
|
# ;
|
64
64
|
rule pseudo
|
65
65
|
( ':' a:pseudo_class_name <JSONSelect::Ast::PseudoSelector> ) /
|
66
|
-
( ':' a:
|
66
|
+
( ':' a:positional_pseudo_function_name ws* '(' ws* e:expression ws* ')' <JSONSelect::Ast::PseudoSelector> ) /
|
67
|
+
( ':' a:subselector_pseudo_function_name ws* '(' ws* s:selectors_group ws* ')' <JSONSelect::Ast::PseudoSelector> )
|
67
68
|
end
|
68
69
|
|
69
70
|
# pseudo_class_name
|
@@ -74,10 +75,16 @@ grammar JSONSelectSelector
|
|
74
75
|
|
75
76
|
# pseudo_function_name
|
76
77
|
# : `nth-child` | `nth-last-child`
|
77
|
-
rule
|
78
|
+
rule positional_pseudo_function_name
|
78
79
|
'nth-child' / 'nth-last-child'
|
79
80
|
end
|
80
81
|
|
82
|
+
# pseudo_function_name
|
83
|
+
# : `nth-child` | `nth-last-child`
|
84
|
+
rule subselector_pseudo_function_name
|
85
|
+
'has'
|
86
|
+
end
|
87
|
+
|
81
88
|
# expression
|
82
89
|
# /* expression is and of the form "an+b" */
|
83
90
|
# : TODO
|
data/lib/json_select/version.rb
CHANGED
data/spec/conformance_spec.rb
CHANGED
@@ -1,55 +1,111 @@
|
|
1
1
|
describe "JSONSelect", "conformance" do
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
selectors = Dir[File.expand_path(selectors, __FILE__)]
|
3
|
+
p_levels = "../fixtures/conformance/level_*"
|
4
|
+
p_groups = "{basic}.json"
|
6
5
|
|
7
|
-
|
6
|
+
levels = {}
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
8
|
+
d = Dir[File.expand_path(p_levels, __FILE__)]
|
9
|
+
d.each do |dir|
|
10
|
+
level = (levels[File.basename(dir)] = {})
|
13
11
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
d = Dir[File.expand_path(p_groups, dir)]
|
13
|
+
d.each do |json|
|
14
|
+
gname = File.basename(json, '.json')
|
15
|
+
group = (level[gname] = {})
|
16
|
+
group[:json] = json
|
19
17
|
|
20
|
-
|
18
|
+
d = Dir[File.expand_path("../#{gname}_*.selector", json)]
|
19
|
+
d.each do |selector|
|
20
|
+
name = File.basename(selector, '.selector').split('_', 2).last
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
end
|
22
|
+
group[name] = [selector,
|
23
|
+
File.expand_path("../#{gname}_#{name}.output", selector)]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
28
|
+
levels.each do |level, groups|
|
29
|
+
describe "(#{level})" do
|
30
|
+
groups.each do |group, tests|
|
31
|
+
describe "(#{group})" do
|
32
|
+
input_p = tests.delete(:json)
|
35
33
|
|
36
|
-
|
37
|
-
|
38
|
-
e = []
|
39
|
-
Yajl::Parser.parse(File.read(output)) { |o| e << o }
|
40
|
-
s.match(input).should == e.first
|
34
|
+
let(:input) do
|
35
|
+
Yajl::Parser.parse(File.read(input_p))
|
41
36
|
end
|
42
37
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
38
|
+
tests.each do |test, (selector_p, output_p)|
|
39
|
+
describe "(#{test})" do
|
40
|
+
|
41
|
+
let(:selector) do
|
42
|
+
File.read(selector_p)
|
43
|
+
end
|
49
44
|
|
45
|
+
let(:output) do
|
46
|
+
o = File.read(output_p)
|
47
|
+
o.sub! /^172$/, "172\n\"ignored object\""
|
48
|
+
|
49
|
+
e = []
|
50
|
+
Yajl::Parser.parse(o) { |o| e << o }
|
51
|
+
e
|
52
|
+
end
|
53
|
+
|
54
|
+
it "finds all matching children" do
|
55
|
+
JSONSelect(selector).matches(input).should == output
|
56
|
+
end
|
57
|
+
|
58
|
+
it "finds the first matching child" do
|
59
|
+
JSONSelect(selector).match(input).should == output.first
|
60
|
+
end
|
61
|
+
|
62
|
+
it "can correctly test the object" do
|
63
|
+
JSONSelect(selector).test(input).should be_true
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
50
68
|
end
|
51
69
|
end
|
52
|
-
|
53
70
|
end
|
54
71
|
end
|
72
|
+
|
73
|
+
# %w( basic ).each do |test|
|
74
|
+
# selectors = "../fixtures/#{test}_*.selector"
|
75
|
+
# selectors = Dir[File.expand_path(selectors, __FILE__)]
|
76
|
+
#
|
77
|
+
# describe "(#{test})" do
|
78
|
+
#
|
79
|
+
# let(:input) do
|
80
|
+
# path = File.expand_path("../fixtures/#{test}.json", __FILE__)
|
81
|
+
# Yajl::Parser.parse(File.read(path))
|
82
|
+
# end
|
83
|
+
#
|
84
|
+
# selectors.each do |selector|
|
85
|
+
# basename = File.basename(selector, '.selector')
|
86
|
+
# name = basename[(test.size + 1)..-1]
|
87
|
+
# output = File.expand_path("../fixtures/#{basename}.output", __FILE__)
|
88
|
+
# # ast = File.expand_path("../fixtures/#{basename}.ast", __FILE__)
|
89
|
+
# selector_o = File.expand_path("../fixtures/#{basename}.selector.out", __FILE__)
|
90
|
+
#
|
91
|
+
# describe "(#{name})" do
|
92
|
+
#
|
93
|
+
# # it "parses the selector" do
|
94
|
+
# # ast = Yajl::Parser.parse(File.read(ast))
|
95
|
+
# # s = JSONSelect(File.read(selector).strip)
|
96
|
+
# # s.should be_a(JSONSelect)
|
97
|
+
# # Yajl::Parser.parse(Yajl::Encoder.encode(s.ast)).should == ast
|
98
|
+
# # end
|
99
|
+
#
|
100
|
+
# # it "produces the correct selector" do
|
101
|
+
# # s = JSONSelect(File.read(selector).strip)
|
102
|
+
# # e = File.read(selector_o)
|
103
|
+
# # s.to_s.should == e
|
104
|
+
# # end
|
105
|
+
#
|
106
|
+
# end
|
107
|
+
# end
|
108
|
+
#
|
109
|
+
# end
|
110
|
+
# end
|
55
111
|
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
.name > .first
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
.name .first
|
@@ -0,0 +1 @@
|
|
1
|
+
string:nth-child(0n1)
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
string.level, number
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
.favoriteColor
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
.language
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
.weight
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
string.favoriteColor
|
data/spec/fixtures/{basic_id_with_type.selector → parser/level_1/basic_id_with_type.selector}
RENAMED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
string:nth-last-child(0n1)
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
string:nth-child(-1n2)
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
string:nth-child(2n1)
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
string:nth-last-child(0n1)
|
data/spec/fixtures/{basic_nth-last-child.selector → parser/level_1/basic_nth-last-child.selector}
RENAMED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
:root
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
string
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
number
|
@@ -0,0 +1 @@
|
|
1
|
+
object
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
*
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: missing closing paren
|
@@ -0,0 +1 @@
|
|
1
|
+
object:has(.language)
|
@@ -0,0 +1 @@
|
|
1
|
+
object:has(.language)
|
@@ -0,0 +1 @@
|
|
1
|
+
object:has(.language)
|
data/spec/parser_spec.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
describe "JSONSelect", "parser" do
|
2
|
+
|
3
|
+
p_levels = "../fixtures/parser/level_*"
|
4
|
+
p_groups = %w( basic )
|
5
|
+
|
6
|
+
levels = {}
|
7
|
+
|
8
|
+
d = Dir[File.expand_path(p_levels, __FILE__)]
|
9
|
+
d.each do |dir|
|
10
|
+
level = (levels[File.basename(dir)] = {})
|
11
|
+
|
12
|
+
p_groups.each do |gname|
|
13
|
+
json = File.expand_path(gname, dir)
|
14
|
+
group = (level[gname] = {})
|
15
|
+
|
16
|
+
d = Dir[File.expand_path("../#{gname}_*.selector", json)]
|
17
|
+
d.each do |selector|
|
18
|
+
name = File.basename(selector, '.selector').split('_', 2).last
|
19
|
+
|
20
|
+
group[name] = [selector,
|
21
|
+
File.expand_path("../#{gname}_#{name}.output", selector)]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
levels.each do |level, groups|
|
27
|
+
describe "(#{level})" do
|
28
|
+
groups.each do |group, tests|
|
29
|
+
describe "(#{group})" do
|
30
|
+
tests.each do |test, (selector_p, output_p)|
|
31
|
+
describe "(#{test})" do
|
32
|
+
|
33
|
+
let(:selector) do
|
34
|
+
File.read(selector_p)
|
35
|
+
end
|
36
|
+
|
37
|
+
let(:output) do
|
38
|
+
File.read(output_p)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "produces the correct selector" do
|
42
|
+
JSONSelect(selector).to_s.should == output
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
metadata
CHANGED
@@ -1,40 +1,41 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_select
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.4
|
4
5
|
prerelease:
|
5
|
-
version: 0.1.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Simon Menke
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: treetop
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
25
22
|
type: :runtime
|
26
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
27
30
|
description: JSONSelect implementation for Ruby
|
28
|
-
email:
|
31
|
+
email:
|
29
32
|
- simon.menke@gmail.com
|
30
33
|
executables: []
|
31
|
-
|
32
34
|
extensions: []
|
33
|
-
|
34
35
|
extra_rdoc_files: []
|
35
|
-
|
36
|
-
files:
|
36
|
+
files:
|
37
37
|
- .gitignore
|
38
|
+
- .gitmodules
|
38
39
|
- .travis.yml
|
39
40
|
- Gemfile
|
40
41
|
- LICENSE
|
@@ -63,147 +64,121 @@ files:
|
|
63
64
|
- lib/json_select/selector_parser.tt
|
64
65
|
- lib/json_select/version.rb
|
65
66
|
- spec/conformance_spec.rb
|
66
|
-
- spec/fixtures/
|
67
|
-
- spec/fixtures/
|
68
|
-
- spec/fixtures/
|
69
|
-
- spec/fixtures/
|
70
|
-
- spec/fixtures/
|
71
|
-
- spec/fixtures/
|
72
|
-
- spec/fixtures/
|
73
|
-
- spec/fixtures/
|
74
|
-
- spec/fixtures/
|
75
|
-
- spec/fixtures/
|
76
|
-
- spec/fixtures/
|
77
|
-
- spec/fixtures/
|
78
|
-
- spec/fixtures/
|
79
|
-
- spec/fixtures/
|
80
|
-
- spec/fixtures/
|
81
|
-
- spec/fixtures/
|
82
|
-
- spec/fixtures/
|
83
|
-
- spec/fixtures/
|
84
|
-
- spec/fixtures/
|
85
|
-
- spec/fixtures/
|
86
|
-
- spec/fixtures/
|
87
|
-
- spec/fixtures/
|
88
|
-
- spec/fixtures/
|
89
|
-
- spec/fixtures/
|
90
|
-
- spec/fixtures/
|
91
|
-
- spec/fixtures/
|
92
|
-
- spec/fixtures/
|
93
|
-
- spec/fixtures/
|
94
|
-
- spec/fixtures/
|
95
|
-
- spec/fixtures/
|
96
|
-
- spec/fixtures/
|
97
|
-
- spec/fixtures/
|
98
|
-
- spec/fixtures/
|
99
|
-
- spec/fixtures/
|
100
|
-
- spec/fixtures/
|
101
|
-
- spec/fixtures/
|
102
|
-
- spec/fixtures/
|
103
|
-
- spec/fixtures/
|
104
|
-
- spec/fixtures/
|
105
|
-
- spec/fixtures/
|
106
|
-
- spec/
|
107
|
-
- spec/fixtures/basic_root_pseudo.output
|
108
|
-
- spec/fixtures/basic_root_pseudo.selector
|
109
|
-
- spec/fixtures/basic_type.ast
|
110
|
-
- spec/fixtures/basic_type.output
|
111
|
-
- spec/fixtures/basic_type.selector
|
112
|
-
- spec/fixtures/basic_type2.ast
|
113
|
-
- spec/fixtures/basic_type2.output
|
114
|
-
- spec/fixtures/basic_type2.selector
|
115
|
-
- spec/fixtures/basic_type3.ast
|
116
|
-
- spec/fixtures/basic_type3.output
|
117
|
-
- spec/fixtures/basic_type3.selector
|
118
|
-
- spec/fixtures/basic_universal.ast
|
119
|
-
- spec/fixtures/basic_universal.output
|
120
|
-
- spec/fixtures/basic_universal.selector
|
67
|
+
- spec/fixtures/parser/level_1/basic_children.output
|
68
|
+
- spec/fixtures/parser/level_1/basic_children.selector
|
69
|
+
- spec/fixtures/parser/level_1/basic_combination.output
|
70
|
+
- spec/fixtures/parser/level_1/basic_combination.selector
|
71
|
+
- spec/fixtures/parser/level_1/basic_first-child.output
|
72
|
+
- spec/fixtures/parser/level_1/basic_first-child.selector
|
73
|
+
- spec/fixtures/parser/level_1/basic_grouping.output
|
74
|
+
- spec/fixtures/parser/level_1/basic_grouping.selector
|
75
|
+
- spec/fixtures/parser/level_1/basic_id.output
|
76
|
+
- spec/fixtures/parser/level_1/basic_id.selector
|
77
|
+
- spec/fixtures/parser/level_1/basic_id_multiple.output
|
78
|
+
- spec/fixtures/parser/level_1/basic_id_multiple.selector
|
79
|
+
- spec/fixtures/parser/level_1/basic_id_quotes.output
|
80
|
+
- spec/fixtures/parser/level_1/basic_id_quotes.selector
|
81
|
+
- spec/fixtures/parser/level_1/basic_id_with_type.output
|
82
|
+
- spec/fixtures/parser/level_1/basic_id_with_type.selector
|
83
|
+
- spec/fixtures/parser/level_1/basic_last-child.output
|
84
|
+
- spec/fixtures/parser/level_1/basic_last-child.selector
|
85
|
+
- spec/fixtures/parser/level_1/basic_nth-child-2.output
|
86
|
+
- spec/fixtures/parser/level_1/basic_nth-child-2.selector
|
87
|
+
- spec/fixtures/parser/level_1/basic_nth-child.output
|
88
|
+
- spec/fixtures/parser/level_1/basic_nth-child.selector
|
89
|
+
- spec/fixtures/parser/level_1/basic_nth-last-child.output
|
90
|
+
- spec/fixtures/parser/level_1/basic_nth-last-child.selector
|
91
|
+
- spec/fixtures/parser/level_1/basic_root_pseudo.output
|
92
|
+
- spec/fixtures/parser/level_1/basic_root_pseudo.selector
|
93
|
+
- spec/fixtures/parser/level_1/basic_type.output
|
94
|
+
- spec/fixtures/parser/level_1/basic_type.selector
|
95
|
+
- spec/fixtures/parser/level_1/basic_type2.output
|
96
|
+
- spec/fixtures/parser/level_1/basic_type2.selector
|
97
|
+
- spec/fixtures/parser/level_1/basic_type3.output
|
98
|
+
- spec/fixtures/parser/level_1/basic_type3.selector
|
99
|
+
- spec/fixtures/parser/level_1/basic_universal.output
|
100
|
+
- spec/fixtures/parser/level_1/basic_universal.selector
|
101
|
+
- spec/fixtures/parser/level_3/basic_has-sans-paren.output
|
102
|
+
- spec/fixtures/parser/level_3/basic_has-sans-paren.selector
|
103
|
+
- spec/fixtures/parser/level_3/basic_has-whitespace.output
|
104
|
+
- spec/fixtures/parser/level_3/basic_has-whitespace.selector
|
105
|
+
- spec/fixtures/parser/level_3/basic_has.output
|
106
|
+
- spec/fixtures/parser/level_3/basic_has.selector
|
107
|
+
- spec/parser_spec.rb
|
121
108
|
- spec/ruby_extensions_spec.rb
|
122
109
|
- spec/spec_helper.rb
|
123
|
-
has_rdoc: true
|
124
110
|
homepage: http://github.com/fd/json_select
|
125
111
|
licenses: []
|
126
|
-
|
127
112
|
post_install_message:
|
128
113
|
rdoc_options: []
|
129
|
-
|
130
|
-
require_paths:
|
114
|
+
require_paths:
|
131
115
|
- lib
|
132
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
133
117
|
none: false
|
134
|
-
requirements:
|
135
|
-
- -
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version:
|
138
|
-
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
segments:
|
123
|
+
- 0
|
124
|
+
hash: 3219129278350857102
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
126
|
none: false
|
140
|
-
requirements:
|
141
|
-
- -
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version:
|
127
|
+
requirements:
|
128
|
+
- - ! '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
segments:
|
132
|
+
- 0
|
133
|
+
hash: 3219129278350857102
|
144
134
|
requirements: []
|
145
|
-
|
146
135
|
rubyforge_project: json_select
|
147
|
-
rubygems_version: 1.
|
136
|
+
rubygems_version: 1.8.23
|
148
137
|
signing_key:
|
149
138
|
specification_version: 3
|
150
139
|
summary: JSONSelect implementation for Ruby
|
151
|
-
test_files:
|
140
|
+
test_files:
|
152
141
|
- spec/conformance_spec.rb
|
153
|
-
- spec/fixtures/
|
154
|
-
- spec/fixtures/
|
155
|
-
- spec/fixtures/
|
156
|
-
- spec/fixtures/
|
157
|
-
- spec/fixtures/
|
158
|
-
- spec/fixtures/
|
159
|
-
- spec/fixtures/
|
160
|
-
- spec/fixtures/
|
161
|
-
- spec/fixtures/
|
162
|
-
- spec/fixtures/
|
163
|
-
- spec/fixtures/
|
164
|
-
- spec/fixtures/
|
165
|
-
- spec/fixtures/
|
166
|
-
- spec/fixtures/
|
167
|
-
- spec/fixtures/
|
168
|
-
- spec/fixtures/
|
169
|
-
- spec/fixtures/
|
170
|
-
- spec/fixtures/
|
171
|
-
- spec/fixtures/
|
172
|
-
- spec/fixtures/
|
173
|
-
- spec/fixtures/
|
174
|
-
- spec/fixtures/
|
175
|
-
- spec/fixtures/
|
176
|
-
- spec/fixtures/
|
177
|
-
- spec/fixtures/
|
178
|
-
- spec/fixtures/
|
179
|
-
- spec/fixtures/
|
180
|
-
- spec/fixtures/
|
181
|
-
- spec/fixtures/
|
182
|
-
- spec/fixtures/
|
183
|
-
- spec/fixtures/
|
184
|
-
- spec/fixtures/
|
185
|
-
- spec/fixtures/
|
186
|
-
- spec/fixtures/
|
187
|
-
- spec/fixtures/
|
188
|
-
- spec/fixtures/
|
189
|
-
- spec/fixtures/
|
190
|
-
- spec/fixtures/
|
191
|
-
- spec/fixtures/
|
192
|
-
- spec/fixtures/
|
193
|
-
- spec/
|
194
|
-
- spec/fixtures/basic_root_pseudo.output
|
195
|
-
- spec/fixtures/basic_root_pseudo.selector
|
196
|
-
- spec/fixtures/basic_type.ast
|
197
|
-
- spec/fixtures/basic_type.output
|
198
|
-
- spec/fixtures/basic_type.selector
|
199
|
-
- spec/fixtures/basic_type2.ast
|
200
|
-
- spec/fixtures/basic_type2.output
|
201
|
-
- spec/fixtures/basic_type2.selector
|
202
|
-
- spec/fixtures/basic_type3.ast
|
203
|
-
- spec/fixtures/basic_type3.output
|
204
|
-
- spec/fixtures/basic_type3.selector
|
205
|
-
- spec/fixtures/basic_universal.ast
|
206
|
-
- spec/fixtures/basic_universal.output
|
207
|
-
- spec/fixtures/basic_universal.selector
|
142
|
+
- spec/fixtures/parser/level_1/basic_children.output
|
143
|
+
- spec/fixtures/parser/level_1/basic_children.selector
|
144
|
+
- spec/fixtures/parser/level_1/basic_combination.output
|
145
|
+
- spec/fixtures/parser/level_1/basic_combination.selector
|
146
|
+
- spec/fixtures/parser/level_1/basic_first-child.output
|
147
|
+
- spec/fixtures/parser/level_1/basic_first-child.selector
|
148
|
+
- spec/fixtures/parser/level_1/basic_grouping.output
|
149
|
+
- spec/fixtures/parser/level_1/basic_grouping.selector
|
150
|
+
- spec/fixtures/parser/level_1/basic_id.output
|
151
|
+
- spec/fixtures/parser/level_1/basic_id.selector
|
152
|
+
- spec/fixtures/parser/level_1/basic_id_multiple.output
|
153
|
+
- spec/fixtures/parser/level_1/basic_id_multiple.selector
|
154
|
+
- spec/fixtures/parser/level_1/basic_id_quotes.output
|
155
|
+
- spec/fixtures/parser/level_1/basic_id_quotes.selector
|
156
|
+
- spec/fixtures/parser/level_1/basic_id_with_type.output
|
157
|
+
- spec/fixtures/parser/level_1/basic_id_with_type.selector
|
158
|
+
- spec/fixtures/parser/level_1/basic_last-child.output
|
159
|
+
- spec/fixtures/parser/level_1/basic_last-child.selector
|
160
|
+
- spec/fixtures/parser/level_1/basic_nth-child-2.output
|
161
|
+
- spec/fixtures/parser/level_1/basic_nth-child-2.selector
|
162
|
+
- spec/fixtures/parser/level_1/basic_nth-child.output
|
163
|
+
- spec/fixtures/parser/level_1/basic_nth-child.selector
|
164
|
+
- spec/fixtures/parser/level_1/basic_nth-last-child.output
|
165
|
+
- spec/fixtures/parser/level_1/basic_nth-last-child.selector
|
166
|
+
- spec/fixtures/parser/level_1/basic_root_pseudo.output
|
167
|
+
- spec/fixtures/parser/level_1/basic_root_pseudo.selector
|
168
|
+
- spec/fixtures/parser/level_1/basic_type.output
|
169
|
+
- spec/fixtures/parser/level_1/basic_type.selector
|
170
|
+
- spec/fixtures/parser/level_1/basic_type2.output
|
171
|
+
- spec/fixtures/parser/level_1/basic_type2.selector
|
172
|
+
- spec/fixtures/parser/level_1/basic_type3.output
|
173
|
+
- spec/fixtures/parser/level_1/basic_type3.selector
|
174
|
+
- spec/fixtures/parser/level_1/basic_universal.output
|
175
|
+
- spec/fixtures/parser/level_1/basic_universal.selector
|
176
|
+
- spec/fixtures/parser/level_3/basic_has-sans-paren.output
|
177
|
+
- spec/fixtures/parser/level_3/basic_has-sans-paren.selector
|
178
|
+
- spec/fixtures/parser/level_3/basic_has-whitespace.output
|
179
|
+
- spec/fixtures/parser/level_3/basic_has-whitespace.selector
|
180
|
+
- spec/fixtures/parser/level_3/basic_has.output
|
181
|
+
- spec/fixtures/parser/level_3/basic_has.selector
|
182
|
+
- spec/parser_spec.rb
|
208
183
|
- spec/ruby_extensions_spec.rb
|
209
184
|
- spec/spec_helper.rb
|