gherkin 8.2.0 → 8.2.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gherkin/pickles/compiler.rb +11 -11
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c425e6ebae052b06f2464f7c5a53d744013a51538cd063d8894c922460aaa85b
4
- data.tar.gz: 60a4f31c0b53f7995f75f258a25773043eabc82116565706a5789ede5eaacd78
3
+ metadata.gz: febbe75fb7b4a0b1dad916d53ba8e16953b4e49b5c8b6e0d7dc55e4bd5bb2182
4
+ data.tar.gz: b0c6d742f803f96c4ab04e2e9d7a6f17b0c72c3166dae18f812d17730f53e473
5
5
  SHA512:
6
- metadata.gz: db8446162a263304c961c2fd79ff808c47a2c71c69c34c1300b412fa17c924df7a54becffd84e6608babab7441a968790e299a9360d4f2123c377ced30bbeb89
7
- data.tar.gz: fcb986c6d9abb4c3a388d783cb0f51e2187a152830d9a207692bf0bf02b5a76c442d813cff62c3106c1279380c3023fc637c5cecf8a9223252ac009838d71384
6
+ metadata.gz: 117041fe3c8799de6a2d7ce6e60623b63ac8bba03e9de286b952001c2582f67ecef187a5a30837db7fa20e9bd6b468d0f4cb458e13d99cc18ce6623a54343456
7
+ data.tar.gz: e7e08085ce274f049f7d16f5e0db9cb64f919f528a71549dad975744e87b4c6e560c5d26b8fe81f810952ce220863cfefd3ab6907d4e8e4fb41f373a570d48b9
@@ -23,41 +23,41 @@ module Gherkin
23
23
  private
24
24
 
25
25
  def compile_feature(pickles, language, tags, feature, source)
26
- background_steps = []
26
+ feature_background_steps = []
27
27
  feature.children.each do |child|
28
28
  if child.background
29
- background_steps.concat(pickle_steps(child.background.steps))
29
+ feature_background_steps.concat(child.background.steps)
30
30
  elsif child.rule
31
- compile_rule(pickles, language, tags, background_steps, child.rule, source)
31
+ compile_rule(pickles, language, tags, feature_background_steps, child.rule, source)
32
32
  else
33
33
  scenario = child.scenario
34
34
  if scenario.examples.empty?
35
- compile_scenario(tags, background_steps, scenario, language, pickles, source)
35
+ compile_scenario(tags, feature_background_steps, scenario, language, pickles, source)
36
36
  else
37
- compile_scenario_outline(tags, background_steps, scenario, language, pickles, source)
37
+ compile_scenario_outline(tags, feature_background_steps, scenario, language, pickles, source)
38
38
  end
39
39
  end
40
40
  end
41
41
  end
42
42
 
43
43
  def compile_rule(pickles, language, tags, feature_background_steps, rule, source)
44
- background_steps = feature_background_steps.dup
44
+ rule_background_steps = feature_background_steps.dup
45
45
  rule.children.each do |child|
46
46
  if child.background
47
- background_steps.concat(pickle_steps(child.background.steps))
47
+ rule_background_steps.concat(child.background.steps)
48
48
  else
49
49
  scenario = child.scenario
50
50
  if scenario.examples.empty?
51
- compile_scenario(tags, background_steps, scenario, language, pickles, source)
51
+ compile_scenario(tags, rule_background_steps, scenario, language, pickles, source)
52
52
  else
53
- compile_scenario_outline(tags, background_steps, scenario, language, pickles, source)
53
+ compile_scenario_outline(tags, rule_background_steps, scenario, language, pickles, source)
54
54
  end
55
55
  end
56
56
  end
57
57
  end
58
58
 
59
59
  def compile_scenario(feature_tags, background_steps, scenario, language, pickles, source)
60
- steps = scenario.steps.empty? ? [] : [].concat(background_steps)
60
+ steps = scenario.steps.empty? ? [] : [].concat(pickle_steps(background_steps))
61
61
 
62
62
  tags = [].concat(feature_tags).concat(scenario.tags)
63
63
 
@@ -82,7 +82,7 @@ module Gherkin
82
82
  variable_cells = examples.table_header.cells
83
83
  examples.table_body.each do |values_row|
84
84
  value_cells = values_row.cells
85
- steps = scenario.steps.empty? ? [] : [].concat(background_steps)
85
+ steps = scenario.steps.empty? ? [] : [].concat(pickle_steps(background_steps))
86
86
  tags = [].concat(feature_tags).concat(scenario.tags).concat(examples.tags)
87
87
 
88
88
  scenario.steps.each do |scenario_outline_step|
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: 8.2.0
4
+ version: 8.2.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: 2019-11-14 00:00:00.000000000 Z
13
+ date: 2019-11-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cucumber-messages
@@ -155,7 +155,7 @@ rubyforge_project:
155
155
  rubygems_version: 2.7.6.2
156
156
  signing_key:
157
157
  specification_version: 4
158
- summary: gherkin-8.2.0
158
+ summary: gherkin-8.2.1
159
159
  test_files:
160
160
  - spec/gherkin/dialect_spec.rb
161
161
  - spec/gherkin/stream/subprocess_message_stream_spec.rb