cucumber-gherkin 13.0.0 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gherkin.rb +1 -1
- data/lib/gherkin/ast_builder.rb +1 -1
- data/lib/gherkin/gherkin-languages.json +5 -5
- data/lib/gherkin/parser.rb +5 -5
- data/lib/gherkin/query.rb +1 -0
- data/lib/gherkin/stream/parser_message_stream.rb +3 -3
- data/lib/gherkin/token_matcher.rb +2 -2
- data/lib/gherkin/token_scanner.rb +2 -2
- data/spec/gherkin/gherkin_line_spec.rb +26 -0
- data/spec/gherkin/parser_spec.rb +10 -0
- data/spec/gherkin/query_spec.rb +18 -4
- metadata +12 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccf27e037bbb0b5b0769a91c64b90b5bf25baf369739ca518a487e0d9a6ce0c4
|
4
|
+
data.tar.gz: 41f7ac52307d9f0c28734dc01c2cd7240d669ad8cdce8e4d3eaf329dec1cf2c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3d2b6abb06cbcf4d75092827a8c7ec2e07f2ecf707f4c6efb0775d1d6cdd3d1ba626e2e622d011b125a73df27b58e3a5a786a8ce7bb27d00c4afa21fb092517
|
7
|
+
data.tar.gz: 52cc53bfc74b788bae1028d011eac61034c37e16eac8137815361449d6817aad2be0a2465b3e2431798673ec5f7e38a04bd37474e802cdfd884c5091261d48b3
|
data/lib/gherkin.rb
CHANGED
data/lib/gherkin/ast_builder.rb
CHANGED
@@ -1133,14 +1133,14 @@
|
|
1133
1133
|
"name": "Estonian",
|
1134
1134
|
"native": "eesti keel",
|
1135
1135
|
"rule": [
|
1136
|
-
"
|
1136
|
+
"Reegel"
|
1137
1137
|
],
|
1138
1138
|
"scenario": [
|
1139
1139
|
"Juhtum",
|
1140
1140
|
"Stsenaarium"
|
1141
1141
|
],
|
1142
1142
|
"scenarioOutline": [
|
1143
|
-
"
|
1143
|
+
"Raamjuhtum",
|
1144
1144
|
"Raamstsenaarium"
|
1145
1145
|
],
|
1146
1146
|
"then": [
|
@@ -1471,7 +1471,7 @@
|
|
1471
1471
|
"name": "Hebrew",
|
1472
1472
|
"native": "עברית",
|
1473
1473
|
"rule": [
|
1474
|
-
"
|
1474
|
+
"כלל"
|
1475
1475
|
],
|
1476
1476
|
"scenario": [
|
1477
1477
|
"דוגמא",
|
@@ -2729,7 +2729,7 @@
|
|
2729
2729
|
"name": "Russian",
|
2730
2730
|
"native": "русский",
|
2731
2731
|
"rule": [
|
2732
|
-
"
|
2732
|
+
"Правило"
|
2733
2733
|
],
|
2734
2734
|
"scenario": [
|
2735
2735
|
"Пример",
|
@@ -3622,4 +3622,4 @@
|
|
3622
3622
|
"जेव्हा "
|
3623
3623
|
]
|
3624
3624
|
}
|
3625
|
-
}
|
3625
|
+
}
|
data/lib/gherkin/parser.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# This file is generated. Do not edit! Edit gherkin-ruby.razor instead.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
require_relative 'ast_builder'
|
3
|
+
require_relative 'token_matcher'
|
4
|
+
require_relative 'token_scanner'
|
5
|
+
require_relative 'errors'
|
6
6
|
|
7
7
|
module Gherkin
|
8
8
|
|
@@ -56,7 +56,7 @@ module Gherkin
|
|
56
56
|
class Parser
|
57
57
|
attr_accessor :stop_at_first_error
|
58
58
|
|
59
|
-
def initialize(ast_builder = AstBuilder.new)
|
59
|
+
def initialize(ast_builder = AstBuilder.new(Cucumber::Messages::IdGenerator::UUID.new))
|
60
60
|
@ast_builder = ast_builder
|
61
61
|
end
|
62
62
|
|
data/lib/gherkin/query.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'cucumber/messages'
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
require_relative '../parser'
|
3
|
+
require_relative '../token_matcher'
|
4
|
+
require_relative '../pickles/compiler'
|
5
5
|
|
6
6
|
module Gherkin
|
7
7
|
module Stream
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'gherkin/gherkin_line'
|
3
|
+
|
4
|
+
describe Gherkin::GherkinLine do
|
5
|
+
context '#table_cell' do
|
6
|
+
def cells_text(line)
|
7
|
+
Gherkin::GherkinLine.new(line, 12).table_cells.map(&:text)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'trims white spaces before cell content' do
|
11
|
+
expect(cells_text("| \t spaces before|")).to eq(['spaces before'])
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'trims white spaces after cell content' do
|
15
|
+
expect(cells_text("|spaces after |")).to eq(['spaces after'])
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'trims white spaces around cell content' do
|
19
|
+
expect(cells_text("| \t spaces everywhere \t|")).to eq(['spaces everywhere'])
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'does not drop white spaces inside a cell' do
|
23
|
+
expect(cells_text("| foo()\n bar\nbaz |")).to eq(["foo()\n bar\nbaz"])
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/spec/gherkin/query_spec.rb
CHANGED
@@ -59,13 +59,27 @@ describe Gherkin::Query do
|
|
59
59
|
"""
|
60
60
|
}
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
62
|
+
context '#update' do
|
63
|
+
context 'when the feature file is empty' do
|
64
|
+
let(:feature_content) { '' }
|
65
|
+
|
66
|
+
it 'does not fail' do
|
67
|
+
expect {
|
68
|
+
messages.each { |message|
|
69
|
+
subject.update(message)
|
70
|
+
}
|
71
|
+
}.not_to raise_exception
|
72
|
+
end
|
73
|
+
end
|
66
74
|
end
|
67
75
|
|
68
76
|
context '#location' do
|
77
|
+
before do
|
78
|
+
messages.each { |message|
|
79
|
+
subject.update(message)
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
69
83
|
let(:background) { find_message_by_attribute(gherkin_document.feature.children, :background) }
|
70
84
|
let(:scenarios) { filter_messages_by_attribute(gherkin_document.feature.children, :scenario) }
|
71
85
|
let(:scenario) { scenarios.first }
|
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: 14.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: 2020-
|
13
|
+
date: 2020-06-27 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: '12.
|
21
|
+
version: '12.2'
|
22
22
|
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 12.
|
24
|
+
version: 12.2.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: '12.
|
31
|
+
version: '12.2'
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 12.
|
34
|
+
version: 12.2.0
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rake
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,7 +102,9 @@ files:
|
|
102
102
|
- lib/gherkin/token_scanner.rb
|
103
103
|
- spec/capture_warnings.rb
|
104
104
|
- spec/gherkin/dialect_spec.rb
|
105
|
+
- spec/gherkin/gherkin_line_spec.rb
|
105
106
|
- spec/gherkin/gherkin_spec.rb
|
107
|
+
- spec/gherkin/parser_spec.rb
|
106
108
|
- spec/gherkin/query_spec.rb
|
107
109
|
- spec/gherkin/stream/parser_message_stream_spec.rb
|
108
110
|
- spec/gherkin/stream/subprocess_message_stream_spec.rb
|
@@ -131,15 +133,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
133
|
- !ruby/object:Gem::Version
|
132
134
|
version: '0'
|
133
135
|
requirements: []
|
134
|
-
|
135
|
-
rubygems_version: 2.7.6.2
|
136
|
+
rubygems_version: 3.1.2
|
136
137
|
signing_key:
|
137
138
|
specification_version: 4
|
138
|
-
summary: cucumber-gherkin-
|
139
|
+
summary: cucumber-gherkin-14.0.0
|
139
140
|
test_files:
|
140
141
|
- spec/gherkin/dialect_spec.rb
|
142
|
+
- spec/gherkin/gherkin_line_spec.rb
|
141
143
|
- spec/gherkin/stream/parser_message_stream_spec.rb
|
142
144
|
- spec/gherkin/stream/subprocess_message_stream_spec.rb
|
145
|
+
- spec/gherkin/parser_spec.rb
|
143
146
|
- spec/gherkin/gherkin_spec.rb
|
144
147
|
- spec/gherkin/query_spec.rb
|
145
148
|
- spec/capture_warnings.rb
|