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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cql.rb +18 -11
  3. data/lib/cql/dsl.rb +14 -2
  4. data/lib/cql/filters.rb +12 -6
  5. data/lib/cql/map_reduce.rb +29 -11
  6. data/lib/cql/model_dsl.rb +18 -0
  7. data/lib/cql/queriable.rb +14 -0
  8. data/lib/cql/sso_filters.rb +3 -2
  9. data/lib/cql/version.rb +1 -1
  10. data/testing/cql_test_model.rb +42 -0
  11. data/testing/cucumber/features/clauses/as_clause.feature +136 -0
  12. data/testing/cucumber/features/clauses/from_clause.feature +126 -0
  13. data/testing/cucumber/features/clauses/select_clause.feature +117 -0
  14. data/testing/cucumber/features/clauses/transform_clause.feature +153 -0
  15. data/testing/cucumber/features/clauses/with_clause.feature +363 -0
  16. data/testing/cucumber/features/dsl.feature +77 -0
  17. data/testing/cucumber/features/model_querying.feature +18 -0
  18. data/testing/cucumber/features/repository.feature +23 -0
  19. data/testing/cucumber/step_definitions/query_steps.rb +7 -0
  20. data/testing/cucumber/step_definitions/setup_steps.rb +25 -0
  21. data/testing/cucumber/step_definitions/verification_steps.rb +78 -0
  22. data/testing/cucumber/support/env.rb +24 -0
  23. data/testing/cucumber/support/transforms.rb +3 -0
  24. data/testing/fixtures/features/combined/a/f1_4_scenarios_5_so.feature +59 -0
  25. data/testing/fixtures/features/combined/a/f2_7_scenarios_2_so.feature +43 -0
  26. data/testing/fixtures/features/combined/a/f3_2_scenarios_3_so.feature +30 -0
  27. data/testing/fixtures/features/combined/b/f1_1_tag.feature +6 -0
  28. data/testing/fixtures/features/combined/b/f2_2_tags.feature +6 -0
  29. data/testing/fixtures/features/combined/b/f3_3_tags.feature +6 -0
  30. data/testing/fixtures/features/examples/basic/test_with_scenarios.feature +15 -0
  31. data/testing/fixtures/features/examples/filters/tag_count/simple.feature +21 -0
  32. data/testing/fixtures/features/examples/filters/tag_count/simple2.feature +21 -0
  33. data/testing/fixtures/features/examples/filters/tags/simple.feature +34 -0
  34. data/testing/fixtures/features/examples/filters/tags2/simple.feature +34 -0
  35. data/testing/fixtures/features/examples/filters/tags2/simple2.feature +34 -0
  36. data/testing/fixtures/features/examples/multiple_examples/test_with_scenarios.feature +43 -0
  37. data/testing/fixtures/features/examples/name_filter/name.feature +19 -0
  38. data/testing/fixtures/features/got/Lannisters.feature +24 -0
  39. data/testing/fixtures/features/got/Starks.feature +18 -0
  40. data/testing/fixtures/features/scen_outlines/basic/test_with_scenarios.feature +15 -0
  41. data/testing/fixtures/features/scen_outlines/filters/tag_count/simple.feature +21 -0
  42. data/testing/fixtures/features/scen_outlines/filters/tag_count/simple2.feature +21 -0
  43. data/testing/fixtures/features/scen_outlines/filters/tags/simple.feature +34 -0
  44. data/testing/fixtures/features/scen_outlines/filters/tags2/simple.feature +34 -0
  45. data/testing/fixtures/features/scen_outlines/filters/tags2/simple2.feature +34 -0
  46. data/testing/fixtures/features/scen_outlines/line_count/simple.feature +12 -0
  47. data/testing/fixtures/features/scen_outlines/line_count/simple2.feature +16 -0
  48. data/testing/fixtures/features/scen_outlines/line_filter/ll.feature +13 -0
  49. data/testing/fixtures/features/scen_outlines/multiple_examples/test_with_scenarios.feature +43 -0
  50. data/testing/fixtures/features/scen_outlines/name_filter/name.feature +19 -0
  51. data/testing/fixtures/features/scenario/line_count/simple.feature +9 -0
  52. data/testing/fixtures/features/scenario/line_count/simple2.feature +12 -0
  53. data/testing/fixtures/features/scenario/line_filter/ll.feature +9 -0
  54. data/testing/fixtures/features/scenario/name_filter/name.feature +13 -0
  55. data/testing/fixtures/features/scenario/simple/simple.feature +8 -0
  56. data/testing/fixtures/features/scenario/simple/test.feature +9 -0
  57. data/testing/fixtures/features/scenario/simple/test2.feature +5 -0
  58. data/testing/fixtures/features/scenario/simple/test_full.feature +22 -0
  59. data/testing/fixtures/features/scenario/simple2/test_full.feature +23 -0
  60. data/testing/fixtures/features/scenario/table/simple.feature +11 -0
  61. data/testing/fixtures/features/scenario/tag_count/simple.feature +17 -0
  62. data/testing/fixtures/features/scenario/tag_count/simple2.feature +17 -0
  63. data/testing/fixtures/features/scenario/tagged_features/simple.feature +8 -0
  64. data/testing/fixtures/features/scenario/tagged_features/test.feature +10 -0
  65. data/testing/fixtures/features/scenario/tagged_features/test2.feature +6 -0
  66. data/testing/fixtures/features/scenario/tagged_features/test_full.feature +22 -0
  67. data/testing/fixtures/features/scenario/tags/simple.feature +24 -0
  68. data/testing/fixtures/features/scenario/tags2/simple.feature +24 -0
  69. data/testing/fixtures/features/scenario/tags2/simple2.feature +24 -0
  70. data/testing/fixtures/features/scenario/tags3/simple.feature +21 -0
  71. data/testing/gemfiles/cuke_modeler0.gemfile +30 -0
  72. data/testing/gemfiles/cuke_modeler1.gemfile +30 -0
  73. data/testing/rspec/spec/dsl_spec.rb +600 -0
  74. data/testing/rspec/spec/filter_example_spec.rb +65 -0
  75. data/testing/rspec/spec/filter_feature_dsl_spec.rb +286 -0
  76. data/testing/rspec/spec/filter_sso_spec.rb +202 -0
  77. data/testing/rspec/spec/line_count_filterable_specs.rb +74 -0
  78. data/testing/rspec/spec/line_filterable_specs.rb +52 -0
  79. data/testing/rspec/spec/map_reduce_spec.rb +135 -0
  80. data/testing/rspec/spec/model_query_spec.rb +49 -0
  81. data/testing/rspec/spec/multiple_queries_spec.rb +24 -0
  82. data/testing/rspec/spec/name_filterable_specs.rb +52 -0
  83. data/testing/rspec/spec/queriable_specs.rb +45 -0
  84. data/testing/rspec/spec/repository_spec.rb +82 -0
  85. data/testing/rspec/spec/select_feature_dsl_spec.rb +114 -0
  86. data/testing/rspec/spec/select_scen_outline_dsl_spec.rb +234 -0
  87. data/testing/rspec/spec/select_scenario_dsl_spec.rb +132 -0
  88. data/testing/rspec/spec/spec_helper.rb +42 -0
  89. data/testing/rspec/spec/tag_filterable_specs.rb +107 -0
  90. metadata +170 -5
@@ -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: name1
4
+ Given Something
5
+ Then something else
6
+ Examples:
7
+ | param |
8
+
9
+ Scenario Outline: name2
10
+ Given Something
11
+ Then something else
12
+ Examples:
13
+ | param |
14
+
15
+ Scenario Outline: name3
16
+ Given Something
17
+ Then something else
18
+ Examples:
19
+ | param |
@@ -0,0 +1,9 @@
1
+ Feature: Line Count
2
+
3
+ Scenario: 1 line
4
+ Given Something
5
+
6
+
7
+ Scenario: 2 lines
8
+ Given Something
9
+ Then something else
@@ -0,0 +1,12 @@
1
+ Feature: Line Count 2
2
+
3
+ Scenario: 3 lines
4
+ Given Something
5
+ Then something else
6
+ Then something else
7
+
8
+ Scenario: 4 lines
9
+ Given Something
10
+ Given Something
11
+ Given Something
12
+ Given Something
@@ -0,0 +1,9 @@
1
+ Feature: Simple
2
+
3
+ Scenario: sc1
4
+ Given all match
5
+ Then green eggs and ham
6
+
7
+ Scenario: sc2
8
+ Given some other phrase
9
+ Then all match
@@ -0,0 +1,13 @@
1
+ Feature: Names1
2
+
3
+ Scenario: name1
4
+ Given Something
5
+ Then something else
6
+
7
+ Scenario: name2
8
+ Given Something
9
+ Then something else
10
+
11
+ Scenario: name3
12
+ Given Something
13
+ Then something else
@@ -0,0 +1,8 @@
1
+ Feature: Simple
2
+
3
+ Scenario: Has a table
4
+ Given Something
5
+ |a|a|
6
+ |s|a|
7
+ |s|s|
8
+ Then something else
@@ -0,0 +1,9 @@
1
+ Feature: Test Feature
2
+
3
+ Scenario: Testing the slurping 1
4
+ Given something happend
5
+ Then I expect something else
6
+
7
+ Scenario: Testing the slurping not to be found
8
+ Given something happend
9
+ Then I expect something else
@@ -0,0 +1,5 @@
1
+ Feature: Test2 Feature
2
+
3
+ Scenario: Testing the slurping 2
4
+ Given something happend
5
+ Then I expect something else
@@ -0,0 +1,22 @@
1
+ @top-tag
2
+ Feature: Test3 Feature
3
+
4
+ @one
5
+ Scenario: Testing the slurping 3
6
+ Given something happend
7
+ Then I expect something else
8
+
9
+ @two
10
+ Scenario: Testing again
11
+ Given something happend
12
+ Then I expect something else
13
+
14
+ @one
15
+ Scenario: Testing yet again
16
+ Given something happend
17
+ Then I expect something else
18
+
19
+ @one @two
20
+ Scenario: Testing yet again part 2
21
+ Given something happend
22
+ Then I expect something else
@@ -0,0 +1,23 @@
1
+ @top-tag
2
+ Feature: Test3 Feature
3
+ The cat in the hat
4
+
5
+ @one
6
+ Scenario: Testing the slurping
7
+ Given something happend
8
+ Then I expect something else
9
+
10
+ @two
11
+ Scenario: Testing again
12
+ Given something happend
13
+ Then I expect something else
14
+
15
+ @one
16
+ Scenario: Testing yet again
17
+ Given something happend
18
+ Then I expect something else
19
+
20
+ @one @two
21
+ Scenario: Testing yet again part 2
22
+ Given something happend
23
+ Then I expect something else
@@ -0,0 +1,11 @@
1
+ Feature: Simple
2
+
3
+ @scenario_tag
4
+ Scenario: Has a table
5
+ Scenario description.
6
+
7
+ Given Something
8
+ |a|a|
9
+ |s|a|
10
+ |s|s|
11
+ Then something else
@@ -0,0 +1,17 @@
1
+ Feature: Simple
2
+
3
+ @one
4
+ Scenario: 1 tag
5
+ Given Something
6
+ | a | a |
7
+ | s | a |
8
+ | s | s |
9
+ Then something else
10
+
11
+ @one @two
12
+ Scenario: 2 tags
13
+ Given Something
14
+ | a | a |
15
+ | s | a |
16
+ | s | s |
17
+ Then something else
@@ -0,0 +1,17 @@
1
+ Feature: Simple2
2
+
3
+ @one @two @three
4
+ Scenario: 3 tags
5
+ Given Something
6
+ | a | a |
7
+ | s | a |
8
+ | s | s |
9
+ Then something else
10
+
11
+ @one @two @three @four
12
+ Scenario: 4 tags
13
+ Given Something
14
+ | a | a |
15
+ | s | a |
16
+ | s | s |
17
+ Then something else
@@ -0,0 +1,8 @@
1
+ Feature: Simple
2
+
3
+ Scenario: Has a table
4
+ Given Something
5
+ |a|a|
6
+ |s|a|
7
+ |s|s|
8
+ Then something else
@@ -0,0 +1,10 @@
1
+ @one
2
+ Feature: Test Feature
3
+
4
+ Scenario: Testing the slurping
5
+ Given something happend
6
+ Then I expect something else
7
+
8
+ Scenario: Testing the slurping not to be found
9
+ Given something happend
10
+ Then I expect something else
@@ -0,0 +1,6 @@
1
+ @two
2
+ Feature: Test2 Feature
3
+
4
+ Scenario: Testing the slurping
5
+ Given something happend
6
+ Then I expect something else
@@ -0,0 +1,22 @@
1
+ @one @two
2
+ Feature: Test3 Feature
3
+
4
+ @one
5
+ Scenario: Testing the slurping
6
+ Given something happend
7
+ Then I expect something else
8
+
9
+ @two
10
+ Scenario: Testing again
11
+ Given something happend
12
+ Then I expect something else
13
+
14
+ @one
15
+ Scenario: Testing yet again
16
+ Given something happend
17
+ Then I expect something else
18
+
19
+ @one @two
20
+ Scenario: Testing yet again part 2
21
+ Given something happend
22
+ Then I expect something else
@@ -0,0 +1,24 @@
1
+ Feature: Simple
2
+
3
+ @two
4
+ Scenario: Has a table
5
+ Given Something
6
+ | a | a |
7
+ | s | a |
8
+ | s | s |
9
+ Then something else
10
+
11
+ @one
12
+ Scenario: Next
13
+ Given anything
14
+
15
+ @two
16
+ Scenario: Blah
17
+ Given lalala
18
+
19
+ @one
20
+ Scenario: Another
21
+ Given a car
22
+
23
+ Scenario: Yet Another
24
+ Given a car
@@ -0,0 +1,24 @@
1
+ Feature: Simple
2
+
3
+ @two
4
+ Scenario: Has a table
5
+ Given Something
6
+ | a | a |
7
+ | s | a |
8
+ | s | s |
9
+ Then something else
10
+
11
+ @one
12
+ Scenario: Next
13
+ Given anything
14
+
15
+ Scenario: Another
16
+ Given a car
17
+
18
+ @two
19
+ Scenario: Blah
20
+ Given lalala
21
+
22
+ @one
23
+ Scenario: Another
24
+ Given a car
@@ -0,0 +1,24 @@
1
+ Feature: Simple 2
2
+
3
+ @two @four
4
+ Scenario: Has a table hmmm
5
+ Given Something
6
+ | a | a |
7
+ | s | a |
8
+ | s | s |
9
+ Then something else
10
+
11
+ @one @five
12
+ Scenario: Next
13
+ Given anything
14
+
15
+ Scenario: Another
16
+ Given a car
17
+
18
+ @two
19
+ Scenario: Blah blah
20
+ Given lalala
21
+
22
+ @one
23
+ Scenario: Another
24
+ Given a car
@@ -0,0 +1,21 @@
1
+ Feature: Simple
2
+
3
+ @two
4
+ Scenario: Has a table
5
+ Given Something
6
+ | a | a |
7
+ | s | a |
8
+ | s | s |
9
+ Then something else
10
+
11
+ @one
12
+ Scenario: Next
13
+ Given anything
14
+
15
+ @two
16
+ Scenario: Blah
17
+ Given lalala
18
+
19
+ @one
20
+ Scenario: Another
21
+ Given a car
@@ -0,0 +1,30 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :path => "../../"
4
+
5
+
6
+ # cql can play with pretty much any version of these but they all play differently with Ruby
7
+ if RUBY_VERSION =~ /^1\.8/
8
+ gem 'cucumber', '< 1.3.0'
9
+ gem 'gherkin', '< 2.12.0'
10
+ gem 'mime-types', '< 2.0.0' # (For the relish gem) Ruby 1.8.x dropped somewhere in the 2.x series
11
+ gem 'rest-client', '< 1.7.0' # (For the relish gem) Ruby 1.8.x dropped on/after this version
12
+ gem 'rake', '< 11.0' # Rake dropped 1.8.x support after this version
13
+ elsif RUBY_VERSION =~ /^1\./
14
+ gem 'cucumber', '< 2.0.0'
15
+ gem 'mime-types', '< 3.0.0' # Requires Ruby 2.x on/after this version
16
+ gem 'rest-client', '< 2.0.0' # Requires Ruby 2.x on/after this version
17
+ end
18
+
19
+ if RUBY_VERSION =~ /^1\./
20
+ gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
21
+ gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
22
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
23
+ end
24
+
25
+ if RUBY_VERSION =~ /^2\.[23456789]/
26
+ gem 'test-unit'
27
+ end
28
+
29
+
30
+ gem 'cuke_modeler', '~> 0.0'
@@ -0,0 +1,30 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :path => "../../"
4
+
5
+
6
+ # cql can play with pretty much any version of these but they all play differently with Ruby
7
+ if RUBY_VERSION =~ /^1\.8/
8
+ gem 'cucumber', '< 1.3.0'
9
+ gem 'gherkin', '< 2.12.0'
10
+ gem 'mime-types', '< 2.0.0' # (For the relish gem) Ruby 1.8.x dropped somewhere in the 2.x series
11
+ gem 'rest-client', '< 1.7.0' # (For the relish gem) Ruby 1.8.x dropped on/after this version
12
+ gem 'rake', '< 11.0' # Rake dropped 1.8.x support after this version
13
+ elsif RUBY_VERSION =~ /^1\./
14
+ gem 'cucumber', '< 2.0.0'
15
+ gem 'mime-types', '< 3.0.0' # Requires Ruby 2.x on/after this version
16
+ gem 'rest-client', '< 2.0.0' # Requires Ruby 2.x on/after this version
17
+ end
18
+
19
+ if RUBY_VERSION =~ /^1\./
20
+ gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
21
+ gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
22
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
23
+ end
24
+
25
+ if RUBY_VERSION =~ /^2\.[23456789]/
26
+ gem 'test-unit'
27
+ end
28
+
29
+
30
+ gem 'cuke_modeler', '~> 1.0'