cucumber-tag-expressions 6.1.2 → 8.0.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/LICENSE +21 -0
- data/lib/cucumber/tag_expressions/parser.rb +10 -18
- metadata +55 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b75c232a192295efd0cdc1458de3e6b72ba5abdfa25d272d205b8433e110eb1e
|
|
4
|
+
data.tar.gz: 1b88edf43ae8f3259f77d5dda358198cc37f2fd835bc0e2c47df715182fb0764
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e476040a0025dc988af729a5139f9c21e4222bd5ab990cecf88301db94ea21a2a1caa32cd520eb575b2be5c27dcd962d0e0f9ee50133c1ebf39c77bff6188e32
|
|
7
|
+
data.tar.gz: ff61ccc310294431c140096bf0c6352b8b808bdb292ba0cf7abce2630b8c140c76fb16e26ec20dca97fbaf1dd5b9a4066440c7003a069f6130b0a4a1d008e440
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Cucumber Ltd and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -15,28 +15,20 @@ module Cucumber
|
|
|
15
15
|
tokens = tokenize(infix_expression)
|
|
16
16
|
return True.new if tokens.empty?
|
|
17
17
|
|
|
18
|
-
tokens.each
|
|
19
|
-
expected_token_type = handle_sequential_tokens(token, infix_expression, expected_token_type)
|
|
20
|
-
end
|
|
21
|
-
|
|
18
|
+
tokens.each { |token| expected_token_type = handle_sequential_tokens(token, infix_expression, expected_token_type) }
|
|
22
19
|
while @operators.any?
|
|
23
|
-
raise
|
|
20
|
+
raise "Tag expression \"#{infix_expression}\" could not be parsed because of syntax error: Unmatched (." if @operators.last == '('
|
|
24
21
|
|
|
25
22
|
push_expression(pop(@operators))
|
|
26
23
|
end
|
|
27
|
-
|
|
28
|
-
@expressions.empty? ? expression : raise('Not empty')
|
|
24
|
+
pop(@expressions)
|
|
29
25
|
end
|
|
30
26
|
|
|
31
27
|
private
|
|
32
28
|
|
|
33
|
-
def assoc_of(token, value)
|
|
34
|
-
operator_types.dig(token, :assoc) == value
|
|
35
|
-
end
|
|
36
|
-
|
|
37
29
|
def lower_precedence?(operation)
|
|
38
|
-
(
|
|
39
|
-
(
|
|
30
|
+
(operator_types.dig(operation, :assoc) == :left && precedence(operation) <= precedence(@operators.last)) ||
|
|
31
|
+
(operator_types.dig(operation, :assoc) == :right && precedence(operation) < precedence(@operators.last))
|
|
40
32
|
end
|
|
41
33
|
|
|
42
34
|
def operator?(token)
|
|
@@ -54,7 +46,7 @@ module Cucumber
|
|
|
54
46
|
infix_expression.chars.each do |char|
|
|
55
47
|
if escaped
|
|
56
48
|
unless char == '(' || char == ')' || char == '\\' || whitespace?(char)
|
|
57
|
-
raise
|
|
49
|
+
raise "Tag expression \"#{infix_expression}\" could not be parsed because of syntax error: Illegal escape before \"#{char}\"."
|
|
58
50
|
end
|
|
59
51
|
|
|
60
52
|
token += char
|
|
@@ -62,7 +54,7 @@ module Cucumber
|
|
|
62
54
|
elsif char == '\\'
|
|
63
55
|
escaped = true
|
|
64
56
|
elsif char == '(' || char == ')' || whitespace?(char)
|
|
65
|
-
|
|
57
|
+
unless token.empty?
|
|
66
58
|
tokens.push(token)
|
|
67
59
|
token = +''
|
|
68
60
|
end
|
|
@@ -71,7 +63,7 @@ module Cucumber
|
|
|
71
63
|
token += char
|
|
72
64
|
end
|
|
73
65
|
end
|
|
74
|
-
tokens.push(token)
|
|
66
|
+
tokens.push(token) unless token.empty?
|
|
75
67
|
tokens
|
|
76
68
|
end
|
|
77
69
|
|
|
@@ -114,7 +106,7 @@ module Cucumber
|
|
|
114
106
|
def handle_close_paren(infix_expression, _token, expected_token_type)
|
|
115
107
|
check(infix_expression, expected_token_type, :operator)
|
|
116
108
|
push_expression(pop(@operators)) while @operators.any? && @operators.last != '('
|
|
117
|
-
raise
|
|
109
|
+
raise "Tag expression \"#{infix_expression}\" could not be parsed because of syntax error: Unmatched )." if @operators.empty?
|
|
118
110
|
|
|
119
111
|
pop(@operators) if @operators.last == '('
|
|
120
112
|
:operator
|
|
@@ -129,7 +121,7 @@ module Cucumber
|
|
|
129
121
|
def check(infix_expression, expected_token_type, token_type)
|
|
130
122
|
return if expected_token_type == token_type
|
|
131
123
|
|
|
132
|
-
raise
|
|
124
|
+
raise "Tag expression \"#{infix_expression}\" could not be parsed because of syntax error: Expected #{expected_token_type}."
|
|
133
125
|
end
|
|
134
126
|
|
|
135
127
|
def pop(array, amount = 1)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cucumber-tag-expressions
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 8.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrea Nodari
|
|
8
8
|
- Aslak Hellesøy
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -16,48 +16,91 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '13.
|
|
19
|
+
version: '13.3'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '13.
|
|
26
|
+
version: '13.3'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rspec
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '3.
|
|
33
|
+
version: '3.13'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '3.
|
|
40
|
+
version: '3.13'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rubocop
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
47
|
+
version: 1.47.0
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
54
|
+
version: 1.47.0
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rubocop-performance
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 1.16.0
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 1.16.0
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rubocop-rake
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 0.6.0
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 0.6.0
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rubocop-rspec
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: 2.18.0
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: 2.18.0
|
|
55
97
|
description: Cucumber tag expressions for ruby
|
|
56
98
|
email: cukes@googlegroups.com
|
|
57
99
|
executables: []
|
|
58
100
|
extensions: []
|
|
59
101
|
extra_rdoc_files: []
|
|
60
102
|
files:
|
|
103
|
+
- LICENSE
|
|
61
104
|
- README.md
|
|
62
105
|
- lib/cucumber/tag_expressions.rb
|
|
63
106
|
- lib/cucumber/tag_expressions/expressions.rb
|
|
@@ -79,14 +122,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
79
122
|
requirements:
|
|
80
123
|
- - ">="
|
|
81
124
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '2.
|
|
125
|
+
version: '2.6'
|
|
83
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
127
|
requirements:
|
|
85
128
|
- - ">="
|
|
86
129
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: 3.
|
|
130
|
+
version: 3.2.3
|
|
88
131
|
requirements: []
|
|
89
|
-
rubygems_version: 3.6.
|
|
132
|
+
rubygems_version: 3.6.9
|
|
90
133
|
specification_version: 4
|
|
91
|
-
summary: cucumber-tag-expressions-
|
|
134
|
+
summary: cucumber-tag-expressions-8.0.0
|
|
92
135
|
test_files: []
|