cql 1.2.1 → 1.3.0
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.
- checksums.yaml +4 -4
- data/lib/cql.rb +18 -11
- data/lib/cql/dsl.rb +14 -2
- data/lib/cql/filters.rb +12 -6
- data/lib/cql/map_reduce.rb +29 -11
- data/lib/cql/model_dsl.rb +18 -0
- data/lib/cql/queriable.rb +14 -0
- data/lib/cql/sso_filters.rb +3 -2
- data/lib/cql/version.rb +1 -1
- data/testing/cql_test_model.rb +42 -0
- data/testing/cucumber/features/clauses/as_clause.feature +136 -0
- data/testing/cucumber/features/clauses/from_clause.feature +126 -0
- data/testing/cucumber/features/clauses/select_clause.feature +117 -0
- data/testing/cucumber/features/clauses/transform_clause.feature +153 -0
- data/testing/cucumber/features/clauses/with_clause.feature +363 -0
- data/testing/cucumber/features/dsl.feature +77 -0
- data/testing/cucumber/features/model_querying.feature +18 -0
- data/testing/cucumber/features/repository.feature +23 -0
- data/testing/cucumber/step_definitions/query_steps.rb +7 -0
- data/testing/cucumber/step_definitions/setup_steps.rb +25 -0
- data/testing/cucumber/step_definitions/verification_steps.rb +78 -0
- data/testing/cucumber/support/env.rb +24 -0
- data/testing/cucumber/support/transforms.rb +3 -0
- data/testing/fixtures/features/combined/a/f1_4_scenarios_5_so.feature +59 -0
- data/testing/fixtures/features/combined/a/f2_7_scenarios_2_so.feature +43 -0
- data/testing/fixtures/features/combined/a/f3_2_scenarios_3_so.feature +30 -0
- data/testing/fixtures/features/combined/b/f1_1_tag.feature +6 -0
- data/testing/fixtures/features/combined/b/f2_2_tags.feature +6 -0
- data/testing/fixtures/features/combined/b/f3_3_tags.feature +6 -0
- data/testing/fixtures/features/examples/basic/test_with_scenarios.feature +15 -0
- data/testing/fixtures/features/examples/filters/tag_count/simple.feature +21 -0
- data/testing/fixtures/features/examples/filters/tag_count/simple2.feature +21 -0
- data/testing/fixtures/features/examples/filters/tags/simple.feature +34 -0
- data/testing/fixtures/features/examples/filters/tags2/simple.feature +34 -0
- data/testing/fixtures/features/examples/filters/tags2/simple2.feature +34 -0
- data/testing/fixtures/features/examples/multiple_examples/test_with_scenarios.feature +43 -0
- data/testing/fixtures/features/examples/name_filter/name.feature +19 -0
- data/testing/fixtures/features/got/Lannisters.feature +24 -0
- data/testing/fixtures/features/got/Starks.feature +18 -0
- data/testing/fixtures/features/scen_outlines/basic/test_with_scenarios.feature +15 -0
- data/testing/fixtures/features/scen_outlines/filters/tag_count/simple.feature +21 -0
- data/testing/fixtures/features/scen_outlines/filters/tag_count/simple2.feature +21 -0
- data/testing/fixtures/features/scen_outlines/filters/tags/simple.feature +34 -0
- data/testing/fixtures/features/scen_outlines/filters/tags2/simple.feature +34 -0
- data/testing/fixtures/features/scen_outlines/filters/tags2/simple2.feature +34 -0
- data/testing/fixtures/features/scen_outlines/line_count/simple.feature +12 -0
- data/testing/fixtures/features/scen_outlines/line_count/simple2.feature +16 -0
- data/testing/fixtures/features/scen_outlines/line_filter/ll.feature +13 -0
- data/testing/fixtures/features/scen_outlines/multiple_examples/test_with_scenarios.feature +43 -0
- data/testing/fixtures/features/scen_outlines/name_filter/name.feature +19 -0
- data/testing/fixtures/features/scenario/line_count/simple.feature +9 -0
- data/testing/fixtures/features/scenario/line_count/simple2.feature +12 -0
- data/testing/fixtures/features/scenario/line_filter/ll.feature +9 -0
- data/testing/fixtures/features/scenario/name_filter/name.feature +13 -0
- data/testing/fixtures/features/scenario/simple/simple.feature +8 -0
- data/testing/fixtures/features/scenario/simple/test.feature +9 -0
- data/testing/fixtures/features/scenario/simple/test2.feature +5 -0
- data/testing/fixtures/features/scenario/simple/test_full.feature +22 -0
- data/testing/fixtures/features/scenario/simple2/test_full.feature +23 -0
- data/testing/fixtures/features/scenario/table/simple.feature +11 -0
- data/testing/fixtures/features/scenario/tag_count/simple.feature +17 -0
- data/testing/fixtures/features/scenario/tag_count/simple2.feature +17 -0
- data/testing/fixtures/features/scenario/tagged_features/simple.feature +8 -0
- data/testing/fixtures/features/scenario/tagged_features/test.feature +10 -0
- data/testing/fixtures/features/scenario/tagged_features/test2.feature +6 -0
- data/testing/fixtures/features/scenario/tagged_features/test_full.feature +22 -0
- data/testing/fixtures/features/scenario/tags/simple.feature +24 -0
- data/testing/fixtures/features/scenario/tags2/simple.feature +24 -0
- data/testing/fixtures/features/scenario/tags2/simple2.feature +24 -0
- data/testing/fixtures/features/scenario/tags3/simple.feature +21 -0
- data/testing/gemfiles/cuke_modeler0.gemfile +30 -0
- data/testing/gemfiles/cuke_modeler1.gemfile +30 -0
- data/testing/rspec/spec/dsl_spec.rb +600 -0
- data/testing/rspec/spec/filter_example_spec.rb +65 -0
- data/testing/rspec/spec/filter_feature_dsl_spec.rb +286 -0
- data/testing/rspec/spec/filter_sso_spec.rb +202 -0
- data/testing/rspec/spec/line_count_filterable_specs.rb +74 -0
- data/testing/rspec/spec/line_filterable_specs.rb +52 -0
- data/testing/rspec/spec/map_reduce_spec.rb +135 -0
- data/testing/rspec/spec/model_query_spec.rb +49 -0
- data/testing/rspec/spec/multiple_queries_spec.rb +24 -0
- data/testing/rspec/spec/name_filterable_specs.rb +52 -0
- data/testing/rspec/spec/queriable_specs.rb +45 -0
- data/testing/rspec/spec/repository_spec.rb +82 -0
- data/testing/rspec/spec/select_feature_dsl_spec.rb +114 -0
- data/testing/rspec/spec/select_scen_outline_dsl_spec.rb +234 -0
- data/testing/rspec/spec/select_scenario_dsl_spec.rb +132 -0
- data/testing/rspec/spec/spec_helper.rb +42 -0
- data/testing/rspec/spec/tag_filterable_specs.rb +107 -0
- metadata +170 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Feature: Simple2
|
|
2
|
+
|
|
3
|
+
Scenario Outline:
|
|
4
|
+
Given Something
|
|
5
|
+
| a | a |
|
|
6
|
+
| s | a |
|
|
7
|
+
| s | s |
|
|
8
|
+
Then something else
|
|
9
|
+
@one @two @three
|
|
10
|
+
Examples: 3 tags
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
Scenario Outline:
|
|
14
|
+
Given Something
|
|
15
|
+
| a | a |
|
|
16
|
+
| s | a |
|
|
17
|
+
| s | s |
|
|
18
|
+
Then something else
|
|
19
|
+
@one @two @three @four
|
|
20
|
+
Examples: 4 tags
|
|
21
|
+
| param |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Feature: Simple
|
|
2
|
+
|
|
3
|
+
Scenario Outline:
|
|
4
|
+
Given Something
|
|
5
|
+
| a | a |
|
|
6
|
+
| s | a |
|
|
7
|
+
| s | s |
|
|
8
|
+
Then something else
|
|
9
|
+
@two
|
|
10
|
+
Examples: Has a table
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
Scenario Outline:
|
|
14
|
+
Given anything
|
|
15
|
+
@one
|
|
16
|
+
Examples: Next
|
|
17
|
+
| param |
|
|
18
|
+
|
|
19
|
+
Scenario Outline:
|
|
20
|
+
Given lalala
|
|
21
|
+
@two
|
|
22
|
+
Examples: Blah
|
|
23
|
+
| param |
|
|
24
|
+
|
|
25
|
+
Scenario Outline:
|
|
26
|
+
Given a car
|
|
27
|
+
@one
|
|
28
|
+
Examples: Another
|
|
29
|
+
| param |
|
|
30
|
+
|
|
31
|
+
Scenario Outline:
|
|
32
|
+
Given a car
|
|
33
|
+
Examples: Yet Another
|
|
34
|
+
| param |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Feature: Simple
|
|
2
|
+
|
|
3
|
+
Scenario Outline:
|
|
4
|
+
Given Something
|
|
5
|
+
| a | a |
|
|
6
|
+
| s | a |
|
|
7
|
+
| s | s |
|
|
8
|
+
Then something else
|
|
9
|
+
@two
|
|
10
|
+
Examples: Has a table
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
Scenario Outline:
|
|
14
|
+
Given anything
|
|
15
|
+
@one
|
|
16
|
+
Examples: Next
|
|
17
|
+
| param |
|
|
18
|
+
|
|
19
|
+
Scenario Outline:
|
|
20
|
+
Given a car
|
|
21
|
+
Examples: Another
|
|
22
|
+
| param |
|
|
23
|
+
|
|
24
|
+
Scenario Outline:
|
|
25
|
+
Given lalala
|
|
26
|
+
@two
|
|
27
|
+
Examples: Blah
|
|
28
|
+
| param |
|
|
29
|
+
|
|
30
|
+
Scenario Outline:
|
|
31
|
+
Given a car
|
|
32
|
+
@one
|
|
33
|
+
Examples: Another
|
|
34
|
+
| param |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Feature: Simple 2
|
|
2
|
+
|
|
3
|
+
Scenario Outline:
|
|
4
|
+
Given Something
|
|
5
|
+
| a | a |
|
|
6
|
+
| s | a |
|
|
7
|
+
| s | s |
|
|
8
|
+
Then something else
|
|
9
|
+
@two @four
|
|
10
|
+
Examples: Has a table hmmm
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
Scenario Outline:
|
|
14
|
+
Given anything
|
|
15
|
+
@one @five
|
|
16
|
+
Examples: Next
|
|
17
|
+
| param |
|
|
18
|
+
|
|
19
|
+
Scenario Outline:
|
|
20
|
+
Given a car
|
|
21
|
+
Examples: Another
|
|
22
|
+
| param |
|
|
23
|
+
|
|
24
|
+
Scenario Outline:
|
|
25
|
+
Given lalala
|
|
26
|
+
@two
|
|
27
|
+
Examples: Blah blah
|
|
28
|
+
| param |
|
|
29
|
+
|
|
30
|
+
Scenario Outline:
|
|
31
|
+
Given a car
|
|
32
|
+
@one
|
|
33
|
+
Examples: Another
|
|
34
|
+
| param |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Feature: Test Feature
|
|
2
|
+
|
|
3
|
+
Scenario Outline: An Outline
|
|
4
|
+
Given something happend
|
|
5
|
+
Then I expect something else
|
|
6
|
+
Examples: One
|
|
7
|
+
| var_a | var_b |
|
|
8
|
+
| 1 | a |
|
|
9
|
+
| 2 | b |
|
|
10
|
+
|
|
11
|
+
Examples: Two
|
|
12
|
+
| var_a | var_b |
|
|
13
|
+
| 1 | a |
|
|
14
|
+
| 2 | b |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Scenario: A Scenario
|
|
18
|
+
Given something happend
|
|
19
|
+
Then I expect something else
|
|
20
|
+
|
|
21
|
+
@outline_tag
|
|
22
|
+
Scenario Outline: An Outline with everything
|
|
23
|
+
|
|
24
|
+
Outline description.
|
|
25
|
+
|
|
26
|
+
Given something happend
|
|
27
|
+
| a | a |
|
|
28
|
+
| s | a |
|
|
29
|
+
| s | s |
|
|
30
|
+
Then I expect something else
|
|
31
|
+
Examples: One
|
|
32
|
+
This is example One.
|
|
33
|
+
|
|
34
|
+
| var_a | var_b |
|
|
35
|
+
| 1 | a |
|
|
36
|
+
| 2 | b |
|
|
37
|
+
|
|
38
|
+
@example_tag
|
|
39
|
+
Examples: Two
|
|
40
|
+
| var_a | var_b |
|
|
41
|
+
| 1 | a |
|
|
42
|
+
| 2 | b |
|
|
43
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Feature: Names1
|
|
2
|
+
|
|
3
|
+
Scenario Outline:
|
|
4
|
+
Given Something
|
|
5
|
+
Then something else
|
|
6
|
+
Examples: name1
|
|
7
|
+
| param |
|
|
8
|
+
|
|
9
|
+
Scenario Outline:
|
|
10
|
+
Given Something
|
|
11
|
+
Then something else
|
|
12
|
+
Examples: name2
|
|
13
|
+
| param |
|
|
14
|
+
|
|
15
|
+
Scenario Outline:
|
|
16
|
+
Given Something
|
|
17
|
+
Then something else
|
|
18
|
+
Examples: name3
|
|
19
|
+
| param |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Feature: Lannisters
|
|
2
|
+
|
|
3
|
+
@Stark @Baratheon @Lannister
|
|
4
|
+
Scenario: Strange relations
|
|
5
|
+
Given "Cersai Lannister" is married to "King Robert Baratheon"
|
|
6
|
+
And they have a child "Joffrey Baratheon"
|
|
7
|
+
But "Jaime Lannister" is really the father
|
|
8
|
+
Then the "Starks" will be in trouble
|
|
9
|
+
|
|
10
|
+
@Lannister
|
|
11
|
+
Scenario: Family Honour
|
|
12
|
+
Given "Tywin Lannister" is ashamed of his dad
|
|
13
|
+
And he wants the family name to continue
|
|
14
|
+
And he craves power
|
|
15
|
+
Then "Tywin Lannister" will build an army
|
|
16
|
+
And become hand of the king
|
|
17
|
+
|
|
18
|
+
@Targaryen @Lannister
|
|
19
|
+
Scenario: Actually a good guy
|
|
20
|
+
Given "Jamie Lannister" is in the "King's Guard"
|
|
21
|
+
And the "Mad King" wants to burn the city
|
|
22
|
+
Then "Jamie Lannister" will kill the "Mad King"
|
|
23
|
+
And "King's Landing" will be saved
|
|
24
|
+
And "Jamie Lannister" will become known as the "King Slayer"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Feature: Starks
|
|
2
|
+
|
|
3
|
+
@Stark @Snow
|
|
4
|
+
Scenario: Bastard Child
|
|
5
|
+
Given "Ned Stark" has a mistress
|
|
6
|
+
And they have a child
|
|
7
|
+
Then the child will be called "Jon Snow"
|
|
8
|
+
And he will join the "Night's Watch"
|
|
9
|
+
|
|
10
|
+
@Stark @Baratheon
|
|
11
|
+
Scenario: Hand of the king
|
|
12
|
+
Given "Robert Baratheon" is king
|
|
13
|
+
And "Ned Stark" is friends with "Robert Baratheon"
|
|
14
|
+
Then "Ned Stark" will become "Hand of the King"
|
|
15
|
+
And "Ned Stark" will have the following responsibilities
|
|
16
|
+
| Ensuring Justice |
|
|
17
|
+
| Protecting the king |
|
|
18
|
+
| Finding out about conspiracies |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Feature: Test Feature
|
|
2
|
+
|
|
3
|
+
Scenario Outline: An Outline
|
|
4
|
+
Given something happend
|
|
5
|
+
Then I expect something else
|
|
6
|
+
Examples:
|
|
7
|
+
| var_a | var_b |
|
|
8
|
+
| 1 | a |
|
|
9
|
+
| 2 | b |
|
|
10
|
+
| 3 | c |
|
|
11
|
+
| 4 | d |
|
|
12
|
+
|
|
13
|
+
Scenario: A Scenario
|
|
14
|
+
Given something happend
|
|
15
|
+
Then I expect something else
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Feature: Simple
|
|
2
|
+
|
|
3
|
+
@one
|
|
4
|
+
Scenario Outline: 1 tag
|
|
5
|
+
Given Something
|
|
6
|
+
| a | a |
|
|
7
|
+
| s | a |
|
|
8
|
+
| s | s |
|
|
9
|
+
Then something else
|
|
10
|
+
Examples:
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
@one @two
|
|
14
|
+
Scenario Outline: 2 tags
|
|
15
|
+
Given Something
|
|
16
|
+
| a | a |
|
|
17
|
+
| s | a |
|
|
18
|
+
| s | s |
|
|
19
|
+
Then something else
|
|
20
|
+
Examples:
|
|
21
|
+
| param |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Feature: Simple2
|
|
2
|
+
|
|
3
|
+
@one @two @three
|
|
4
|
+
Scenario Outline: 3 tags
|
|
5
|
+
Given Something
|
|
6
|
+
| a | a |
|
|
7
|
+
| s | a |
|
|
8
|
+
| s | s |
|
|
9
|
+
Then something else
|
|
10
|
+
Examples:
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
@one @two @three @four
|
|
14
|
+
Scenario Outline: 4 tags
|
|
15
|
+
Given Something
|
|
16
|
+
| a | a |
|
|
17
|
+
| s | a |
|
|
18
|
+
| s | s |
|
|
19
|
+
Then something else
|
|
20
|
+
Examples:
|
|
21
|
+
| param |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Feature: Simple
|
|
2
|
+
|
|
3
|
+
@two
|
|
4
|
+
Scenario Outline: Has a table
|
|
5
|
+
Given Something
|
|
6
|
+
| a | a |
|
|
7
|
+
| s | a |
|
|
8
|
+
| s | s |
|
|
9
|
+
Then something else
|
|
10
|
+
Examples:
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
@one
|
|
14
|
+
Scenario Outline: Next
|
|
15
|
+
Given anything
|
|
16
|
+
Examples:
|
|
17
|
+
| param |
|
|
18
|
+
|
|
19
|
+
@two
|
|
20
|
+
Scenario Outline: Blah
|
|
21
|
+
Given lalala
|
|
22
|
+
Examples:
|
|
23
|
+
| param |
|
|
24
|
+
|
|
25
|
+
@one
|
|
26
|
+
Scenario Outline: Another
|
|
27
|
+
Given a car
|
|
28
|
+
Examples:
|
|
29
|
+
| param |
|
|
30
|
+
|
|
31
|
+
Scenario Outline: Yet Another
|
|
32
|
+
Given a car
|
|
33
|
+
Examples:
|
|
34
|
+
| param |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Feature: Simple
|
|
2
|
+
|
|
3
|
+
@two
|
|
4
|
+
Scenario Outline: Has a table
|
|
5
|
+
Given Something
|
|
6
|
+
| a | a |
|
|
7
|
+
| s | a |
|
|
8
|
+
| s | s |
|
|
9
|
+
Then something else
|
|
10
|
+
Examples:
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
@one
|
|
14
|
+
Scenario Outline: Next
|
|
15
|
+
Given anything
|
|
16
|
+
Examples:
|
|
17
|
+
| param |
|
|
18
|
+
|
|
19
|
+
Scenario Outline: Another
|
|
20
|
+
Given a car
|
|
21
|
+
Examples:
|
|
22
|
+
| param |
|
|
23
|
+
|
|
24
|
+
@two
|
|
25
|
+
Scenario Outline: Blah
|
|
26
|
+
Given lalala
|
|
27
|
+
Examples:
|
|
28
|
+
| param |
|
|
29
|
+
|
|
30
|
+
@one
|
|
31
|
+
Scenario Outline: Another
|
|
32
|
+
Given a car
|
|
33
|
+
Examples:
|
|
34
|
+
| param |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Feature: Simple 2
|
|
2
|
+
|
|
3
|
+
@two @four
|
|
4
|
+
Scenario Outline: Has a table hmmm
|
|
5
|
+
Given Something
|
|
6
|
+
| a | a |
|
|
7
|
+
| s | a |
|
|
8
|
+
| s | s |
|
|
9
|
+
Then something else
|
|
10
|
+
Examples:
|
|
11
|
+
| param |
|
|
12
|
+
|
|
13
|
+
@one @five
|
|
14
|
+
Scenario Outline: Next
|
|
15
|
+
Given anything
|
|
16
|
+
Examples:
|
|
17
|
+
| param |
|
|
18
|
+
|
|
19
|
+
Scenario Outline: Another
|
|
20
|
+
Given a car
|
|
21
|
+
Examples:
|
|
22
|
+
| param |
|
|
23
|
+
|
|
24
|
+
@two
|
|
25
|
+
Scenario Outline: Blah blah
|
|
26
|
+
Given lalala
|
|
27
|
+
Examples:
|
|
28
|
+
| param |
|
|
29
|
+
|
|
30
|
+
@one
|
|
31
|
+
Scenario Outline: Another
|
|
32
|
+
Given a car
|
|
33
|
+
Examples:
|
|
34
|
+
| param |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Feature: Line Count 2
|
|
2
|
+
|
|
3
|
+
Scenario Outline: 3 lines
|
|
4
|
+
Given Something
|
|
5
|
+
Then something else
|
|
6
|
+
Then something else
|
|
7
|
+
Examples:
|
|
8
|
+
| param |
|
|
9
|
+
|
|
10
|
+
Scenario Outline: 4 lines
|
|
11
|
+
Given Something
|
|
12
|
+
Given Something
|
|
13
|
+
Given Something
|
|
14
|
+
Given Something
|
|
15
|
+
Examples:
|
|
16
|
+
| param |
|