cql 0.2.0 → 0.2.1
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.
- data/lib/cql.rb +2 -3
- data/lib/map_reduce.rb +5 -6
- data/spec/filter_feature_dsl_spec.rb +13 -13
- data/spec/filter_sso_spec.rb +8 -8
- data/spec/select_feature_dsl_spec.rb +1 -1
- data/spec/select_scen_outline_dsl_spec.rb +11 -11
- data/spec/select_scenario_dsl_spec.rb +2 -2
- data/spec/unit_spec.rb +22 -0
- metadata +26 -15
- data/spec/multiple_queries_spec.rb +0 -28
data/lib/cql.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'gherkin/parser/parser'
|
2
2
|
require 'gherkin/formatter/json_formatter'
|
3
3
|
require 'stringio'
|
4
|
-
require 'deep_clone'
|
5
4
|
require File.dirname(__FILE__) + "/dsl"
|
6
5
|
|
7
6
|
module CQL
|
@@ -15,7 +14,7 @@ module CQL
|
|
15
14
|
@what.each do |w|
|
16
15
|
CQL::MapReduce.send(w, data).each_with_index { |e, i| result[i][w]=e }
|
17
16
|
end
|
18
|
-
result
|
17
|
+
result.size == 1 ? result.first : result
|
19
18
|
end
|
20
19
|
|
21
20
|
def initialize features, &block
|
@@ -38,7 +37,7 @@ module CQL
|
|
38
37
|
end
|
39
38
|
|
40
39
|
def query &block
|
41
|
-
Query.new(parsed_feature_files.
|
40
|
+
Query.new(parsed_feature_files.clone, &block).data
|
42
41
|
end
|
43
42
|
|
44
43
|
private
|
data/lib/map_reduce.rb
CHANGED
@@ -1,16 +1,14 @@
|
|
1
|
-
require_relative "dsl"
|
2
|
-
require_relative "feature_filters"
|
3
|
-
require_relative "sso_filters"
|
4
|
-
|
5
1
|
require 'set'
|
6
|
-
|
2
|
+
require File.dirname(__FILE__) + "/dsl"
|
3
|
+
require File.dirname(__FILE__) + "/feature_filters"
|
4
|
+
require File.dirname(__FILE__) + "/sso_filters"
|
7
5
|
module CQL
|
8
6
|
QUERY_VALUES = %w(name uri line description type steps id tags examples)
|
9
7
|
|
10
8
|
class MapReduce
|
11
9
|
CQL::QUERY_VALUES.each do |property|
|
12
10
|
define_singleton_method(property) do |input|
|
13
|
-
input = input.
|
11
|
+
input = [input] if input.class != Array
|
14
12
|
input.map { |a| a[property] }
|
15
13
|
end
|
16
14
|
end
|
@@ -28,6 +26,7 @@ module CQL
|
|
28
26
|
|
29
27
|
def self.feature_children input, args
|
30
28
|
results = []
|
29
|
+
input = filter_features(input, 'feature'=>args['feature']) if args.has_key?('feature')
|
31
30
|
input.each do |feature|
|
32
31
|
feature['elements'].each do |element|
|
33
32
|
results.push element if element['type'] == args['what']
|
@@ -77,7 +77,7 @@ describe "cql" do
|
|
77
77
|
with ssoc lt 9
|
78
78
|
end
|
79
79
|
|
80
|
-
result.should ==
|
80
|
+
result.should == {"name"=> "f3_2_scenarios_3_so"}
|
81
81
|
|
82
82
|
result = gs.query do
|
83
83
|
select name
|
@@ -117,7 +117,7 @@ describe "cql" do
|
|
117
117
|
with ssoc lte 5
|
118
118
|
end
|
119
119
|
|
120
|
-
result.should ==
|
120
|
+
result.should == {"name"=> "f3_2_scenarios_3_so"}
|
121
121
|
|
122
122
|
|
123
123
|
result = gs.query do
|
@@ -183,7 +183,7 @@ describe "cql" do
|
|
183
183
|
with sc gte 7
|
184
184
|
end
|
185
185
|
|
186
|
-
result.should ==
|
186
|
+
result.should == {"name"=> "f2_7_scenarios_2_so"}
|
187
187
|
end
|
188
188
|
|
189
189
|
it 'should filter based on the number of scenarios for sc_lt' do
|
@@ -213,7 +213,7 @@ describe "cql" do
|
|
213
213
|
with sc lt 4
|
214
214
|
end
|
215
215
|
|
216
|
-
result.should ==
|
216
|
+
result.should == {"name"=> "f3_2_scenarios_3_so"}
|
217
217
|
end
|
218
218
|
|
219
219
|
it 'should filter based on the number of scenarios for sc_lte' do
|
@@ -257,7 +257,7 @@ describe "cql" do
|
|
257
257
|
{
|
258
258
|
0=>[],
|
259
259
|
1=>[],
|
260
|
-
2=>
|
260
|
+
2=>{"name"=> "f1_1_tag"},
|
261
261
|
3=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}],
|
262
262
|
4=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}],
|
263
263
|
5=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}]
|
@@ -278,7 +278,7 @@ describe "cql" do
|
|
278
278
|
|
279
279
|
{
|
280
280
|
0=>[],
|
281
|
-
1=>
|
281
|
+
1=>{"name"=> "f1_1_tag"},
|
282
282
|
2=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}],
|
283
283
|
3=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}],
|
284
284
|
4=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}]
|
@@ -300,7 +300,7 @@ describe "cql" do
|
|
300
300
|
{
|
301
301
|
0=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}],
|
302
302
|
1=>[{"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}],
|
303
|
-
2=>
|
303
|
+
2=>{"name"=> "f3_3_tags"},
|
304
304
|
3=>[],
|
305
305
|
4=>[]
|
306
306
|
|
@@ -322,7 +322,7 @@ describe "cql" do
|
|
322
322
|
0=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}],
|
323
323
|
1=>[{"name"=> "f1_1_tag"}, {"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}],
|
324
324
|
2=>[{"name"=> "f2_2_tags"}, {"name"=> "f3_3_tags"}],
|
325
|
-
3=>
|
325
|
+
3=>{"name"=> "f3_3_tags"},
|
326
326
|
4=>[],
|
327
327
|
5=>[]
|
328
328
|
|
@@ -346,7 +346,7 @@ describe "cql" do
|
|
346
346
|
{
|
347
347
|
2=>[{"name"=> "f1_4_scenarios_5_so"}, {"name"=> "f2_7_scenarios_2_so"}, {"name"=> "f3_2_scenarios_3_so"}],
|
348
348
|
3=>[{"name"=> "f1_4_scenarios_5_so"}, {"name"=> "f3_2_scenarios_3_so"}],
|
349
|
-
4=>
|
349
|
+
4=>{"name"=> "f1_4_scenarios_5_so"},
|
350
350
|
7=>[]
|
351
351
|
|
352
352
|
}.each do |number, expected|
|
@@ -412,7 +412,7 @@ describe "cql" do
|
|
412
412
|
with name 'Test2 Feature'
|
413
413
|
end
|
414
414
|
|
415
|
-
result.should ==
|
415
|
+
result.should == {"name"=> "Test2 Feature"}
|
416
416
|
end
|
417
417
|
|
418
418
|
it 'should filter by name regexp' do
|
@@ -424,7 +424,7 @@ describe "cql" do
|
|
424
424
|
with name /Test2 Feature/
|
425
425
|
end
|
426
426
|
|
427
|
-
result.should ==
|
427
|
+
result.should == {"name"=> "Test2 Feature"}
|
428
428
|
|
429
429
|
result = gs.query do
|
430
430
|
select name
|
@@ -467,7 +467,7 @@ describe "cql" do
|
|
467
467
|
with tags '@one'
|
468
468
|
end
|
469
469
|
|
470
|
-
result.should ==
|
470
|
+
result.should == {"name"=>"Test3 Feature"}
|
471
471
|
end
|
472
472
|
|
473
473
|
it 'should filter by a multiple tags' do
|
@@ -479,7 +479,7 @@ describe "cql" do
|
|
479
479
|
with tags '@one', '@two'
|
480
480
|
end
|
481
481
|
|
482
|
-
result.should ==
|
482
|
+
result.should == {"name"=>"Test3 Feature"}
|
483
483
|
end
|
484
484
|
end
|
485
485
|
|
data/spec/filter_sso_spec.rb
CHANGED
@@ -6,7 +6,7 @@ describe "cql" do
|
|
6
6
|
{
|
7
7
|
0=>[],
|
8
8
|
1=>[],
|
9
|
-
2=>
|
9
|
+
2=>{"name"=> "1 tag"},
|
10
10
|
3=>[{"name"=> "1 tag"}, {"name"=> "2 tags"}],
|
11
11
|
4=>[{"name"=> "1 tag"}, {"name"=> "2 tags"}, {"name"=> "3 tags"}],
|
12
12
|
5=>[{"name"=> "1 tag"}, {"name"=> "2 tags"}, {"name"=> "3 tags"}, {"name"=> "4 tags"}]
|
@@ -26,7 +26,7 @@ describe "cql" do
|
|
26
26
|
|
27
27
|
{
|
28
28
|
0=>[],
|
29
|
-
1=>
|
29
|
+
1=>{"name"=> "1 tag"},
|
30
30
|
2=>[{"name"=> "1 tag"}, {"name"=> "2 tags"}],
|
31
31
|
3=>[{"name"=> "1 tag"}, {"name"=> "2 tags"}, {"name"=> "3 tags"}],
|
32
32
|
4=>[{"name"=> "1 tag"}, {"name"=> "2 tags"}, {"name"=> "3 tags"}, {"name"=> "4 tags"}],
|
@@ -50,7 +50,7 @@ describe "cql" do
|
|
50
50
|
0=>[{"name"=> "1 tag"}, {"name"=> "2 tags"}, {"name"=> "3 tags"}, {"name"=> "4 tags"}],
|
51
51
|
1=>[{"name"=> "2 tags"}, {"name"=> "3 tags"}, {"name"=> "4 tags"}],
|
52
52
|
2=>[{"name"=> "3 tags"}, {"name"=> "4 tags"}],
|
53
|
-
3=>
|
53
|
+
3=>{"name"=> "4 tags"},
|
54
54
|
4=>[]
|
55
55
|
}.each do |number, expected|
|
56
56
|
it "should filter scenarios by the number of tags with the 'tc_gt' operator for count of #{number}" do
|
@@ -71,7 +71,7 @@ describe "cql" do
|
|
71
71
|
1=>[{"name"=> "1 tag"}, {"name"=> "2 tags"}, {"name"=> "3 tags"}, {"name"=> "4 tags"}],
|
72
72
|
2=>[{"name"=> "2 tags"}, {"name"=> "3 tags"}, {"name"=> "4 tags"}],
|
73
73
|
3=>[{"name"=> "3 tags"}, {"name"=> "4 tags"}],
|
74
|
-
4=>
|
74
|
+
4=>{"name"=> "4 tags"},
|
75
75
|
5 =>[]
|
76
76
|
}.each do |number, expected|
|
77
77
|
it "should filter scenarios by the number of tags with the 'tc_gte' operator for count of #{number}" do
|
@@ -94,7 +94,7 @@ describe "cql" do
|
|
94
94
|
{
|
95
95
|
0=>[],
|
96
96
|
1=>[],
|
97
|
-
2=>
|
97
|
+
2=>{"name"=> "1 line"},
|
98
98
|
3=>[{"name"=> "1 line"}, {"name"=> "2 lines"}],
|
99
99
|
4=>[{"name"=> "1 line"}, {"name"=> "2 lines"}, {"name"=> "3 lines"}],
|
100
100
|
5=>[{"name"=> "1 line"}, {"name"=> "2 lines"}, {"name"=> "3 lines"}, {"name"=> "4 lines"}]
|
@@ -115,7 +115,7 @@ describe "cql" do
|
|
115
115
|
|
116
116
|
{
|
117
117
|
0=>[],
|
118
|
-
1=>
|
118
|
+
1=>{"name"=> "1 line"},
|
119
119
|
2=>[{"name"=> "1 line"}, {"name"=> "2 lines"}],
|
120
120
|
3=>[{"name"=> "1 line"}, {"name"=> "2 lines"}, {"name"=> "3 lines"}],
|
121
121
|
4=>[{"name"=> "1 line"}, {"name"=> "2 lines"}, {"name"=> "3 lines"}, {"name"=> "4 lines"}],
|
@@ -139,7 +139,7 @@ describe "cql" do
|
|
139
139
|
0=>[{"name"=> "1 line"}, {"name"=> "2 lines"}, {"name"=> "3 lines"}, {"name"=> "4 lines"}],
|
140
140
|
1=>[{"name"=> "2 lines"}, {"name"=> "3 lines"}, {"name"=> "4 lines"}],
|
141
141
|
2=>[{"name"=> "3 lines"}, {"name"=> "4 lines"}],
|
142
|
-
3=>
|
142
|
+
3=>{"name"=> "4 lines"},
|
143
143
|
4=>[]
|
144
144
|
|
145
145
|
|
@@ -162,7 +162,7 @@ describe "cql" do
|
|
162
162
|
1=>[{"name"=> "1 line"}, {"name"=> "2 lines"}, {"name"=> "3 lines"}, {"name"=> "4 lines"}],
|
163
163
|
2=>[{"name"=> "2 lines"}, {"name"=> "3 lines"}, {"name"=> "4 lines"}],
|
164
164
|
3=>[{"name"=> "3 lines"}, {"name"=> "4 lines"}],
|
165
|
-
4=>
|
165
|
+
4=>{"name"=> "4 lines"},
|
166
166
|
5 =>[]
|
167
167
|
|
168
168
|
|
@@ -9,7 +9,7 @@ describe "select" do
|
|
9
9
|
select line
|
10
10
|
from scenario_outlines
|
11
11
|
end
|
12
|
-
result.should ==
|
12
|
+
result.should == {"line"=>3}
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'should get scenario outlines name' do
|
@@ -18,7 +18,7 @@ describe "select" do
|
|
18
18
|
select name
|
19
19
|
from scenario_outlines
|
20
20
|
end
|
21
|
-
result.should ==
|
21
|
+
result.should == {"name"=> "An Outline"}
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should return the examples used" do
|
@@ -27,14 +27,14 @@ describe "select" do
|
|
27
27
|
select examples
|
28
28
|
from scenario_outlines
|
29
29
|
end
|
30
|
-
result.should ==
|
30
|
+
result.should == {"examples"=>[{"keyword"=>"Examples", "name"=>"", "line"=>6,
|
31
31
|
"description"=>"", "id"=>"test-feature;an-outline;",
|
32
32
|
"rows"=>[{"cells"=>["var_a", "var_b"], "line"=>7, "id"=>"test-feature;an-outline;;1"},
|
33
33
|
{"cells"=>["1", "a"], "line"=>8, "id"=>"test-feature;an-outline;;2"},
|
34
34
|
{"cells"=>["2", "b"], "line"=>9, "id"=>"test-feature;an-outline;;3"},
|
35
35
|
{"cells"=>["3", "c"], "line"=>10, "id"=>"test-feature;an-outline;;4"},
|
36
36
|
{"cells"=>["4", "d"], "line"=>11, "id"=>"test-feature;an-outline;;5"}]
|
37
|
-
}]}
|
37
|
+
}]}
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should return multiple examples used for a single scenario outline" do
|
@@ -43,21 +43,21 @@ describe "select" do
|
|
43
43
|
select examples
|
44
44
|
from scenario_outlines
|
45
45
|
end
|
46
|
-
result.should ==
|
46
|
+
result.should == {"examples"=>[{"keyword"=>"Examples", "name"=>"One", "line"=>6, "description"=>"", "id"=>"test-feature;an-outline;one",
|
47
47
|
"rows"=>[{"cells"=>["var_a", "var_b"], "line"=>7, "id"=>"test-feature;an-outline;one;1"},
|
48
48
|
{"cells"=>["1", "a"], "line"=>8, "id"=>"test-feature;an-outline;one;2"},
|
49
49
|
{"cells"=>["2", "b"], "line"=>9, "id"=>"test-feature;an-outline;one;3"}]},
|
50
50
|
{"keyword"=>"Examples", "name"=>"Two", "line"=>11, "description"=>"", "id"=>"test-feature;an-outline;two",
|
51
51
|
"rows"=>[{"cells"=>["var_a", "var_b"], "line"=>12, "id"=>"test-feature;an-outline;two;1"},
|
52
52
|
{"cells"=>["1", "a"], "line"=>13, "id"=>"test-feature;an-outline;two;2"},
|
53
|
-
{"cells"=>["2", "b"], "line"=>14, "id"=>"test-feature;an-outline;two;3"}]}]}
|
53
|
+
{"cells"=>["2", "b"], "line"=>14, "id"=>"test-feature;an-outline;two;3"}]}]}
|
54
54
|
end
|
55
55
|
|
56
56
|
end
|
57
57
|
|
58
58
|
describe "single value, multiple results" do
|
59
59
|
it 'should get scenario outlines as is when no select criteria given' do
|
60
|
-
expected =
|
60
|
+
expected = {"all"=>{"keyword"=>"Scenario Outline",
|
61
61
|
"name"=>"An Outline",
|
62
62
|
"line"=>3, "description"=>"",
|
63
63
|
"id"=>"test-feature;an-outline", "type"=>"scenario_outline",
|
@@ -68,7 +68,7 @@ describe "select" do
|
|
68
68
|
{"cells"=>["1", "a"], "line"=>8, "id"=>"test-feature;an-outline;;2"},
|
69
69
|
{"cells"=>["2", "b"], "line"=>9, "id"=>"test-feature;an-outline;;3"},
|
70
70
|
{"cells"=>["3", "c"], "line"=>10, "id"=>"test-feature;an-outline;;4"},
|
71
|
-
{"cells"=>["4", "d"], "line"=>11, "id"=>"test-feature;an-outline;;5"}]}]}}
|
71
|
+
{"cells"=>["4", "d"], "line"=>11, "id"=>"test-feature;an-outline;;5"}]}]}}
|
72
72
|
|
73
73
|
gs = CQL::Repository.new File.expand_path(File.dirname(__FILE__)) + "/../fixtures/features/scen_outlines/basic"
|
74
74
|
result = gs.query do
|
@@ -102,7 +102,7 @@ describe "select" do
|
|
102
102
|
select step_lines
|
103
103
|
from scenario_outlines
|
104
104
|
end
|
105
|
-
result.should ==
|
105
|
+
result.should == {"step_lines"=> ["Given something happend", "Then I expect something else"]}
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
@@ -113,13 +113,13 @@ describe "select" do
|
|
113
113
|
select name, line, type, step_lines, id, steps
|
114
114
|
from scenario_outlines
|
115
115
|
end
|
116
|
-
result.should ==
|
116
|
+
result.should == {'name'=>"An Outline",
|
117
117
|
'line'=>3,
|
118
118
|
'id'=>'test-feature;an-outline',
|
119
119
|
'type'=>'scenario_outline',
|
120
120
|
"steps"=>[{"keyword"=>"Given ", "name"=>"something happend", "line"=>4}, {"keyword"=>"Then ", "name"=>"I expect something else", "line"=>5}],
|
121
121
|
"step_lines"=>["Given something happend", "Then I expect something else"]
|
122
|
-
}
|
122
|
+
}
|
123
123
|
end
|
124
124
|
|
125
125
|
end
|
@@ -49,12 +49,12 @@ describe "select" do
|
|
49
49
|
|
50
50
|
it "should select all" do
|
51
51
|
gr = CQL::Repository.new File.expand_path(File.dirname(__FILE__)) + "/../fixtures/features/scenario/table"
|
52
|
-
expected =
|
52
|
+
expected = {"all"=>{"keyword"=>"Scenario", "name"=>"Has a table", "line"=>3,
|
53
53
|
"description"=>"", "id"=>"simple;has-a-table", "type"=>"scenario",
|
54
54
|
"steps"=>[{"keyword"=>"Given ", "name"=>"Something", "line"=>4,
|
55
55
|
"rows"=>[{"cells"=>["a", "a"], "line"=>5}, {"cells"=>["s", "a"], "line"=>6},
|
56
56
|
{"cells"=>["s", "s"], "line"=>7}]},
|
57
|
-
{"keyword"=>"Then ", "name"=>"something else", "line"=>8}]}}
|
57
|
+
{"keyword"=>"Then ", "name"=>"something else", "line"=>8}]}}
|
58
58
|
|
59
59
|
result = gr.query do
|
60
60
|
select all
|
data/spec/unit_spec.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require File.dirname(__FILE__) + "/../lib/cql"
|
3
|
+
|
4
|
+
describe "cql" do
|
5
|
+
|
6
|
+
describe "tag searcher" do
|
7
|
+
it "should be able to search for tags" do
|
8
|
+
#tags_given = [{"name"=>"@one", "line"=>3}, {"name"=>"@four", "line"=>3}, {"name"=>"@six", "line"=>3}, {"name"=>"@seven", "line"=>3}]
|
9
|
+
#CQL::MapReduce.has_tags(tags_given, ["@one", "@four"]).should eql true
|
10
|
+
#
|
11
|
+
#tags_given = [{"name"=>"@two", "line"=>3}, {"name"=>"@four", "line"=>3}, {"name"=>"@six", "line"=>3}, {"name"=>"@seven", "line"=>3}]
|
12
|
+
#CQL::MapReduce.has_tags(tags_given, ["@one", "@four"]).should eql false
|
13
|
+
#
|
14
|
+
#tags_given = [{"name"=>"@two", "line"=>3}, {"name"=>"@four", "line"=>3}, {"name"=>"@six", "line"=>3}, {"name"=>"@seven", "line"=>3}]
|
15
|
+
#CQL::MapReduce.has_tags(tags_given, ["@four"]).should eql true
|
16
|
+
#
|
17
|
+
#tags_given = [{"name"=>"@two", "line"=>3}, {"name"=>"@four", "line"=>3}, {"name"=>"@six", "line"=>3}, {"name"=>"@seven", "line"=>3}]
|
18
|
+
#CQL::MapReduce.has_tags(tags_given, ["@four", "@two", "@six", "@seven"]).should eql true
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gherkin
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.11
|
21
|
+
version: '2.11'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 2.11
|
29
|
+
version: '2.11'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: json
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ! '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.9
|
53
|
+
version: '0.9'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.9
|
61
|
+
version: '0.9'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rspec
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 2.7
|
69
|
+
version: '2.7'
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 2.7
|
77
|
+
version: '2.7'
|
78
78
|
description: Cucumber Query Language
|
79
79
|
email: jdfolino@gmail.com
|
80
80
|
executables: []
|
@@ -89,13 +89,24 @@ files:
|
|
89
89
|
- spec/filter_feature_dsl_spec.rb
|
90
90
|
- spec/filter_sso_spec.rb
|
91
91
|
- spec/map_reduce_spec.rb
|
92
|
-
- spec/multiple_queries_spec.rb
|
93
92
|
- spec/select_feature_dsl_spec.rb
|
94
|
-
- spec/select_scen_outline_dsl_spec.rb
|
95
93
|
- spec/select_scenario_dsl_spec.rb
|
94
|
+
- spec/select_scen_outline_dsl_spec.rb
|
95
|
+
- spec/unit_spec.rb
|
96
96
|
homepage:
|
97
97
|
licenses: []
|
98
|
-
post_install_message:
|
98
|
+
post_install_message: ! '
|
99
|
+
|
100
|
+
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
|
101
|
+
|
102
|
+
|
103
|
+
Thank you for installing cql (Cucumber Query Language)
|
104
|
+
|
105
|
+
|
106
|
+
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
|
107
|
+
|
108
|
+
|
109
|
+
'
|
99
110
|
rdoc_options:
|
100
111
|
- --charset=UTF-8
|
101
112
|
require_paths:
|
@@ -114,15 +125,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
125
|
version: '0'
|
115
126
|
requirements: []
|
116
127
|
rubyforge_project:
|
117
|
-
rubygems_version: 1.8.
|
128
|
+
rubygems_version: 1.8.24
|
118
129
|
signing_key:
|
119
130
|
specification_version: 3
|
120
|
-
summary: cucumber-0.2.
|
131
|
+
summary: cucumber-0.2.1
|
121
132
|
test_files:
|
122
133
|
- spec/filter_feature_dsl_spec.rb
|
123
134
|
- spec/filter_sso_spec.rb
|
124
135
|
- spec/map_reduce_spec.rb
|
125
|
-
- spec/multiple_queries_spec.rb
|
126
136
|
- spec/select_feature_dsl_spec.rb
|
127
|
-
- spec/select_scen_outline_dsl_spec.rb
|
128
137
|
- spec/select_scenario_dsl_spec.rb
|
138
|
+
- spec/select_scen_outline_dsl_spec.rb
|
139
|
+
- spec/unit_spec.rb
|
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'rspec'
|
2
|
-
require File.dirname(__FILE__) + "/../lib/cql"
|
3
|
-
|
4
|
-
describe "cql" do
|
5
|
-
|
6
|
-
describe 'cql repo is not mutable' do
|
7
|
-
it 'should not change between queries' do
|
8
|
-
|
9
|
-
repo = CQL::Repository.new File.dirname(__FILE__) + "/../fixtures/features/got"
|
10
|
-
|
11
|
-
result = repo.query do
|
12
|
-
select name
|
13
|
-
from scenarios
|
14
|
-
with tags '@Lannister'
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
result = repo.query do
|
19
|
-
select name
|
20
|
-
from scenarios
|
21
|
-
with line /child/
|
22
|
-
end
|
23
|
-
|
24
|
-
result.should == [{"name"=> "Strange relations"},
|
25
|
-
{"name"=> "Bastard Child"}]
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|