gherkin_lint 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -1
- data/Rakefile +1 -1
- data/gherkin_lint.gemspec +1 -1
- data/lib/gherkin_lint/linter/invalid_step_flow.rb +1 -0
- data/lib/gherkin_lint/linter/use_background.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35a10a061b2428e77d618f09b7f122b881ded0de
|
4
|
+
data.tar.gz: 7d7bbf6a0af2f3d7cf06596c035d5d28a4860c88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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
data/gherkin_lint.gemspec
CHANGED
@@ -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.
|
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.
|
178
|
+
rubygems_version: 2.2.5
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Gherkin Lint
|