gherkin 2.7.7 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/History.md +4 -0
- data/LICENSE +1 -1
- data/README.md +3 -2
- data/features/.cucumber/stepdefs.json +16 -0
- data/gherkin.gemspec +17 -5
- data/lib/gherkin/formatter/tag_filter.rb +1 -1
- data/lib/gherkin/tag_expression.rb +1 -1
- data/spec/gherkin/tag_expression_spec.rb +16 -11
- metadata +30 -30
data/Gemfile
CHANGED
data/History.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## [2.8.0](https://github.com/cucumber/gherkin/compare/v2.7.7...v2.8.0)
|
2
|
+
|
3
|
+
* [Ruby/Java] TagExpression.eval() now takes a list of Tag instead of a list of String. This slightly breaks the API (bump), but helps fix some bugs in Cucumber-JVM. (Aslak Hellesøy)
|
4
|
+
|
1
5
|
## [2.7.7](https://github.com/cucumber/gherkin/compare/v2.7.6...v2.7.7)
|
2
6
|
|
3
7
|
* [C] Allow compilation with clang (datanoise)
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2009-
|
1
|
+
Copyright (c) 2009-2012 Mike Sassak, Gregory Hnatiuk, Aslak Hellesøy
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
[![Build Status](https://secure.travis-ci.org/cucumber/gherkin.png)](http://travis-ci.org/cucumber/gherkin)
|
2
|
+
[![Dependency Status](https://gemnasium.com/cucumber/gherkin.png)](https://gemnasium.com/cucumber/gherkin)
|
2
3
|
|
3
4
|
A fast lexer and parser for the Gherkin language based on Ragel. Gherkin is two things:
|
4
5
|
|
@@ -54,7 +55,7 @@ The jar file is in the central Maven repo.
|
|
54
55
|
<dependency>
|
55
56
|
<groupId>info.cukes</groupId>
|
56
57
|
<artifactId>gherkin</artifactId>
|
57
|
-
<version>2.
|
58
|
+
<version>2.8.0</version>
|
58
59
|
</dependency>
|
59
60
|
|
60
61
|
You can get it manually from [Maven Central](http://search.maven.org/#browse%7C-2073395818)
|
@@ -235,4 +236,4 @@ Now you can build Windows gems:
|
|
235
236
|
|
236
237
|
## Copyright
|
237
238
|
|
238
|
-
Copyright (c) 2009-
|
239
|
+
Copyright (c) 2009-2012 Mike Sassak, Gregory Hnatiuk, Aslak Hellesøy. See LICENSE for details.
|
@@ -1,5 +1,6 @@
|
|
1
1
|
[
|
2
2
|
{
|
3
|
+
"file_colon_line": "features/step_definitions/eyeball_steps.rb:1",
|
3
4
|
"flags": "",
|
4
5
|
"source": "^they have arrived$",
|
5
6
|
"steps": [
|
@@ -12,6 +13,7 @@
|
|
12
13
|
]
|
13
14
|
},
|
14
15
|
{
|
16
|
+
"file_colon_line": "features/step_definitions/gherkin_steps.rb:1",
|
15
17
|
"flags": "",
|
16
18
|
"source": "^a \"(ruby|native)\" \"([^\\\"]*)\" parser$",
|
17
19
|
"steps": [
|
@@ -19,6 +21,7 @@
|
|
19
21
|
]
|
20
22
|
},
|
21
23
|
{
|
24
|
+
"file_colon_line": "features/step_definitions/gherkin_steps.rb:5",
|
22
25
|
"flags": "",
|
23
26
|
"source": "^the\\ following\\ text\\ is\\ parsed:$",
|
24
27
|
"steps": [
|
@@ -31,6 +34,7 @@
|
|
31
34
|
]
|
32
35
|
},
|
33
36
|
{
|
37
|
+
"file_colon_line": "features/step_definitions/gherkin_steps.rb:9",
|
34
38
|
"flags": "",
|
35
39
|
"source": "^there\\ should\\ be\\ no\\ parse\\ errors$",
|
36
40
|
"steps": [
|
@@ -43,6 +47,7 @@
|
|
43
47
|
]
|
44
48
|
},
|
45
49
|
{
|
50
|
+
"file_colon_line": "features/step_definitions/gherkin_steps.rb:13",
|
46
51
|
"flags": "",
|
47
52
|
"source": "^there should be a parse error on (line \\d+)$",
|
48
53
|
"steps": [
|
@@ -58,6 +63,7 @@
|
|
58
63
|
]
|
59
64
|
},
|
60
65
|
{
|
66
|
+
"file_colon_line": "features/step_definitions/gherkin_steps.rb:17",
|
61
67
|
"flags": "",
|
62
68
|
"source": "^there should be parse errors on (lines .*)$",
|
63
69
|
"steps": [
|
@@ -109,6 +115,7 @@
|
|
109
115
|
]
|
110
116
|
},
|
111
117
|
{
|
118
|
+
"file_colon_line": "features/step_definitions/json_formatter_steps.rb:13",
|
112
119
|
"flags": "",
|
113
120
|
"source": "^a JSON formatter$",
|
114
121
|
"steps": [
|
@@ -116,6 +123,7 @@
|
|
116
123
|
]
|
117
124
|
},
|
118
125
|
{
|
126
|
+
"file_colon_line": "features/step_definitions/json_formatter_steps.rb:18",
|
119
127
|
"flags": "",
|
120
128
|
"source": "^the outputted JSON should be:$",
|
121
129
|
"steps": [
|
@@ -128,6 +136,7 @@
|
|
128
136
|
]
|
129
137
|
},
|
130
138
|
{
|
139
|
+
"file_colon_line": "features/step_definitions/json_parser_steps.rb:5",
|
131
140
|
"flags": "",
|
132
141
|
"source": "^a PrettyFormatter$",
|
133
142
|
"steps": [
|
@@ -135,6 +144,7 @@
|
|
135
144
|
]
|
136
145
|
},
|
137
146
|
{
|
147
|
+
"file_colon_line": "features/step_definitions/json_parser_steps.rb:10",
|
138
148
|
"flags": "",
|
139
149
|
"source": "^a JSON lexer$",
|
140
150
|
"steps": [
|
@@ -142,6 +152,7 @@
|
|
142
152
|
]
|
143
153
|
},
|
144
154
|
{
|
155
|
+
"file_colon_line": "features/step_definitions/json_parser_steps.rb:14",
|
145
156
|
"flags": "",
|
146
157
|
"source": "^the following JSON is parsed:$",
|
147
158
|
"steps": [
|
@@ -154,6 +165,7 @@
|
|
154
165
|
]
|
155
166
|
},
|
156
167
|
{
|
168
|
+
"file_colon_line": "features/step_definitions/json_parser_steps.rb:18",
|
157
169
|
"flags": "",
|
158
170
|
"source": "^the outputted text should be:$",
|
159
171
|
"steps": [
|
@@ -166,6 +178,7 @@
|
|
166
178
|
]
|
167
179
|
},
|
168
180
|
{
|
181
|
+
"file_colon_line": "features/step_definitions/pretty_formatter_steps.rb:50",
|
169
182
|
"flags": "",
|
170
183
|
"source": "^I have Cucumber's source code next to Gherkin's$",
|
171
184
|
"steps": [
|
@@ -178,6 +191,7 @@
|
|
178
191
|
]
|
179
192
|
},
|
180
193
|
{
|
194
|
+
"file_colon_line": "features/step_definitions/pretty_formatter_steps.rb:55",
|
181
195
|
"flags": "",
|
182
196
|
"source": "^I find all of the \\.feature files$",
|
183
197
|
"steps": [
|
@@ -190,6 +204,7 @@
|
|
190
204
|
]
|
191
205
|
},
|
192
206
|
{
|
207
|
+
"file_colon_line": "features/step_definitions/pretty_formatter_steps.rb:59",
|
193
208
|
"flags": "",
|
194
209
|
"source": "^I send each prettified original through the \"([^\"]*)\" machinery$",
|
195
210
|
"steps": [
|
@@ -214,6 +229,7 @@
|
|
214
229
|
]
|
215
230
|
},
|
216
231
|
{
|
232
|
+
"file_colon_line": "features/step_definitions/pretty_formatter_steps.rb:83",
|
217
233
|
"flags": "",
|
218
234
|
"source": "^the machinery output should be identical to the prettified original$",
|
219
235
|
"steps": [
|
data/gherkin.gemspec
CHANGED
@@ -2,8 +2,20 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "gherkin"
|
5
|
-
# If
|
6
|
-
|
5
|
+
# If the major version is bumped, verify that the change is ok:
|
6
|
+
#
|
7
|
+
# * Comment out cucumber dependency in gemspec
|
8
|
+
# * Uncomment cucumber location in Gemspec
|
9
|
+
# * Bump cucumber's gherkin dependency to the new version
|
10
|
+
# * bundle update
|
11
|
+
# * bundle exec rake
|
12
|
+
#
|
13
|
+
# Repeat these step for cucumber (swap `cucumber` with `gherkin`).
|
14
|
+
#
|
15
|
+
# When both are building OK, do a `bundle exec rake install` in both cucumber and gherkin projects, revert the changes in the first 2 steps
|
16
|
+
# and release both projects.
|
17
|
+
#
|
18
|
+
s.version = "2.8.0"
|
7
19
|
s.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
|
8
20
|
s.description = "A fast Gherkin lexer/parser based on the Ragel State Machine Compiler."
|
9
21
|
s.summary = "#{s.name}-#{s.version}"
|
@@ -46,11 +58,11 @@ Gem::Specification.new do |s|
|
|
46
58
|
|
47
59
|
s.add_runtime_dependency('json', '>= 1.4.6')
|
48
60
|
|
49
|
-
s.add_development_dependency('cucumber', '>= 1.1.
|
61
|
+
s.add_development_dependency('cucumber', '>= 1.1.5')
|
50
62
|
s.add_development_dependency('rake', '>= 0.9.2')
|
51
|
-
s.add_development_dependency('bundler', '>= 1.0.
|
63
|
+
s.add_development_dependency('bundler', '>= 1.0.22')
|
52
64
|
s.add_development_dependency('rspec', '~> 2.7.0') # No 2.8.0 until this is fixed: https://github.com/rspec/rspec-expectations/issues/112
|
53
|
-
s.add_development_dependency('rubyzip', '>= 0.9.
|
65
|
+
s.add_development_dependency('rubyzip', '>= 0.9.6.1')
|
54
66
|
|
55
67
|
unless ENV['RUBY_CC_VERSION'] || defined?(JRUBY_VERSION)
|
56
68
|
s.add_development_dependency('therubyracer', '>= 0.9.9') if ENV['GHERKIN_JS']
|
@@ -1,15 +1,20 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'gherkin/tag_expression'
|
3
|
+
require 'gherkin/formatter/model'
|
3
4
|
|
4
5
|
module Gherkin
|
5
6
|
describe TagExpression do
|
7
|
+
def tag(name)
|
8
|
+
Formatter::Model::Tag.new(name, 0)
|
9
|
+
end
|
10
|
+
|
6
11
|
context "no tags" do
|
7
12
|
before(:each) do
|
8
13
|
@e = Gherkin::TagExpression.new([])
|
9
14
|
end
|
10
15
|
|
11
16
|
it "should match @foo" do
|
12
|
-
@e.eval(['@foo']).should == true
|
17
|
+
@e.eval([tag('@foo')]).should == true
|
13
18
|
end
|
14
19
|
|
15
20
|
it "should match empty tags" do
|
@@ -23,11 +28,11 @@ module Gherkin
|
|
23
28
|
end
|
24
29
|
|
25
30
|
it "should match @foo" do
|
26
|
-
@e.eval(['@foo']).should == true
|
31
|
+
@e.eval([tag('@foo')]).should == true
|
27
32
|
end
|
28
33
|
|
29
34
|
it "should not match @bar" do
|
30
|
-
@e.eval(['@bar']).should == false
|
35
|
+
@e.eval([tag('@bar')]).should == false
|
31
36
|
end
|
32
37
|
|
33
38
|
it "should not match no tags" do
|
@@ -41,11 +46,11 @@ module Gherkin
|
|
41
46
|
end
|
42
47
|
|
43
48
|
it "should match @bar" do
|
44
|
-
@e.eval(['@bar']).should == true
|
49
|
+
@e.eval([tag('@bar')]).should == true
|
45
50
|
end
|
46
51
|
|
47
52
|
it "should not match @foo" do
|
48
|
-
@e.eval(['@foo']).should == false
|
53
|
+
@e.eval([tag('@foo')]).should == false
|
49
54
|
end
|
50
55
|
end
|
51
56
|
|
@@ -55,15 +60,15 @@ module Gherkin
|
|
55
60
|
end
|
56
61
|
|
57
62
|
it "should match @foo" do
|
58
|
-
@e.eval(['@foo']).should == true
|
63
|
+
@e.eval([tag('@foo')]).should == true
|
59
64
|
end
|
60
65
|
|
61
66
|
it "should match @bar" do
|
62
|
-
@e.eval(['@bar']).should == true
|
67
|
+
@e.eval([tag('@bar')]).should == true
|
63
68
|
end
|
64
69
|
|
65
70
|
it "should not match @zap" do
|
66
|
-
@e.eval(['@zap']).should == false
|
71
|
+
@e.eval([tag('@zap')]).should == false
|
67
72
|
end
|
68
73
|
end
|
69
74
|
|
@@ -73,11 +78,11 @@ module Gherkin
|
|
73
78
|
end
|
74
79
|
|
75
80
|
it "should match @foo" do
|
76
|
-
@e.eval(['@foo']).should == true
|
81
|
+
@e.eval([tag('@foo')]).should == true
|
77
82
|
end
|
78
83
|
|
79
84
|
it "should not match @foo @zap" do
|
80
|
-
@e.eval(['@foo', '@zap']).should == false
|
85
|
+
@e.eval([tag('@foo'), tag('@zap')]).should == false
|
81
86
|
end
|
82
87
|
end
|
83
88
|
|
@@ -91,7 +96,7 @@ module Gherkin
|
|
91
96
|
end
|
92
97
|
|
93
98
|
it "should match @foo @zap" do
|
94
|
-
@e.eval(['@foo', '@zap']).should == true
|
99
|
+
@e.eval([tag('@foo'), tag('@zap')]).should == true
|
95
100
|
end
|
96
101
|
end
|
97
102
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gherkin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-02-
|
14
|
+
date: 2012-02-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake-compiler
|
18
|
-
requirement: &
|
18
|
+
requirement: &2153119880 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ! '>='
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: 0.7.9
|
24
24
|
type: :development
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *2153119880
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
|
-
requirement: &
|
29
|
+
requirement: &2153115980 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -34,21 +34,21 @@ dependencies:
|
|
34
34
|
version: 1.4.6
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *2153115980
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: cucumber
|
40
|
-
requirement: &
|
40
|
+
requirement: &2153115520 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.1.
|
45
|
+
version: 1.1.5
|
46
46
|
type: :development
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *2153115520
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: rake
|
51
|
-
requirement: &
|
51
|
+
requirement: &2153115060 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ! '>='
|
@@ -56,21 +56,21 @@ dependencies:
|
|
56
56
|
version: 0.9.2
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *2153115060
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: bundler
|
62
|
-
requirement: &
|
62
|
+
requirement: &2153114600 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ! '>='
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 1.0.
|
67
|
+
version: 1.0.22
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *2153114600
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: rspec
|
73
|
-
requirement: &
|
73
|
+
requirement: &2153114140 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ~>
|
@@ -78,21 +78,21 @@ dependencies:
|
|
78
78
|
version: 2.7.0
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *2153114140
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: rubyzip
|
84
|
-
requirement: &
|
84
|
+
requirement: &2153113680 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.9.
|
89
|
+
version: 0.9.6.1
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
|
-
version_requirements: *
|
92
|
+
version_requirements: *2153113680
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: therubyracer
|
95
|
-
requirement: &
|
95
|
+
requirement: &2153129520 !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
98
98
|
- - ! '>='
|
@@ -100,10 +100,10 @@ dependencies:
|
|
100
100
|
version: 0.9.9
|
101
101
|
type: :development
|
102
102
|
prerelease: false
|
103
|
-
version_requirements: *
|
103
|
+
version_requirements: *2153129520
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: yard
|
106
|
-
requirement: &
|
106
|
+
requirement: &2153129060 !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
109
109
|
- - ! '>='
|
@@ -111,10 +111,10 @@ dependencies:
|
|
111
111
|
version: 0.7.5
|
112
112
|
type: :development
|
113
113
|
prerelease: false
|
114
|
-
version_requirements: *
|
114
|
+
version_requirements: *2153129060
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: rdiscount
|
117
|
-
requirement: &
|
117
|
+
requirement: &2153128600 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
120
120
|
- - ! '>='
|
@@ -122,10 +122,10 @@ dependencies:
|
|
122
122
|
version: 1.6.8
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
|
-
version_requirements: *
|
125
|
+
version_requirements: *2153128600
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: term-ansicolor
|
128
|
-
requirement: &
|
128
|
+
requirement: &2153128140 !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
131
|
- - ! '>='
|
@@ -133,10 +133,10 @@ dependencies:
|
|
133
133
|
version: 1.0.6
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
|
-
version_requirements: *
|
136
|
+
version_requirements: *2153128140
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: builder
|
139
|
-
requirement: &
|
139
|
+
requirement: &2153127680 !ruby/object:Gem::Requirement
|
140
140
|
none: false
|
141
141
|
requirements:
|
142
142
|
- - ! '>='
|
@@ -144,7 +144,7 @@ dependencies:
|
|
144
144
|
version: 2.1.2
|
145
145
|
type: :development
|
146
146
|
prerelease: false
|
147
|
-
version_requirements: *
|
147
|
+
version_requirements: *2153127680
|
148
148
|
description: A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
|
149
149
|
email: cukes@googlegroups.com
|
150
150
|
executables: []
|
@@ -490,7 +490,7 @@ rubyforge_project:
|
|
490
490
|
rubygems_version: 1.8.10
|
491
491
|
signing_key:
|
492
492
|
specification_version: 3
|
493
|
-
summary: gherkin-2.
|
493
|
+
summary: gherkin-2.8.0
|
494
494
|
test_files:
|
495
495
|
- features/escaped_pipes.feature
|
496
496
|
- features/feature_parser.feature
|