cucumber-cucumber-expressions 10.3.0 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/.rsync +1 -0
  3. data/VERSION +1 -1
  4. data/cucumber-cucumber-expressions.gemspec +1 -1
  5. data/examples.txt +5 -1
  6. data/lib/cucumber/cucumber_expressions/ast.rb +201 -0
  7. data/lib/cucumber/cucumber_expressions/cucumber_expression.rb +80 -76
  8. data/lib/cucumber/cucumber_expressions/cucumber_expression_generator.rb +4 -8
  9. data/lib/cucumber/cucumber_expressions/cucumber_expression_parser.rb +219 -0
  10. data/lib/cucumber/cucumber_expressions/cucumber_expression_tokenizer.rb +95 -0
  11. data/lib/cucumber/cucumber_expressions/errors.rb +175 -4
  12. data/lib/cucumber/cucumber_expressions/parameter_type.rb +12 -7
  13. data/spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb +24 -0
  14. data/spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb +62 -140
  15. data/spec/cucumber/cucumber_expressions/cucumber_expression_tokenizer_spec.rb +24 -0
  16. data/spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb +1 -1
  17. data/spec/cucumber/cucumber_expressions/expression_examples_spec.rb +1 -1
  18. data/spec/cucumber/cucumber_expressions/expression_factory_spec.rb +0 -4
  19. data/testdata/ast/alternation-followed-by-optional.yaml +17 -0
  20. data/testdata/ast/alternation-phrase.yaml +16 -0
  21. data/testdata/ast/alternation-with-parameter.yaml +27 -0
  22. data/testdata/ast/alternation-with-unused-end-optional.yaml +15 -0
  23. data/testdata/ast/alternation-with-unused-start-optional.yaml +8 -0
  24. data/testdata/ast/alternation-with-white-space.yaml +12 -0
  25. data/testdata/ast/alternation.yaml +12 -0
  26. data/testdata/ast/anonymous-parameter.yaml +5 -0
  27. data/testdata/ast/closing-brace.yaml +5 -0
  28. data/testdata/ast/closing-parenthesis.yaml +5 -0
  29. data/testdata/ast/empty-alternation.yaml +8 -0
  30. data/testdata/ast/empty-alternations.yaml +9 -0
  31. data/testdata/ast/empty-string.yaml +3 -0
  32. data/testdata/ast/escaped-alternation.yaml +5 -0
  33. data/testdata/ast/escaped-backslash.yaml +5 -0
  34. data/testdata/ast/escaped-opening-parenthesis.yaml +5 -0
  35. data/testdata/ast/escaped-optional-followed-by-optional.yaml +15 -0
  36. data/testdata/ast/escaped-optional-phrase.yaml +10 -0
  37. data/testdata/ast/escaped-optional.yaml +7 -0
  38. data/testdata/ast/opening-brace.yaml +8 -0
  39. data/testdata/ast/opening-parenthesis.yaml +8 -0
  40. data/testdata/ast/optional-containing-nested-optional.yaml +15 -0
  41. data/testdata/ast/optional-phrase.yaml +12 -0
  42. data/testdata/ast/optional.yaml +7 -0
  43. data/testdata/ast/parameter.yaml +7 -0
  44. data/testdata/ast/phrase.yaml +9 -0
  45. data/testdata/ast/unfinished-parameter.yaml +8 -0
  46. data/testdata/expression/allows-escaped-optional-parameter-types.yaml +4 -0
  47. data/testdata/expression/allows-parameter-type-in-alternation-1.yaml +4 -0
  48. data/testdata/expression/allows-parameter-type-in-alternation-2.yaml +4 -0
  49. data/testdata/expression/does-allow-parameter-adjacent-to-alternation.yaml +5 -0
  50. data/testdata/expression/does-not-allow-alternation-in-optional.yaml +9 -0
  51. data/testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-left-parameter.yaml +10 -0
  52. data/testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-optional.yaml +9 -0
  53. data/testdata/expression/does-not-allow-alternation-with-empty-alternative-by-adjacent-right-parameter.yaml +9 -0
  54. data/testdata/expression/does-not-allow-alternation-with-empty-alternative.yaml +9 -0
  55. data/testdata/expression/does-not-allow-empty-optional.yaml +9 -0
  56. data/testdata/expression/does-not-allow-nested-optional.yaml +8 -0
  57. data/testdata/expression/does-not-allow-optional-parameter-types.yaml +9 -0
  58. data/testdata/expression/does-not-allow-parameter-name-with-reserved-characters.yaml +10 -0
  59. data/testdata/expression/does-not-allow-unfinished-parenthesis-1.yaml +8 -0
  60. data/testdata/expression/does-not-allow-unfinished-parenthesis-2.yaml +8 -0
  61. data/testdata/expression/does-not-allow-unfinished-parenthesis-3.yaml +8 -0
  62. data/testdata/expression/does-not-match-misquoted-string.yaml +4 -0
  63. data/testdata/expression/doesnt-match-float-as-int.yaml +5 -0
  64. data/testdata/expression/matches-alternation.yaml +4 -0
  65. data/testdata/expression/matches-anonymous-parameter-type.yaml +5 -0
  66. data/testdata/expression/matches-double-quoted-empty-string-as-empty-string-along-with-other-strings.yaml +4 -0
  67. data/testdata/expression/matches-double-quoted-empty-string-as-empty-string.yaml +4 -0
  68. data/testdata/expression/matches-double-quoted-string-with-escaped-double-quote.yaml +4 -0
  69. data/testdata/expression/matches-double-quoted-string-with-single-quotes.yaml +4 -0
  70. data/testdata/expression/matches-double-quoted-string.yaml +4 -0
  71. data/testdata/expression/matches-doubly-escaped-parenthesis.yaml +4 -0
  72. data/testdata/expression/matches-doubly-escaped-slash-1.yaml +4 -0
  73. data/testdata/expression/matches-doubly-escaped-slash-2.yaml +4 -0
  74. data/testdata/expression/matches-escaped-parenthesis-1.yaml +4 -0
  75. data/testdata/expression/matches-escaped-parenthesis-2.yaml +4 -0
  76. data/testdata/expression/matches-escaped-parenthesis-3.yaml +4 -0
  77. data/testdata/expression/matches-escaped-slash.yaml +4 -0
  78. data/testdata/expression/matches-float-1.yaml +5 -0
  79. data/testdata/expression/matches-float-2.yaml +5 -0
  80. data/testdata/expression/matches-int.yaml +5 -0
  81. data/testdata/expression/matches-multiple-double-quoted-strings.yaml +4 -0
  82. data/testdata/expression/matches-multiple-single-quoted-strings.yaml +4 -0
  83. data/testdata/expression/matches-optional-before-alternation-1.yaml +4 -0
  84. data/testdata/expression/matches-optional-before-alternation-2.yaml +4 -0
  85. data/testdata/expression/matches-optional-before-alternation-with-regex-characters-1.yaml +4 -0
  86. data/testdata/expression/matches-optional-before-alternation-with-regex-characters-2.yaml +4 -0
  87. data/testdata/expression/matches-optional-in-alternation-1.yaml +5 -0
  88. data/testdata/expression/matches-optional-in-alternation-2.yaml +5 -0
  89. data/testdata/expression/matches-optional-in-alternation-3.yaml +5 -0
  90. data/testdata/expression/matches-single-quoted-empty-string-as-empty-string-along-with-other-strings.yaml +4 -0
  91. data/testdata/expression/matches-single-quoted-empty-string-as-empty-string.yaml +4 -0
  92. data/testdata/expression/matches-single-quoted-string-with-double-quotes.yaml +4 -0
  93. data/testdata/expression/matches-single-quoted-string-with-escaped-single-quote.yaml +4 -0
  94. data/testdata/expression/matches-single-quoted-string.yaml +4 -0
  95. data/testdata/expression/matches-word.yaml +4 -0
  96. data/testdata/expression/throws-unknown-parameter-type.yaml +10 -0
  97. data/testdata/regex/alternation-with-optional.yaml +2 -0
  98. data/testdata/regex/alternation.yaml +2 -0
  99. data/testdata/regex/empty.yaml +2 -0
  100. data/testdata/regex/escape-regex-characters.yaml +2 -0
  101. data/testdata/regex/optional.yaml +2 -0
  102. data/testdata/regex/parameter.yaml +2 -0
  103. data/testdata/regex/text.yaml +2 -0
  104. data/testdata/regex/unicode.yaml +2 -0
  105. data/testdata/tokens/alternation-phrase.yaml +13 -0
  106. data/testdata/tokens/alternation.yaml +9 -0
  107. data/testdata/tokens/empty-string.yaml +6 -0
  108. data/testdata/tokens/escape-non-reserved-character.yaml +8 -0
  109. data/testdata/tokens/escaped-alternation.yaml +9 -0
  110. data/testdata/tokens/escaped-char-has-start-index-of-text-token.yaml +9 -0
  111. data/testdata/tokens/escaped-end-of-line.yaml +8 -0
  112. data/testdata/tokens/escaped-optional.yaml +7 -0
  113. data/testdata/tokens/escaped-parameter.yaml +7 -0
  114. data/testdata/tokens/escaped-space.yaml +7 -0
  115. data/testdata/tokens/optional-phrase.yaml +13 -0
  116. data/testdata/tokens/optional.yaml +9 -0
  117. data/testdata/tokens/parameter-phrase.yaml +13 -0
  118. data/testdata/tokens/parameter.yaml +9 -0
  119. data/testdata/tokens/phrase.yaml +11 -0
  120. metadata +115 -9
  121. data/spec/cucumber/cucumber_expressions/cucumber_expression_regexp_spec.rb +0 -57
@@ -0,0 +1,4 @@
1
+ expression: three {string} mice
2
+ text: three "blind" mice
3
+ expected: |-
4
+ ["blind"]
@@ -0,0 +1,4 @@
1
+ expression: three \\(exceptionally) \\{string} mice
2
+ text: three \exceptionally \"blind" mice
3
+ expected: |-
4
+ ["blind"]
@@ -0,0 +1,4 @@
1
+ expression: 12\\/2020
2
+ text: 12\
3
+ expected: |-
4
+ []
@@ -0,0 +1,4 @@
1
+ expression: 12\\/2020
2
+ text: '2020'
3
+ expected: |-
4
+ []
@@ -0,0 +1,4 @@
1
+ expression: three \(exceptionally) \{string} mice
2
+ text: three (exceptionally) {string} mice
3
+ expected: |-
4
+ []
@@ -0,0 +1,4 @@
1
+ expression: three \((exceptionally)) \{{string}} mice
2
+ text: three (exceptionally) {"blind"} mice
3
+ expected: |-
4
+ ["blind"]
@@ -0,0 +1,4 @@
1
+ expression: three \((exceptionally)) \{{string}} mice
2
+ text: three (exceptionally) {"blind"} mice
3
+ expected: |-
4
+ ["blind"]
@@ -0,0 +1,4 @@
1
+ expression: 12\/2020
2
+ text: 12/2020
3
+ expected: |-
4
+ []
@@ -0,0 +1,5 @@
1
+ expression: |-
2
+ {float}
3
+ text: '0.22'
4
+ expected: |-
5
+ [0.22]
@@ -0,0 +1,5 @@
1
+ expression: |-
2
+ {float}
3
+ text: '.22'
4
+ expected: |-
5
+ [0.22]
@@ -0,0 +1,5 @@
1
+ expression: |-
2
+ {int}
3
+ text: '22'
4
+ expected: |-
5
+ [22]
@@ -0,0 +1,4 @@
1
+ expression: three {string} and {string} mice
2
+ text: three "blind" and "crippled" mice
3
+ expected: |-
4
+ ["blind","crippled"]
@@ -0,0 +1,4 @@
1
+ expression: three {string} and {string} mice
2
+ text: three 'blind' and 'crippled' mice
3
+ expected: |-
4
+ ["blind","crippled"]
@@ -0,0 +1,4 @@
1
+ expression: three (brown )mice/rats
2
+ text: three brown mice
3
+ expected: |-
4
+ []
@@ -0,0 +1,4 @@
1
+ expression: three (brown )mice/rats
2
+ text: three rats
3
+ expected: |-
4
+ []
@@ -0,0 +1,4 @@
1
+ expression: I wait {int} second(s)./second(s)?
2
+ text: I wait 2 seconds?
3
+ expected: |-
4
+ [2]
@@ -0,0 +1,4 @@
1
+ expression: I wait {int} second(s)./second(s)?
2
+ text: I wait 1 second.
3
+ expected: |-
4
+ [1]
@@ -0,0 +1,5 @@
1
+ expression: |-
2
+ {int} rat(s)/mouse/mice
3
+ text: 3 rats
4
+ expected: |-
5
+ [3]
@@ -0,0 +1,5 @@
1
+ expression: |-
2
+ {int} rat(s)/mouse/mice
3
+ text: 2 mice
4
+ expected: |-
5
+ [2]
@@ -0,0 +1,5 @@
1
+ expression: |-
2
+ {int} rat(s)/mouse/mice
3
+ text: 1 mouse
4
+ expected: |-
5
+ [1]
@@ -0,0 +1,4 @@
1
+ expression: three {string} and {string} mice
2
+ text: three '' and 'handsome' mice
3
+ expected: |-
4
+ ["","handsome"]
@@ -0,0 +1,4 @@
1
+ expression: three {string} mice
2
+ text: three '' mice
3
+ expected: |-
4
+ [""]
@@ -0,0 +1,4 @@
1
+ expression: three {string} mice
2
+ text: three '"blind"' mice
3
+ expected: |-
4
+ ["\"blind\""]
@@ -0,0 +1,4 @@
1
+ expression: three {string} mice
2
+ text: three 'bl\'nd' mice
3
+ expected: |-
4
+ ["bl'nd"]
@@ -0,0 +1,4 @@
1
+ expression: three {string} mice
2
+ text: three 'blind' mice
3
+ expected: |-
4
+ ["blind"]
@@ -0,0 +1,4 @@
1
+ expression: three {word} mice
2
+ text: three blind mice
3
+ expected: |-
4
+ ["blind"]
@@ -0,0 +1,10 @@
1
+ expression: |-
2
+ {unknown}
3
+ text: something
4
+ exception: |-
5
+ This Cucumber Expression has a problem at column 1:
6
+
7
+ {unknown}
8
+ ^-------^
9
+ Undefined parameter type 'unknown'.
10
+ Please register a ParameterType for 'unknown'
@@ -0,0 +1,2 @@
1
+ expression: "a/b(c)"
2
+ expected: ^(?:a|b(?:c)?)$
@@ -0,0 +1,2 @@
1
+ expression: "a/b c/d/e"
2
+ expected: ^(?:a|b) (?:c|d|e)$
@@ -0,0 +1,2 @@
1
+ expression: ""
2
+ expected: ^$
@@ -0,0 +1,2 @@
1
+ expression: '^$[]\(\){}\\.|?*+'
2
+ expected: ^\^\$\[\]\(\)(.*)\\\.\|\?\*\+$
@@ -0,0 +1,2 @@
1
+ expression: "(a)"
2
+ expected: ^(?:a)?$
@@ -0,0 +1,2 @@
1
+ expression: "{int}"
2
+ expected: ^((?:-?\d+)|(?:\d+))$
@@ -0,0 +1,2 @@
1
+ expression: "a"
2
+ expected: ^a$
@@ -0,0 +1,2 @@
1
+ expression: "Привет, Мир(ы)!"
2
+ expected: ^Привет, Мир(?:ы)?!$
@@ -0,0 +1,13 @@
1
+ expression: three blind/cripple mice
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 5, "text": "three"},
6
+ {"type": "WHITE_SPACE", "start": 5, "end": 6, "text": " "},
7
+ {"type": "TEXT", "start": 6, "end": 11, "text": "blind"},
8
+ {"type": "ALTERNATION", "start": 11, "end": 12, "text": "/"},
9
+ {"type": "TEXT", "start": 12, "end": 19, "text": "cripple"},
10
+ {"type": "WHITE_SPACE", "start": 19, "end": 20, "text": " "},
11
+ {"type": "TEXT", "start": 20, "end": 24, "text": "mice"},
12
+ {"type": "END_OF_LINE", "start": 24, "end": 24, "text": ""}
13
+ ]
@@ -0,0 +1,9 @@
1
+ expression: blind/cripple
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 5, "text": "blind"},
6
+ {"type": "ALTERNATION", "start": 5, "end": 6, "text": "/"},
7
+ {"type": "TEXT", "start": 6, "end": 13, "text": "cripple"},
8
+ {"type": "END_OF_LINE", "start": 13, "end": 13, "text": ""}
9
+ ]
@@ -0,0 +1,6 @@
1
+ expression: ""
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "END_OF_LINE", "start": 0, "end": 0, "text": ""}
6
+ ]
@@ -0,0 +1,8 @@
1
+ expression: \[
2
+ exception: |-
3
+ This Cucumber Expression has a problem at column 2:
4
+
5
+ \[
6
+ ^
7
+ Only the characters '{', '}', '(', ')', '\', '/' and whitespace can be escaped.
8
+ If you did mean to use an '\' you can use '\\' to escape it
@@ -0,0 +1,9 @@
1
+ expression: blind\ and\ famished\/cripple mice
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 29, "text": "blind and famished/cripple"},
6
+ {"type": "WHITE_SPACE", "start": 29, "end": 30, "text": " "},
7
+ {"type": "TEXT", "start": 30, "end": 34, "text": "mice"},
8
+ {"type": "END_OF_LINE", "start": 34, "end": 34, "text": ""}
9
+ ]
@@ -0,0 +1,9 @@
1
+ expression: ' \/ '
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "WHITE_SPACE", "start": 0, "end": 1, "text": " "},
6
+ {"type": "TEXT", "start": 1, "end": 3, "text": "/"},
7
+ {"type": "WHITE_SPACE", "start": 3, "end": 4, "text": " "},
8
+ {"type": "END_OF_LINE", "start": 4, "end": 4, "text": ""}
9
+ ]
@@ -0,0 +1,8 @@
1
+ expression: \
2
+ exception: |-
3
+ This Cucumber Expression has a problem at column 1:
4
+
5
+ \
6
+ ^
7
+ The end of line can not be escaped.
8
+ You can use '\\' to escape the the '\'
@@ -0,0 +1,7 @@
1
+ expression: \(blind\)
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 9, "text": "(blind)"},
6
+ {"type": "END_OF_LINE", "start": 9, "end": 9, "text": ""}
7
+ ]
@@ -0,0 +1,7 @@
1
+ expression: \{string\}
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 10, "text": "{string}"},
6
+ {"type": "END_OF_LINE", "start": 10, "end": 10, "text": ""}
7
+ ]
@@ -0,0 +1,7 @@
1
+ expression: '\ '
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 2, "text": " "},
6
+ {"type": "END_OF_LINE", "start": 2, "end": 2, "text": ""}
7
+ ]
@@ -0,0 +1,13 @@
1
+ expression: three (blind) mice
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 5, "text": "three"},
6
+ {"type": "WHITE_SPACE", "start": 5, "end": 6, "text": " "},
7
+ {"type": "BEGIN_OPTIONAL", "start": 6, "end": 7, "text": "("},
8
+ {"type": "TEXT", "start": 7, "end": 12, "text": "blind"},
9
+ {"type": "END_OPTIONAL", "start": 12, "end": 13, "text": ")"},
10
+ {"type": "WHITE_SPACE", "start": 13, "end": 14, "text": " "},
11
+ {"type": "TEXT", "start": 14, "end": 18, "text": "mice"},
12
+ {"type": "END_OF_LINE", "start": 18, "end": 18, "text": ""}
13
+ ]
@@ -0,0 +1,9 @@
1
+ expression: (blind)
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "BEGIN_OPTIONAL", "start": 0, "end": 1, "text": "("},
6
+ {"type": "TEXT", "start": 1, "end": 6, "text": "blind"},
7
+ {"type": "END_OPTIONAL", "start": 6, "end": 7, "text": ")"},
8
+ {"type": "END_OF_LINE", "start": 7, "end": 7, "text": ""}
9
+ ]
@@ -0,0 +1,13 @@
1
+ expression: three {string} mice
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 5, "text": "three"},
6
+ {"type": "WHITE_SPACE", "start": 5, "end": 6, "text": " "},
7
+ {"type": "BEGIN_PARAMETER", "start": 6, "end": 7, "text": "{"},
8
+ {"type": "TEXT", "start": 7, "end": 13, "text": "string"},
9
+ {"type": "END_PARAMETER", "start": 13, "end": 14, "text": "}"},
10
+ {"type": "WHITE_SPACE", "start": 14, "end": 15, "text": " "},
11
+ {"type": "TEXT", "start": 15, "end": 19, "text": "mice"},
12
+ {"type": "END_OF_LINE", "start": 19, "end": 19, "text": ""}
13
+ ]
@@ -0,0 +1,9 @@
1
+ expression: "{string}"
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "BEGIN_PARAMETER", "start": 0, "end": 1, "text": "{"},
6
+ {"type": "TEXT", "start": 1, "end": 7, "text": "string"},
7
+ {"type": "END_PARAMETER", "start": 7, "end": 8, "text": "}"},
8
+ {"type": "END_OF_LINE", "start": 8, "end": 8, "text": ""}
9
+ ]
@@ -0,0 +1,11 @@
1
+ expression: three blind mice
2
+ expected: |-
3
+ [
4
+ {"type": "START_OF_LINE", "start": 0, "end": 0, "text": ""},
5
+ {"type": "TEXT", "start": 0, "end": 5, "text": "three"},
6
+ {"type": "WHITE_SPACE", "start": 5, "end": 6, "text": " "},
7
+ {"type": "TEXT", "start": 6, "end": 11, "text": "blind"},
8
+ {"type": "WHITE_SPACE", "start": 11, "end": 12, "text": " "},
9
+ {"type": "TEXT", "start": 12, "end": 16, "text": "mice"},
10
+ {"type": "END_OF_LINE", "start": 16, "end": 16, "text": ""}
11
+ ]
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: 10.3.0
4
+ version: 11.0.0
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: 2020-08-07 00:00:00.000000000 Z
11
+ date: 2020-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -36,20 +36,20 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '3.9'
39
+ version: '3.10'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 3.9.0
42
+ version: 3.10.0
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '3.9'
49
+ version: '3.10'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 3.9.0
52
+ version: 3.10.0
53
53
  description: Cucumber Expressions - a simpler alternative to Regular Expressions
54
54
  email: cukes@googlegroups.com
55
55
  executables: []
@@ -71,9 +71,12 @@ files:
71
71
  - default.mk
72
72
  - examples.txt
73
73
  - lib/cucumber/cucumber_expressions/argument.rb
74
+ - lib/cucumber/cucumber_expressions/ast.rb
74
75
  - lib/cucumber/cucumber_expressions/combinatorial_generated_expression_factory.rb
75
76
  - lib/cucumber/cucumber_expressions/cucumber_expression.rb
76
77
  - lib/cucumber/cucumber_expressions/cucumber_expression_generator.rb
78
+ - lib/cucumber/cucumber_expressions/cucumber_expression_parser.rb
79
+ - lib/cucumber/cucumber_expressions/cucumber_expression_tokenizer.rb
77
80
  - lib/cucumber/cucumber_expressions/errors.rb
78
81
  - lib/cucumber/cucumber_expressions/expression_factory.rb
79
82
  - lib/cucumber/cucumber_expressions/generated_expression.rb
@@ -89,8 +92,9 @@ files:
89
92
  - spec/cucumber/cucumber_expressions/argument_spec.rb
90
93
  - spec/cucumber/cucumber_expressions/combinatorial_generated_expression_factory_test.rb
91
94
  - spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb
92
- - spec/cucumber/cucumber_expressions/cucumber_expression_regexp_spec.rb
95
+ - spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
93
96
  - spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb
97
+ - spec/cucumber/cucumber_expressions/cucumber_expression_tokenizer_spec.rb
94
98
  - spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb
95
99
  - spec/cucumber/cucumber_expressions/expression_examples_spec.rb
96
100
  - spec/cucumber/cucumber_expressions/expression_factory_spec.rb
@@ -98,6 +102,107 @@ files:
98
102
  - spec/cucumber/cucumber_expressions/parameter_type_spec.rb
99
103
  - spec/cucumber/cucumber_expressions/regular_expression_spec.rb
100
104
  - 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
101
206
  homepage: https://github.com/cucumber/cucumber-expressions-ruby#readme
102
207
  licenses:
103
208
  - MIT
@@ -126,14 +231,15 @@ requirements: []
126
231
  rubygems_version: 3.1.2
127
232
  signing_key:
128
233
  specification_version: 4
129
- summary: cucumber-expressions-10.3.0
234
+ summary: cucumber-expressions-11.0.0
130
235
  test_files:
131
236
  - spec/capture_warnings.rb
132
237
  - spec/cucumber/cucumber_expressions/argument_spec.rb
133
238
  - spec/cucumber/cucumber_expressions/combinatorial_generated_expression_factory_test.rb
134
239
  - spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb
135
- - spec/cucumber/cucumber_expressions/cucumber_expression_regexp_spec.rb
240
+ - spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
136
241
  - spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb
242
+ - spec/cucumber/cucumber_expressions/cucumber_expression_tokenizer_spec.rb
137
243
  - spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb
138
244
  - spec/cucumber/cucumber_expressions/expression_examples_spec.rb
139
245
  - spec/cucumber/cucumber_expressions/expression_factory_spec.rb