cucumber-cucumber-expressions 12.1.3 → 13.1.2

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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/VERSION +1 -1
  4. data/lib/cucumber/cucumber_expressions/cucumber_expression_generator.rb +0 -4
  5. data/spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb +14 -14
  6. data/spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb +1 -1
  7. data/spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb +2 -2
  8. data/spec/cucumber/cucumber_expressions/cucumber_expression_tokenizer_spec.rb +1 -1
  9. data/spec/cucumber/cucumber_expressions/regular_expression_spec.rb +4 -0
  10. metadata +4 -112
  11. data/.github/ISSUE_TEMPLATE.md +0 -5
  12. data/.github/PULL_REQUEST_TEMPLATE.md +0 -5
  13. data/.rsync +0 -5
  14. data/.subrepo +0 -1
  15. data/examples.txt +0 -43
  16. data/spec/cucumber/cucumber_expressions/expression_examples_spec.rb +0 -30
  17. data/testdata/ast/alternation-followed-by-optional.yaml +0 -17
  18. data/testdata/ast/alternation-phrase.yaml +0 -16
  19. data/testdata/ast/alternation-with-parameter.yaml +0 -27
  20. data/testdata/ast/alternation-with-unused-end-optional.yaml +0 -15
  21. data/testdata/ast/alternation-with-unused-start-optional.yaml +0 -8
  22. data/testdata/ast/alternation-with-white-space.yaml +0 -12
  23. data/testdata/ast/alternation.yaml +0 -12
  24. data/testdata/ast/anonymous-parameter.yaml +0 -5
  25. data/testdata/ast/closing-brace.yaml +0 -5
  26. data/testdata/ast/closing-parenthesis.yaml +0 -5
  27. data/testdata/ast/empty-alternation.yaml +0 -8
  28. data/testdata/ast/empty-alternations.yaml +0 -9
  29. data/testdata/ast/empty-string.yaml +0 -3
  30. data/testdata/ast/escaped-alternation.yaml +0 -5
  31. data/testdata/ast/escaped-backslash.yaml +0 -5
  32. data/testdata/ast/escaped-opening-parenthesis.yaml +0 -5
  33. data/testdata/ast/escaped-optional-followed-by-optional.yaml +0 -15
  34. data/testdata/ast/escaped-optional-phrase.yaml +0 -10
  35. data/testdata/ast/escaped-optional.yaml +0 -7
  36. data/testdata/ast/opening-brace.yaml +0 -8
  37. data/testdata/ast/opening-parenthesis.yaml +0 -8
  38. data/testdata/ast/optional-containing-nested-optional.yaml +0 -15
  39. data/testdata/ast/optional-phrase.yaml +0 -12
  40. data/testdata/ast/optional.yaml +0 -7
  41. data/testdata/ast/parameter.yaml +0 -7
  42. data/testdata/ast/phrase.yaml +0 -9
  43. data/testdata/ast/unfinished-parameter.yaml +0 -8
  44. data/testdata/expression/allows-escaped-optional-parameter-types.yaml +0 -4
  45. data/testdata/expression/allows-parameter-type-in-alternation-1.yaml +0 -4
  46. data/testdata/expression/allows-parameter-type-in-alternation-2.yaml +0 -4
  47. data/testdata/expression/does-allow-parameter-adjacent-to-alternation.yaml +0 -5
  48. data/testdata/expression/does-not-allow-alternation-in-optional.yaml +0 -9
  49. data/testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-left-parameter.yaml +0 -10
  50. data/testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-optional.yaml +0 -9
  51. data/testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-right-parameter.yaml +0 -9
  52. data/testdata/expression/does-not-allow-alternation-with-empty-alternative.yaml +0 -9
  53. data/testdata/expression/does-not-allow-empty-optional.yaml +0 -9
  54. data/testdata/expression/does-not-allow-nested-optional.yaml +0 -8
  55. data/testdata/expression/does-not-allow-optional-parameter-types.yaml +0 -9
  56. data/testdata/expression/does-not-allow-parameter-name-with-reserved-characters.yaml +0 -10
  57. data/testdata/expression/does-not-allow-unfinished-parenthesis-1.yaml +0 -8
  58. data/testdata/expression/does-not-allow-unfinished-parenthesis-2.yaml +0 -8
  59. data/testdata/expression/does-not-allow-unfinished-parenthesis-3.yaml +0 -8
  60. data/testdata/expression/does-not-match-misquoted-string.yaml +0 -4
  61. data/testdata/expression/doesnt-match-float-as-int.yaml +0 -5
  62. data/testdata/expression/matches-alternation.yaml +0 -4
  63. data/testdata/expression/matches-anonymous-parameter-type.yaml +0 -5
  64. data/testdata/expression/matches-double-quoted-empty-string-as-empty-string-along-with-other-strings.yaml +0 -4
  65. data/testdata/expression/matches-double-quoted-empty-string-as-empty-string.yaml +0 -4
  66. data/testdata/expression/matches-double-quoted-string-with-escaped-double-quote.yaml +0 -4
  67. data/testdata/expression/matches-double-quoted-string-with-single-quotes.yaml +0 -4
  68. data/testdata/expression/matches-double-quoted-string.yaml +0 -4
  69. data/testdata/expression/matches-doubly-escaped-parenthesis.yaml +0 -4
  70. data/testdata/expression/matches-doubly-escaped-slash-1.yaml +0 -4
  71. data/testdata/expression/matches-doubly-escaped-slash-2.yaml +0 -4
  72. data/testdata/expression/matches-escaped-parenthesis-1.yaml +0 -4
  73. data/testdata/expression/matches-escaped-parenthesis-2.yaml +0 -4
  74. data/testdata/expression/matches-escaped-parenthesis-3.yaml +0 -4
  75. data/testdata/expression/matches-escaped-slash.yaml +0 -4
  76. data/testdata/expression/matches-float-1.yaml +0 -5
  77. data/testdata/expression/matches-float-2.yaml +0 -5
  78. data/testdata/expression/matches-int.yaml +0 -5
  79. data/testdata/expression/matches-multiple-double-quoted-strings.yaml +0 -4
  80. data/testdata/expression/matches-multiple-single-quoted-strings.yaml +0 -4
  81. data/testdata/expression/matches-optional-before-alternation-1.yaml +0 -4
  82. data/testdata/expression/matches-optional-before-alternation-2.yaml +0 -4
  83. data/testdata/expression/matches-optional-before-alternation-with-regex-characters-1.yaml +0 -4
  84. data/testdata/expression/matches-optional-before-alternation-with-regex-characters-2.yaml +0 -4
  85. data/testdata/expression/matches-optional-in-alternation-1.yaml +0 -5
  86. data/testdata/expression/matches-optional-in-alternation-2.yaml +0 -5
  87. data/testdata/expression/matches-optional-in-alternation-3.yaml +0 -5
  88. data/testdata/expression/matches-single-quoted-empty-string-as-empty-string-along-with-other-strings.yaml +0 -4
  89. data/testdata/expression/matches-single-quoted-empty-string-as-empty-string.yaml +0 -4
  90. data/testdata/expression/matches-single-quoted-string-with-double-quotes.yaml +0 -4
  91. data/testdata/expression/matches-single-quoted-string-with-escaped-single-quote.yaml +0 -4
  92. data/testdata/expression/matches-single-quoted-string.yaml +0 -4
  93. data/testdata/expression/matches-word.yaml +0 -4
  94. data/testdata/expression/throws-unknown-parameter-type.yaml +0 -10
  95. data/testdata/regex/alternation-with-optional.yaml +0 -2
  96. data/testdata/regex/alternation.yaml +0 -2
  97. data/testdata/regex/empty.yaml +0 -2
  98. data/testdata/regex/escape-regex-characters.yaml +0 -2
  99. data/testdata/regex/optional.yaml +0 -2
  100. data/testdata/regex/parameter.yaml +0 -2
  101. data/testdata/regex/text.yaml +0 -2
  102. data/testdata/regex/unicode.yaml +0 -2
  103. data/testdata/tokens/alternation-phrase.yaml +0 -13
  104. data/testdata/tokens/alternation.yaml +0 -9
  105. data/testdata/tokens/empty-string.yaml +0 -6
  106. data/testdata/tokens/escape-non-reserved-character.yaml +0 -8
  107. data/testdata/tokens/escaped-alternation.yaml +0 -9
  108. data/testdata/tokens/escaped-char-has-start-index-of-text-token.yaml +0 -9
  109. data/testdata/tokens/escaped-end-of-line.yaml +0 -8
  110. data/testdata/tokens/escaped-optional.yaml +0 -7
  111. data/testdata/tokens/escaped-parameter.yaml +0 -7
  112. data/testdata/tokens/escaped-space.yaml +0 -7
  113. data/testdata/tokens/optional-phrase.yaml +0 -13
  114. data/testdata/tokens/optional.yaml +0 -9
  115. data/testdata/tokens/parameter-phrase.yaml +0 -13
  116. data/testdata/tokens/parameter.yaml +0 -9
  117. data/testdata/tokens/phrase.yaml +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 835681a50d84da6545175902b2bf1a087dad9eee4e59a7dd946fa21573871d2b
4
- data.tar.gz: 0df216f515832aacec2287b393c0654a0fc7e973251d0dbc56821e17275cd244
3
+ metadata.gz: d6aa21b225dd4fb1541ef742c6674c376adc5a20891bfef8bd386947f185a22d
4
+ data.tar.gz: 7c40d3ee026e9a66bd7be23c6183aeedfeadd97dc0af693cd57e3944a40ba573
5
5
  SHA512:
6
- metadata.gz: eb76f7f7165bbe2e4cc0bdd3d1b708c242dec2f094a8e7d2714fb53f46f6eeb2573f00da459de6e80fb88b0f5b333322fbd4ef6f07c5ac7b3b7de39f8881b0db
7
- data.tar.gz: 997efe8372e077bde04cc119f1a2fce63a1b4c0cee6b6160536d507dab3abc897e5db5e0f864cd4114275feca7353cf9f862a70ad2996e6ce4e408b1e844bd4b
6
+ metadata.gz: edbce790270f5728fcd444387b24329d594ea962f7e9787ecbb609f5f8a02bfb72bf180ccb83d6a4b6f7400c495d9e3e73732678a2fcbff138ebe9333019f630
7
+ data.tar.gz: f45358cbada6c80847ea828c2233e67819246acddee2f6bd54314275d533d404e776c2e5e9e2fc6abbb8b01ce0f46cca6d289145f9e7161d3b69e914887a1ebd
data/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # Cucumber Expressions for Ruby
2
2
 
3
- [The docs are here](https://cucumber.io/docs/cucumber/cucumber-expressions/).
3
+ [The docs are here](https://github.com/cucumber/cucumber-expressions#readme).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 12.1.3
1
+ 13.1.2
@@ -9,10 +9,6 @@ module Cucumber
9
9
  @parameter_type_registry = parameter_type_registry
10
10
  end
11
11
 
12
- def generate_expression(text)
13
- generate_expressions(text)[0]
14
- end
15
-
16
12
  def generate_expressions(text)
17
13
  parameter_type_combinations = []
18
14
  parameter_type_matchers = create_parameter_type_matchers(text)
@@ -19,7 +19,7 @@ module Cucumber
19
19
  ### [generate-expression]
20
20
  generator = CucumberExpressionGenerator.new(parameter_registry)
21
21
  undefined_step_text = "I have 2 cucumbers and 1.5 tomato"
22
- generated_expression = generator.generate_expression(undefined_step_text)
22
+ generated_expression = generator.generate_expressions(undefined_step_text)[0]
23
23
  expect(generated_expression.source).to eq("I have {int} cucumbers and {float} tomato")
24
24
  expect(generated_expression.parameter_types[1].type).to eq(Float)
25
25
  ### [generate-expression]
@@ -93,7 +93,7 @@ module Cucumber
93
93
  end
94
94
 
95
95
  it "exposes parameters in generated expression" do
96
- expression = @generator.generate_expression("I have 2 cukes and 1.5 euro")
96
+ expression = @generator.generate_expressions("I have 2 cukes and 1.5 euro")[0]
97
97
  types = expression.parameter_types.map(&:type)
98
98
  expect(types).to eq([Integer, Float])
99
99
  end
@@ -175,18 +175,18 @@ module Cucumber
175
175
  end
176
176
 
177
177
  it "at the beginning of a word" do
178
- expect(@generator.generate_expression("When I download a picture").source).not_to eq("When I {direction}load a picture")
179
- expect(@generator.generate_expression("When I download a picture").source).to eq("When I download a picture")
178
+ expect(@generator.generate_expressions("When I download a picture")[0].source).not_to eq("When I {direction}load a picture")
179
+ expect(@generator.generate_expressions("When I download a picture")[0].source).to eq("When I download a picture")
180
180
  end
181
181
 
182
182
  it "inside a word" do
183
- expect(@generator.generate_expression("When I watch the muppet show").source).not_to eq("When I watch the m{direction}pet show")
184
- expect(@generator.generate_expression("When I watch the muppet show").source).to eq("When I watch the muppet show")
183
+ expect(@generator.generate_expressions("When I watch the muppet show")[0].source).not_to eq("When I watch the m{direction}pet show")
184
+ expect(@generator.generate_expressions("When I watch the muppet show")[0].source).to eq("When I watch the muppet show")
185
185
  end
186
186
 
187
187
  it "at the end of a word" do
188
- expect(@generator.generate_expression("When I create a group").source).not_to eq("When I create a gro{direction}")
189
- expect(@generator.generate_expression("When I create a group").source).to eq("When I create a group")
188
+ expect(@generator.generate_expressions("When I create a group")[0].source).not_to eq("When I create a gro{direction}")
189
+ expect(@generator.generate_expressions("When I create a group")[0].source).to eq("When I create a group")
190
190
  end
191
191
  end
192
192
 
@@ -203,19 +203,19 @@ module Cucumber
203
203
  end
204
204
 
205
205
  it "a full word" do
206
- expect(@generator.generate_expression("When I go down the road").source).to eq("When I go {direction} the road")
207
- expect(@generator.generate_expression("When I walk up the hill").source).to eq("When I walk {direction} the hill")
208
- expect(@generator.generate_expression("up the hill, the road goes down").source).to eq("{direction} the hill, the road goes {direction}")
206
+ expect(@generator.generate_expressions("When I go down the road")[0].source).to eq("When I go {direction} the road")
207
+ expect(@generator.generate_expressions("When I walk up the hill")[0].source).to eq("When I walk {direction} the hill")
208
+ expect(@generator.generate_expressions("up the hill, the road goes down")[0].source).to eq("{direction} the hill, the road goes {direction}")
209
209
  end
210
210
 
211
211
  it 'wrapped around punctuation characters' do
212
- expect(@generator.generate_expression("When direction is:down").source).to eq("When direction is:{direction}")
213
- expect(@generator.generate_expression("Then direction is down.").source).to eq("Then direction is {direction}.")
212
+ expect(@generator.generate_expressions("When direction is:down")[0].source).to eq("When direction is:{direction}")
213
+ expect(@generator.generate_expressions("Then direction is down.")[0].source).to eq("Then direction is {direction}.")
214
214
  end
215
215
  end
216
216
 
217
217
  def assert_expression(expected_expression, expected_argument_names, text)
218
- generated_expression = @generator.generate_expression(text)
218
+ generated_expression = @generator.generate_expressions(text)[0]
219
219
  expect(generated_expression.parameter_names).to eq(expected_argument_names)
220
220
  expect(generated_expression.source).to eq(expected_expression)
221
221
 
@@ -6,7 +6,7 @@ require 'cucumber/cucumber_expressions/errors'
6
6
  module Cucumber
7
7
  module CucumberExpressions
8
8
  describe 'Cucumber expression parser' do
9
- Dir['testdata/ast/*.yaml'].each do |testcase|
9
+ Dir['../testdata/ast/*.yaml'].each do |testcase|
10
10
  expectation = YAML.load_file(testcase) # encoding?
11
11
  it "#{testcase}" do
12
12
  parser = CucumberExpressionParser.new
@@ -7,7 +7,7 @@ module Cucumber
7
7
  module CucumberExpressions
8
8
  describe CucumberExpression do
9
9
 
10
- Dir['testdata/expression/*.yaml'].each do |testcase|
10
+ Dir['../testdata/expression/*.yaml'].each do |testcase|
11
11
  expectation = YAML.load_file(testcase) # encoding?
12
12
  it "#{testcase}" do
13
13
  parameter_registry = ParameterTypeRegistry.new
@@ -25,7 +25,7 @@ module Cucumber
25
25
  end
26
26
  end
27
27
 
28
- Dir['testdata/regex/*.yaml'].each do |testcase|
28
+ Dir['../testdata/regex/*.yaml'].each do |testcase|
29
29
  expectation = YAML.load_file(testcase) # encoding?
30
30
  it "#{testcase}" do
31
31
  parameter_registry = ParameterTypeRegistry.new
@@ -6,7 +6,7 @@ require 'cucumber/cucumber_expressions/errors'
6
6
  module Cucumber
7
7
  module CucumberExpressions
8
8
  describe 'Cucumber expression tokenizer' do
9
- Dir['testdata/tokens/*.yaml'].each do |testcase|
9
+ Dir['../testdata/tokens/*.yaml'].each do |testcase|
10
10
  expectation = YAML.load_file(testcase) # encoding?
11
11
  it "#{testcase}" do
12
12
  tokenizer = CucumberExpressionTokenizer.new
@@ -36,6 +36,10 @@ module Cucumber
36
36
  expect( match(/hello/, "world") ).to be_nil
37
37
  end
38
38
 
39
+ it "matches empty string when there is an empty string match" do
40
+ expect( match(/^The value equals "([^"]*)"$/, 'The value equals ""') ).to eq([''])
41
+ end
42
+
39
43
  it "matches nested capture group without match" do
40
44
  expect( match(/^a user( named "([^"]*)")?$/, 'a user') ).to eq([nil])
41
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-cucumber-expressions
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.1.3
4
+ version: 13.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-01 00:00:00.000000000 Z
11
+ date: 2021-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -56,11 +56,7 @@ executables: []
56
56
  extensions: []
57
57
  extra_rdoc_files: []
58
58
  files:
59
- - ".github/ISSUE_TEMPLATE.md"
60
- - ".github/PULL_REQUEST_TEMPLATE.md"
61
59
  - ".rspec"
62
- - ".rsync"
63
- - ".subrepo"
64
60
  - Gemfile
65
61
  - LICENSE
66
62
  - Makefile
@@ -69,7 +65,6 @@ files:
69
65
  - VERSION
70
66
  - cucumber-cucumber-expressions.gemspec
71
67
  - default.mk
72
- - examples.txt
73
68
  - lib/cucumber/cucumber_expressions/argument.rb
74
69
  - lib/cucumber/cucumber_expressions/ast.rb
75
70
  - lib/cucumber/cucumber_expressions/combinatorial_generated_expression_factory.rb
@@ -96,113 +91,11 @@ files:
96
91
  - spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb
97
92
  - spec/cucumber/cucumber_expressions/cucumber_expression_tokenizer_spec.rb
98
93
  - spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb
99
- - spec/cucumber/cucumber_expressions/expression_examples_spec.rb
100
94
  - spec/cucumber/cucumber_expressions/expression_factory_spec.rb
101
95
  - spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb
102
96
  - spec/cucumber/cucumber_expressions/parameter_type_spec.rb
103
97
  - spec/cucumber/cucumber_expressions/regular_expression_spec.rb
104
98
  - spec/cucumber/cucumber_expressions/tree_regexp_spec.rb
105
- - testdata/ast/alternation-followed-by-optional.yaml
106
- - testdata/ast/alternation-phrase.yaml
107
- - testdata/ast/alternation-with-parameter.yaml
108
- - testdata/ast/alternation-with-unused-end-optional.yaml
109
- - testdata/ast/alternation-with-unused-start-optional.yaml
110
- - testdata/ast/alternation-with-white-space.yaml
111
- - testdata/ast/alternation.yaml
112
- - testdata/ast/anonymous-parameter.yaml
113
- - testdata/ast/closing-brace.yaml
114
- - testdata/ast/closing-parenthesis.yaml
115
- - testdata/ast/empty-alternation.yaml
116
- - testdata/ast/empty-alternations.yaml
117
- - testdata/ast/empty-string.yaml
118
- - testdata/ast/escaped-alternation.yaml
119
- - testdata/ast/escaped-backslash.yaml
120
- - testdata/ast/escaped-opening-parenthesis.yaml
121
- - testdata/ast/escaped-optional-followed-by-optional.yaml
122
- - testdata/ast/escaped-optional-phrase.yaml
123
- - testdata/ast/escaped-optional.yaml
124
- - testdata/ast/opening-brace.yaml
125
- - testdata/ast/opening-parenthesis.yaml
126
- - testdata/ast/optional-containing-nested-optional.yaml
127
- - testdata/ast/optional-phrase.yaml
128
- - testdata/ast/optional.yaml
129
- - testdata/ast/parameter.yaml
130
- - testdata/ast/phrase.yaml
131
- - testdata/ast/unfinished-parameter.yaml
132
- - testdata/expression/allows-escaped-optional-parameter-types.yaml
133
- - testdata/expression/allows-parameter-type-in-alternation-1.yaml
134
- - testdata/expression/allows-parameter-type-in-alternation-2.yaml
135
- - testdata/expression/does-allow-parameter-adjacent-to-alternation.yaml
136
- - testdata/expression/does-not-allow-alternation-in-optional.yaml
137
- - testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-left-parameter.yaml
138
- - testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-optional.yaml
139
- - testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-right-parameter.yaml
140
- - testdata/expression/does-not-allow-alternation-with-empty-alternative.yaml
141
- - testdata/expression/does-not-allow-empty-optional.yaml
142
- - testdata/expression/does-not-allow-nested-optional.yaml
143
- - testdata/expression/does-not-allow-optional-parameter-types.yaml
144
- - testdata/expression/does-not-allow-parameter-name-with-reserved-characters.yaml
145
- - testdata/expression/does-not-allow-unfinished-parenthesis-1.yaml
146
- - testdata/expression/does-not-allow-unfinished-parenthesis-2.yaml
147
- - testdata/expression/does-not-allow-unfinished-parenthesis-3.yaml
148
- - testdata/expression/does-not-match-misquoted-string.yaml
149
- - testdata/expression/doesnt-match-float-as-int.yaml
150
- - testdata/expression/matches-alternation.yaml
151
- - testdata/expression/matches-anonymous-parameter-type.yaml
152
- - testdata/expression/matches-double-quoted-empty-string-as-empty-string-along-with-other-strings.yaml
153
- - testdata/expression/matches-double-quoted-empty-string-as-empty-string.yaml
154
- - testdata/expression/matches-double-quoted-string-with-escaped-double-quote.yaml
155
- - testdata/expression/matches-double-quoted-string-with-single-quotes.yaml
156
- - testdata/expression/matches-double-quoted-string.yaml
157
- - testdata/expression/matches-doubly-escaped-parenthesis.yaml
158
- - testdata/expression/matches-doubly-escaped-slash-1.yaml
159
- - testdata/expression/matches-doubly-escaped-slash-2.yaml
160
- - testdata/expression/matches-escaped-parenthesis-1.yaml
161
- - testdata/expression/matches-escaped-parenthesis-2.yaml
162
- - testdata/expression/matches-escaped-parenthesis-3.yaml
163
- - testdata/expression/matches-escaped-slash.yaml
164
- - testdata/expression/matches-float-1.yaml
165
- - testdata/expression/matches-float-2.yaml
166
- - testdata/expression/matches-int.yaml
167
- - testdata/expression/matches-multiple-double-quoted-strings.yaml
168
- - testdata/expression/matches-multiple-single-quoted-strings.yaml
169
- - testdata/expression/matches-optional-before-alternation-1.yaml
170
- - testdata/expression/matches-optional-before-alternation-2.yaml
171
- - testdata/expression/matches-optional-before-alternation-with-regex-characters-1.yaml
172
- - testdata/expression/matches-optional-before-alternation-with-regex-characters-2.yaml
173
- - testdata/expression/matches-optional-in-alternation-1.yaml
174
- - testdata/expression/matches-optional-in-alternation-2.yaml
175
- - testdata/expression/matches-optional-in-alternation-3.yaml
176
- - testdata/expression/matches-single-quoted-empty-string-as-empty-string-along-with-other-strings.yaml
177
- - testdata/expression/matches-single-quoted-empty-string-as-empty-string.yaml
178
- - testdata/expression/matches-single-quoted-string-with-double-quotes.yaml
179
- - testdata/expression/matches-single-quoted-string-with-escaped-single-quote.yaml
180
- - testdata/expression/matches-single-quoted-string.yaml
181
- - testdata/expression/matches-word.yaml
182
- - testdata/expression/throws-unknown-parameter-type.yaml
183
- - testdata/regex/alternation-with-optional.yaml
184
- - testdata/regex/alternation.yaml
185
- - testdata/regex/empty.yaml
186
- - testdata/regex/escape-regex-characters.yaml
187
- - testdata/regex/optional.yaml
188
- - testdata/regex/parameter.yaml
189
- - testdata/regex/text.yaml
190
- - testdata/regex/unicode.yaml
191
- - testdata/tokens/alternation-phrase.yaml
192
- - testdata/tokens/alternation.yaml
193
- - testdata/tokens/empty-string.yaml
194
- - testdata/tokens/escape-non-reserved-character.yaml
195
- - testdata/tokens/escaped-alternation.yaml
196
- - testdata/tokens/escaped-char-has-start-index-of-text-token.yaml
197
- - testdata/tokens/escaped-end-of-line.yaml
198
- - testdata/tokens/escaped-optional.yaml
199
- - testdata/tokens/escaped-parameter.yaml
200
- - testdata/tokens/escaped-space.yaml
201
- - testdata/tokens/optional-phrase.yaml
202
- - testdata/tokens/optional.yaml
203
- - testdata/tokens/parameter-phrase.yaml
204
- - testdata/tokens/parameter.yaml
205
- - testdata/tokens/phrase.yaml
206
99
  homepage: https://github.com/cucumber/cucumber-expressions-ruby#readme
207
100
  licenses:
208
101
  - MIT
@@ -228,10 +121,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
121
  - !ruby/object:Gem::Version
229
122
  version: '0'
230
123
  requirements: []
231
- rubygems_version: 3.1.2
124
+ rubygems_version: 3.2.22
232
125
  signing_key:
233
126
  specification_version: 4
234
- summary: cucumber-expressions-12.1.3
127
+ summary: cucumber-expressions-13.1.2
235
128
  test_files:
236
129
  - spec/capture_warnings.rb
237
130
  - spec/cucumber/cucumber_expressions/argument_spec.rb
@@ -241,7 +134,6 @@ test_files:
241
134
  - spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb
242
135
  - spec/cucumber/cucumber_expressions/cucumber_expression_tokenizer_spec.rb
243
136
  - spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb
244
- - spec/cucumber/cucumber_expressions/expression_examples_spec.rb
245
137
  - spec/cucumber/cucumber_expressions/expression_factory_spec.rb
246
138
  - spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb
247
139
  - spec/cucumber/cucumber_expressions/parameter_type_spec.rb
@@ -1,5 +0,0 @@
1
- PLEASE DO NOT CREATE ISSUES IN THIS REPO.
2
- THIS REPO IS A READ-ONLY MIRROR.
3
-
4
- Create your issue in the Cucumber monorepo instead:
5
- https://github.com/cucumber/cucumber/issues
@@ -1,5 +0,0 @@
1
- PLEASE DO NOT CREATE PULL REAUESTS IN THIS REPO.
2
- THIS REPO IS A READ-ONLY MIRROR.
3
-
4
- Create your pull request in the Cucumber monorepo instead:
5
- https://github.com/cucumber/cucumber/pulls
data/.rsync DELETED
@@ -1,5 +0,0 @@
1
- ../../LICENSE LICENSE
2
- ../../.templates/github/ .github/
3
- ../../.templates/ruby/ .
4
- ../examples.txt examples.txt
5
- ../testdata .
data/.subrepo DELETED
@@ -1 +0,0 @@
1
- cucumber/cucumber-expressions-ruby
data/examples.txt DELETED
@@ -1,43 +0,0 @@
1
- I have {int} cuke(s)
2
- I have 22 cukes
3
- [22]
4
- ---
5
- I have {int} cuke(s) and some \\[]^$.|?*+
6
- I have 1 cuke and some \[]^$.|?*+
7
- [1]
8
- ---
9
- /I have (\d+) cukes? in my (\w+) now/
10
- I have 22 cukes in my belly now
11
- [22,"belly"]
12
- ---
13
- /I have (-?\d+) cukes? in my (.*) now/
14
- I have 1 cuke in my belly now
15
- [1,"belly"]
16
- ---
17
- /^Something( with an optional argument)?$/
18
- Something
19
- [null]
20
- ---
21
- Привет, {word}!
22
- Привет, Мир!
23
- ["Мир"]
24
- ---
25
- /I have (.*) cukes? in my (.*) now/
26
- I have 22 cukes in my belly now
27
- ["22","belly"]
28
- ---
29
- I have {} cuke(s) in my {} now
30
- I have 22 cukes in my belly now
31
- ["22","belly"]
32
- ---
33
- /^a (pre-commercial transaction |pre buyer fee model )?purchase(?: for \$(\d+))?$/
34
- a purchase for $33
35
- [null,33]
36
- ---
37
- Some ${float} of cukes at {int}° Celsius
38
- Some $3.50 of cukes at 42° Celsius
39
- [3.5,42]
40
- ---
41
- I select the {int}st/nd/rd/th Cucumber
42
- I select the 3rd Cucumber
43
- [3]
@@ -1,30 +0,0 @@
1
- require 'cucumber/cucumber_expressions/cucumber_expression'
2
- require 'cucumber/cucumber_expressions/regular_expression'
3
- require 'cucumber/cucumber_expressions/parameter_type_registry'
4
- require 'json'
5
-
6
- module Cucumber
7
- module CucumberExpressions
8
- describe 'examples.txt' do
9
- def match(expression_text, text)
10
- expression = expression_text =~ /^\/(.*)\/$/ ?
11
- RegularExpression.new(Regexp.new($1), ParameterTypeRegistry.new) :
12
- CucumberExpression.new(expression_text, ParameterTypeRegistry.new)
13
-
14
- arguments = expression.match(text)
15
- return nil if arguments.nil?
16
- arguments.map { |arg| arg.value(nil) }
17
- end
18
-
19
- File.open(File.expand_path("../../../../examples.txt", __FILE__), "r:utf-8") do |io|
20
- chunks = io.read.split(/^---/m)
21
- chunks.each do |chunk|
22
- expression_text, text, expected_args = *chunk.strip.split(/\n/m)
23
- it "Works with: #{expression_text}" do
24
- expect( match(expression_text, text).to_json ).to eq(expected_args)
25
- end
26
- end
27
- end
28
- end
29
- end
30
- end
@@ -1,17 +0,0 @@
1
- expression: three blind\ rat/cat(s)
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 23, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 5, "token": "three"},
5
- {"type": "TEXT_NODE", "start": 5, "end": 6, "token": " "},
6
- {"type": "ALTERNATION_NODE", "start": 6, "end": 23, "nodes": [
7
- {"type": "ALTERNATIVE_NODE", "start": 6, "end": 16, "nodes": [
8
- {"type": "TEXT_NODE", "start": 6, "end": 16, "token": "blind rat"}
9
- ]},
10
- {"type": "ALTERNATIVE_NODE", "start": 17, "end": 23, "nodes": [
11
- {"type": "TEXT_NODE", "start": 17, "end": 20, "token": "cat"},
12
- {"type": "OPTIONAL_NODE", "start": 20, "end": 23, "nodes": [
13
- {"type": "TEXT_NODE", "start": 21, "end": 22, "token": "s"}
14
- ]}
15
- ]}
16
- ]}
17
- ]}
@@ -1,16 +0,0 @@
1
- expression: three hungry/blind mice
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 23, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 5, "token": "three"},
5
- {"type": "TEXT_NODE", "start": 5, "end": 6, "token": " "},
6
- {"type": "ALTERNATION_NODE", "start": 6, "end": 18, "nodes": [
7
- {"type": "ALTERNATIVE_NODE", "start": 6, "end": 12, "nodes": [
8
- {"type": "TEXT_NODE", "start": 6, "end": 12, "token": "hungry"}
9
- ]},
10
- {"type": "ALTERNATIVE_NODE", "start": 13, "end": 18, "nodes": [
11
- {"type": "TEXT_NODE", "start": 13, "end": 18, "token": "blind"}
12
- ]}
13
- ]},
14
- {"type": "TEXT_NODE", "start": 18, "end": 19, "token": " "},
15
- {"type": "TEXT_NODE", "start": 19, "end": 23, "token": "mice"}
16
- ]}
@@ -1,27 +0,0 @@
1
- expression: I select the {int}st/nd/rd/th
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 29, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 1, "token": "I"},
5
- {"type": "TEXT_NODE", "start": 1, "end": 2, "token": " "},
6
- {"type": "TEXT_NODE", "start": 2, "end": 8, "token": "select"},
7
- {"type": "TEXT_NODE", "start": 8, "end": 9, "token": " "},
8
- {"type": "TEXT_NODE", "start": 9, "end": 12, "token": "the"},
9
- {"type": "TEXT_NODE", "start": 12, "end": 13, "token": " "},
10
- {"type": "PARAMETER_NODE", "start": 13, "end": 18, "nodes": [
11
- {"type": "TEXT_NODE", "start": 14, "end": 17, "token": "int"}
12
- ]},
13
- {"type": "ALTERNATION_NODE", "start": 18, "end": 29, "nodes": [
14
- {"type": "ALTERNATIVE_NODE", "start": 18, "end": 20, "nodes": [
15
- {"type": "TEXT_NODE", "start": 18, "end": 20, "token": "st"}
16
- ]},
17
- {"type": "ALTERNATIVE_NODE", "start": 21, "end": 23, "nodes": [
18
- {"type": "TEXT_NODE", "start": 21, "end": 23, "token": "nd"}
19
- ]},
20
- {"type": "ALTERNATIVE_NODE", "start": 24, "end": 26, "nodes": [
21
- {"type": "TEXT_NODE", "start": 24, "end": 26, "token": "rd"}
22
- ]},
23
- {"type": "ALTERNATIVE_NODE", "start": 27, "end": 29, "nodes": [
24
- {"type": "TEXT_NODE", "start": 27, "end": 29, "token": "th"}
25
- ]}
26
- ]}
27
- ]}
@@ -1,15 +0,0 @@
1
- expression: three )blind\ mice/rats
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 23, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 5, "token": "three"},
5
- {"type": "TEXT_NODE", "start": 5, "end": 6, "token": " "},
6
- {"type": "ALTERNATION_NODE", "start": 6, "end": 23, "nodes": [
7
- {"type": "ALTERNATIVE_NODE", "start": 6, "end": 18, "nodes": [
8
- {"type": "TEXT_NODE", "start": 6, "end": 7, "token": ")"},
9
- {"type": "TEXT_NODE", "start": 7, "end": 18, "token": "blind mice"}
10
- ]},
11
- {"type": "ALTERNATIVE_NODE", "start": 19, "end": 23, "nodes": [
12
- {"type": "TEXT_NODE", "start": 19, "end": 23, "token": "rats"}
13
- ]}
14
- ]}
15
- ]}
@@ -1,8 +0,0 @@
1
- expression: three blind\ mice/rats(
2
- exception: |-
3
- This Cucumber Expression has a problem at column 23:
4
-
5
- three blind\ mice/rats(
6
- ^
7
- The '(' does not have a matching ')'.
8
- If you did not intend to use optional text you can use '\(' to escape the optional text
@@ -1,12 +0,0 @@
1
- expression: '\ three\ hungry/blind\ mice\ '
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 29, "nodes": [
4
- {"type": "ALTERNATION_NODE", "start": 0, "end": 29, "nodes": [
5
- {"type": "ALTERNATIVE_NODE", "start": 0, "end": 15, "nodes": [
6
- {"type": "TEXT_NODE", "start": 0, "end": 15, "token": " three hungry"}
7
- ]},
8
- {"type": "ALTERNATIVE_NODE", "start": 16, "end": 29, "nodes": [
9
- {"type": "TEXT_NODE", "start": 16, "end": 29, "token": "blind mice "}
10
- ]}
11
- ]}
12
- ]}
@@ -1,12 +0,0 @@
1
- expression: mice/rats
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 9, "nodes": [
4
- {"type": "ALTERNATION_NODE", "start": 0, "end": 9, "nodes": [
5
- {"type": "ALTERNATIVE_NODE", "start": 0, "end": 4, "nodes": [
6
- {"type": "TEXT_NODE", "start": 0, "end": 4, "token": "mice"}
7
- ]},
8
- {"type": "ALTERNATIVE_NODE", "start": 5, "end": 9, "nodes": [
9
- {"type": "TEXT_NODE", "start": 5, "end": 9, "token": "rats"}
10
- ]}
11
- ]}
12
- ]}
@@ -1,5 +0,0 @@
1
- expression: "{}"
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 2, "nodes": [
4
- {"type": "PARAMETER_NODE", "start": 0, "end": 2, "nodes": []}
5
- ]}
@@ -1,5 +0,0 @@
1
- expression: "}"
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 1, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 1, "token": "}"}
5
- ]}
@@ -1,5 +0,0 @@
1
- expression: )
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 1, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 1, "token": ")"}
5
- ]}
@@ -1,8 +0,0 @@
1
- expression: /
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 1, "nodes": [
4
- {"type": "ALTERNATION_NODE", "start": 0, "end": 1, "nodes": [
5
- {"type": "ALTERNATIVE_NODE", "start": 0, "end": 0, "nodes": []},
6
- {"type": "ALTERNATIVE_NODE", "start": 1, "end": 1, "nodes": []}
7
- ]}
8
- ]}
@@ -1,9 +0,0 @@
1
- expression: '//'
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 2, "nodes": [
4
- {"type": "ALTERNATION_NODE", "start": 0, "end": 2, "nodes": [
5
- {"type": "ALTERNATIVE_NODE", "start": 0, "end": 0, "nodes": []},
6
- {"type": "ALTERNATIVE_NODE", "start": 1, "end": 1, "nodes": []},
7
- {"type": "ALTERNATIVE_NODE", "start": 2, "end": 2, "nodes": []}
8
- ]}
9
- ]}
@@ -1,3 +0,0 @@
1
- expression: ""
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 0, "nodes": []}
@@ -1,5 +0,0 @@
1
- expression: 'mice\/rats'
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 10, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 10, "token": "mice/rats"}
5
- ]}
@@ -1,5 +0,0 @@
1
- expression: '\\'
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 2, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 2, "token": "\\"}
5
- ]}
@@ -1,5 +0,0 @@
1
- expression: '\('
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 2, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 2, "token": "("}
5
- ]}
@@ -1,15 +0,0 @@
1
- expression: three \((very) blind) mice
2
- expected: |-
3
- {"type": "EXPRESSION_NODE", "start": 0, "end": 26, "nodes": [
4
- {"type": "TEXT_NODE", "start": 0, "end": 5, "token": "three"},
5
- {"type": "TEXT_NODE", "start": 5, "end": 6, "token": " "},
6
- {"type": "TEXT_NODE", "start": 6, "end": 8, "token": "("},
7
- {"type": "OPTIONAL_NODE", "start": 8, "end": 14, "nodes": [
8
- {"type": "TEXT_NODE", "start": 9, "end": 13, "token": "very"}
9
- ]},
10
- {"type": "TEXT_NODE", "start": 14, "end": 15, "token": " "},
11
- {"type": "TEXT_NODE", "start": 15, "end": 20, "token": "blind"},
12
- {"type": "TEXT_NODE", "start": 20, "end": 21, "token": ")"},
13
- {"type": "TEXT_NODE", "start": 21, "end": 22, "token": " "},
14
- {"type": "TEXT_NODE", "start": 22, "end": 26, "token": "mice"}
15
- ]}