gherkin_lint 0.4.0 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e776cabb83c6f00b485d9e88b7193bfd421ab79
4
- data.tar.gz: 63e15be6fb1920e3a587b75163af5d18b959f3d3
3
+ metadata.gz: 35a10a061b2428e77d618f09b7f122b881ded0de
4
+ data.tar.gz: 7d7bbf6a0af2f3d7cf06596c035d5d28a4860c88
5
5
  SHA512:
6
- metadata.gz: 03ccf86a4b33104ba1cb5f65d98df1a72a660ebb27a53997be9c38b95a1271ea2ced2c55522e10dbd2a25c57e4d141ebcca647d6ffd1617885b9b6ddf5ae1e65
7
- data.tar.gz: 31f0d3b395b1e4661d5d0705429c4a057008c719a0fcebffecf68b423e73778279d37d2f77cccdc0f7978787f48005e24dc0a566aa61820d46d5099db71b30fb
6
+ metadata.gz: bf81856a469d2ba45399358896e4e8fe485833af03f362fd3b57e71ef3e7a2cb3e5173a3d337376874f01125ea5836948ebe92faf13d832a0068c7ccec2472eb
7
+ data.tar.gz: 2901e8259fa1146db73b69101a5abd6dfa96618adf9d830ea9ef9392b7a14331e0c194af15f8131aadbadf1047d9892e977ddd30f0041c0abb9aa5f8187b1b0d
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-08-11 02:27:52 +0200 using RuboCop version 0.42.0.
3
+ # on 2016-08-11 02:50:03 +0200 using RuboCop version 0.42.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -21,6 +21,11 @@ Metrics/ClassLength:
21
21
  Metrics/LineLength:
22
22
  Max: 116
23
23
 
24
+ # Offense count: 1
25
+ # Configuration parameters: CountComments.
26
+ Metrics/MethodLength:
27
+ Max: 11
28
+
24
29
  # Offense count: 1
25
30
  # Cop supports --auto-correct.
26
31
  # Configuration parameters: EnforcedStyle, SupportedStyles.
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ end
11
11
 
12
12
  desc 'Publishes the Gem'
13
13
  task :push do
14
- sh 'gem push gherkin_lint-0.4.0.gem'
14
+ sh 'gem push gherkin_lint-0.4.1.gem'
15
15
  end
16
16
 
17
17
  desc 'Checks ruby style'
data/gherkin_lint.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'gherkin_lint'
3
- s.version = '0.4.0'
3
+ s.version = '0.4.1'
4
4
  s.date = '2016-08-11'
5
5
  s.summary = 'Gherkin Lint'
6
6
  s.description = 'Lint Gherkin Files'
@@ -6,6 +6,7 @@ module GherkinLint
6
6
  def lint
7
7
  filled_scenarios do |file, feature, scenario|
8
8
  steps = scenario[:steps].select { |step| step[:keyword] != 'And ' && step[:keyword] != 'But ' }
9
+ next if steps.empty?
9
10
  last_step_is_an_action(file, feature, scenario, steps)
10
11
  given_after_non_given(file, feature, scenario, steps)
11
12
  verification_before_action(file, feature, scenario, steps)
@@ -30,6 +30,7 @@ module GherkinLint
30
30
  has_non_given_step = false
31
31
  feature[:children].each do |scenario|
32
32
  next unless scenario.include? :steps
33
+ next if scenario[:steps].empty?
33
34
  has_non_given_step = true unless scenario[:steps].first[:keyword] == 'Given '
34
35
  end
35
36
  return if has_non_given_step
@@ -43,6 +44,7 @@ module GherkinLint
43
44
  feature[:children].each do |scenario|
44
45
  next unless scenario[:type] != :Background
45
46
  next unless scenario.include? :steps
47
+ next if scenario[:steps].empty?
46
48
  prototypes = [render_step(scenario[:steps].first)]
47
49
  prototypes = expand_examples(scenario[:examples], prototypes) if scenario.key? :examples
48
50
  prototypes.each { |prototype| yield prototype }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Rohe
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project:
178
- rubygems_version: 2.2.2
178
+ rubygems_version: 2.2.5
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: Gherkin Lint