cucumber-gherkin 17.0.1 → 19.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gherkin +6 -28
- data/lib/gherkin.rb +3 -3
- data/lib/gherkin/ast_builder.rb +47 -46
- data/lib/gherkin/gherkin-languages.json +10 -6
- data/lib/gherkin/gherkin_line.rb +1 -1
- data/lib/gherkin/parser.rb +859 -339
- data/lib/gherkin/pickles/compiler.rb +77 -75
- data/lib/gherkin/query.rb +16 -16
- data/lib/gherkin/stream/parser_message_stream.rb +19 -19
- data/lib/gherkin/token_scanner.rb +1 -1
- data/spec/gherkin/gherkin_line_spec.rb +11 -1
- data/spec/gherkin/query_spec.rb +29 -32
- data/spec/gherkin/stream/parser_message_stream_spec.rb +6 -6
- metadata +7 -10
- data/lib/gherkin/stream/subprocess_message_stream.rb +0 -26
- data/spec/gherkin/stream/subprocess_message_stream_spec.rb +0 -18
@@ -11,11 +11,11 @@ module Gherkin
|
|
11
11
|
}
|
12
12
|
|
13
13
|
let(:source_feature) {
|
14
|
-
|
14
|
+
{
|
15
15
|
uri: '//whatever/uri',
|
16
16
|
data: feature_content,
|
17
|
-
|
18
|
-
}
|
17
|
+
mediaType: 'text/x.cucumber.gherkin+plain'
|
18
|
+
}
|
19
19
|
}
|
20
20
|
|
21
21
|
let(:options) {
|
@@ -25,10 +25,10 @@ module Gherkin
|
|
25
25
|
}
|
26
26
|
|
27
27
|
let(:gherkin_document) {
|
28
|
-
ParserMessageStream.new([], [source_feature], options).messages.first
|
28
|
+
ParserMessageStream.new([], [source_feature], options).messages.first[:gherkinDocument]
|
29
29
|
}
|
30
30
|
|
31
|
-
let(:scenario_id) { gherkin_document
|
31
|
+
let(:scenario_id) { gherkin_document[:feature][:children].first[:scenario][:id] }
|
32
32
|
|
33
33
|
context '#messages' do
|
34
34
|
it "raises an exception on second iteration" do
|
@@ -64,4 +64,4 @@ module Gherkin
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
67
|
-
end
|
67
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-gherkin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 19.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gáspár Nagy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-05-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: cucumber-messages
|
@@ -18,20 +18,20 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '16.0'
|
22
22
|
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
24
|
+
version: 16.0.0
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
28
|
requirements:
|
29
29
|
- - "~>"
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: '
|
31
|
+
version: '16.0'
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 16.0.0
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rake
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +95,6 @@ files:
|
|
95
95
|
- lib/gherkin/pickles/compiler.rb
|
96
96
|
- lib/gherkin/query.rb
|
97
97
|
- lib/gherkin/stream/parser_message_stream.rb
|
98
|
-
- lib/gherkin/stream/subprocess_message_stream.rb
|
99
98
|
- lib/gherkin/token.rb
|
100
99
|
- lib/gherkin/token_formatter_builder.rb
|
101
100
|
- lib/gherkin/token_matcher.rb
|
@@ -107,7 +106,6 @@ files:
|
|
107
106
|
- spec/gherkin/parser_spec.rb
|
108
107
|
- spec/gherkin/query_spec.rb
|
109
108
|
- spec/gherkin/stream/parser_message_stream_spec.rb
|
110
|
-
- spec/gherkin/stream/subprocess_message_stream_spec.rb
|
111
109
|
homepage: https://github.com/cucumber/gherkin-ruby
|
112
110
|
licenses:
|
113
111
|
- MIT
|
@@ -136,7 +134,7 @@ requirements: []
|
|
136
134
|
rubygems_version: 3.1.2
|
137
135
|
signing_key:
|
138
136
|
specification_version: 4
|
139
|
-
summary: cucumber-gherkin-
|
137
|
+
summary: cucumber-gherkin-19.0.0
|
140
138
|
test_files:
|
141
139
|
- spec/capture_warnings.rb
|
142
140
|
- spec/gherkin/dialect_spec.rb
|
@@ -145,4 +143,3 @@ test_files:
|
|
145
143
|
- spec/gherkin/parser_spec.rb
|
146
144
|
- spec/gherkin/query_spec.rb
|
147
145
|
- spec/gherkin/stream/parser_message_stream_spec.rb
|
148
|
-
- spec/gherkin/stream/subprocess_message_stream_spec.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'open3'
|
2
|
-
require 'cucumber/messages'
|
3
|
-
|
4
|
-
module Gherkin
|
5
|
-
module Stream
|
6
|
-
class SubprocessMessageStream
|
7
|
-
def initialize(gherkin_executable, paths, print_source, print_ast, print_pickles)
|
8
|
-
@gherkin_executable, @paths, @print_source, @print_ast, @print_pickles = gherkin_executable, paths, print_source, print_ast, print_pickles
|
9
|
-
end
|
10
|
-
|
11
|
-
def messages
|
12
|
-
args = [@gherkin_executable]
|
13
|
-
args.push('--no-source') unless @print_source
|
14
|
-
args.push('--no-ast') unless @print_ast
|
15
|
-
args.push('--no-pickles') unless @print_pickles
|
16
|
-
args = args.concat(@paths)
|
17
|
-
stdin, stdout, stderr, wait_thr = Open3.popen3(*args)
|
18
|
-
if(stdout.eof?)
|
19
|
-
error = stderr.read
|
20
|
-
raise error
|
21
|
-
end
|
22
|
-
Cucumber::Messages::BinaryToMessageEnumerator.new(stdout)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'rspec'
|
2
|
-
require 'gherkin/stream/subprocess_message_stream'
|
3
|
-
|
4
|
-
module Gherkin
|
5
|
-
module Stream
|
6
|
-
describe SubprocessMessageStream do
|
7
|
-
it "works" do
|
8
|
-
cucumber_messages = SubprocessMessageStream.new(
|
9
|
-
"./bin/gherkin",
|
10
|
-
["testdata/good/minimal.feature"],
|
11
|
-
true, true, true
|
12
|
-
)
|
13
|
-
messages = cucumber_messages.messages.to_a
|
14
|
-
expect(messages.length).to eq(3)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|