cucumber-gherkin 17.0.0 → 18.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,7 +37,9 @@ module Gherkin
37
37
  end
38
38
  end
39
39
 
40
- def compile_rule(pickles, language, tags, feature_background_steps, rule, source)
40
+ def compile_rule(pickles, language, feature_tags, feature_background_steps, rule, source)
41
+ tags = [].concat(feature_tags).concat(rule.tags)
42
+
41
43
  rule_background_steps = feature_background_steps.dup
42
44
  rule.children.each do |child|
43
45
  if child.background
@@ -53,10 +55,10 @@ module Gherkin
53
55
  end
54
56
  end
55
57
 
56
- def compile_scenario(feature_tags, background_steps, scenario, language, pickles, source)
58
+ def compile_scenario(inherited_tags, background_steps, scenario, language, pickles, source)
57
59
  steps = scenario.steps.empty? ? [] : [].concat(pickle_steps(background_steps))
58
60
 
59
- tags = [].concat(feature_tags).concat(scenario.tags)
61
+ tags = [].concat(inherited_tags).concat(scenario.tags)
60
62
 
61
63
  scenario.steps.each do |step|
62
64
  steps.push(pickle_step(step))
@@ -74,13 +76,13 @@ module Gherkin
74
76
  pickles.push(pickle)
75
77
  end
76
78
 
77
- def compile_scenario_outline(feature_tags, background_steps, scenario, language, pickles, source)
79
+ def compile_scenario_outline(inherited_tags, background_steps, scenario, language, pickles, source)
78
80
  scenario.examples.reject { |examples| examples.table_header.nil? }.each do |examples|
79
81
  variable_cells = examples.table_header.cells
80
82
  examples.table_body.each do |values_row|
81
83
  value_cells = values_row.cells
82
84
  steps = scenario.steps.empty? ? [] : [].concat(pickle_steps(background_steps))
83
- tags = [].concat(feature_tags).concat(scenario.tags).concat(examples.tags)
85
+ tags = [].concat(inherited_tags).concat(scenario.tags).concat(examples.tags)
84
86
 
85
87
  scenario.steps.each do |scenario_outline_step|
86
88
  step_props = pickle_step_props(scenario_outline_step, variable_cells, values_row)
@@ -2,7 +2,17 @@ require 'rspec'
2
2
  require 'gherkin/gherkin_line'
3
3
 
4
4
  describe Gherkin::GherkinLine do
5
- context '#table_cell' do
5
+ context '#tags' do
6
+ def tags(line)
7
+ Gherkin::GherkinLine.new(line, 12).tags.map(&:text)
8
+ end
9
+
10
+ it 'allows any non-space characters in a tag' do
11
+ expect(tags(" @foo:bar @zap🥒yo")).to eq(['@foo:bar', '@zap🥒yo'])
12
+ end
13
+ end
14
+
15
+ context '#table_cells' do
6
16
  def cells_text(line)
7
17
  Gherkin::GherkinLine.new(line, 12).table_cells.map(&:text)
8
18
  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: 17.0.0
4
+ version: 18.1.1
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-02-07 00:00:00.000000000 Z
13
+ date: 2021-04-22 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: '14.0'
21
+ version: '15.0'
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: 14.0.0
24
+ version: 15.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: '14.0'
31
+ version: '15.0'
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 14.0.0
34
+ version: 15.0.0
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: rake
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -136,13 +136,13 @@ requirements: []
136
136
  rubygems_version: 3.1.2
137
137
  signing_key:
138
138
  specification_version: 4
139
- summary: cucumber-gherkin-17.0.0
139
+ summary: cucumber-gherkin-18.1.1
140
140
  test_files:
141
141
  - spec/capture_warnings.rb
142
- - spec/gherkin/dialect_spec.rb
143
142
  - spec/gherkin/gherkin_line_spec.rb
144
- - spec/gherkin/gherkin_spec.rb
143
+ - spec/gherkin/dialect_spec.rb
145
144
  - spec/gherkin/parser_spec.rb
146
- - spec/gherkin/query_spec.rb
147
145
  - spec/gherkin/stream/parser_message_stream_spec.rb
148
146
  - spec/gherkin/stream/subprocess_message_stream_spec.rb
147
+ - spec/gherkin/query_spec.rb
148
+ - spec/gherkin/gherkin_spec.rb