geordi 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +1 -5
- data/features/cucumber.feature +17 -6
- data/lib/geordi/commands/cucumber.rb +13 -7
- data/lib/geordi/cucumber.rb +3 -3
- data/lib/geordi/version.rb +1 -1
- metadata +12 -18
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 87d8d2aedced0e3ecb654e08fc2c78c1a5c2c463
|
4
|
+
data.tar.gz: bc8f991eaaa88f1660486c3a6aefc9fb07e2a061
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9df5ded7314adcbbb35ba3722aa39e9e2cccfbda1e668486620454c9034efa267884f2058643ed88c8a3ffa931ee9a9104e3c23e5bf055f573c19af42ca629a0
|
7
|
+
data.tar.gz: 49ce0690a6dd0dd75600e6b6c012e60eafad2606d2e42a067b3a98c6cdbf0e5d58ebd3982c213e9b0449ce09ba6ee3da2b900e9d513dc4fc34eb32d51170552a
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
geordi (1.4.
|
4
|
+
geordi (1.4.3)
|
5
5
|
thor (>= 0.18.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -37,9 +37,6 @@ GEM
|
|
37
37
|
method_source (0.8.2)
|
38
38
|
multi_json (1.11.2)
|
39
39
|
multi_test (0.1.2)
|
40
|
-
parallel (1.9.0)
|
41
|
-
parallel_tests (2.7.1)
|
42
|
-
parallel
|
43
40
|
pry (0.10.3)
|
44
41
|
coderay (~> 1.1.0)
|
45
42
|
method_source (~> 0.8.1)
|
@@ -61,7 +58,6 @@ DEPENDENCIES
|
|
61
58
|
aruba
|
62
59
|
geordi!
|
63
60
|
highline
|
64
|
-
parallel_tests
|
65
61
|
pry
|
66
62
|
rspec-mocks
|
67
63
|
|
data/features/cucumber.feature
CHANGED
@@ -72,15 +72,15 @@ Feature: The cucumber command
|
|
72
72
|
"""
|
73
73
|
|
74
74
|
When I run `geordi cucumber features/sub`
|
75
|
-
Then the output should contain "> Only: features/sub/
|
75
|
+
Then the output should contain "> Only: features/sub/two.feature, features/sub/one.feature"
|
76
76
|
And the output should contain "> Using parallel_tests"
|
77
77
|
|
78
78
|
|
79
79
|
Scenario: Using the @solo tag
|
80
80
|
|
81
81
|
The cucumber command runs all features without the @solo tag. If any of the
|
82
|
-
.feature files contains '@solo', it boots Cucumber a second time
|
83
|
-
only the features tagged with @solo.
|
82
|
+
specified .feature files contains '@solo', it boots Cucumber a second time
|
83
|
+
and runs only those of the features tagged with @solo.
|
84
84
|
|
85
85
|
Given a file named "features/no_solo.feature" with:
|
86
86
|
"""
|
@@ -94,7 +94,7 @@ Feature: The cucumber command
|
|
94
94
|
Scenario: This scenario must NOT run in parallel
|
95
95
|
"""
|
96
96
|
|
97
|
-
When I run `geordi cucumber --verbose`
|
97
|
+
When I run `geordi cucumber --verbose features`
|
98
98
|
Then the output should contain "# Running features"
|
99
99
|
And the output should match /^> .*cucumber .*--tags ~@solo/
|
100
100
|
And the output should contain "# Running @solo features"
|
@@ -102,13 +102,24 @@ Feature: The cucumber command
|
|
102
102
|
|
103
103
|
|
104
104
|
Scenario: When there are no scenarios tagged @solo, the extra run is skipped
|
105
|
-
Given a file named "features/no_solo.feature" with:
|
105
|
+
Given a file named "features/no_solo/one.feature" with:
|
106
106
|
"""
|
107
107
|
Feature: Test without solo tag
|
108
108
|
Scenario: This scenario can run in parallel
|
109
109
|
"""
|
110
|
+
And a file named "features/no_solo/two.feature" with:
|
111
|
+
"""
|
112
|
+
Feature: A second test to provoke a parallel run
|
113
|
+
Scenario: Something
|
114
|
+
"""
|
115
|
+
And a file named "features/solo.feature" with:
|
116
|
+
"""
|
117
|
+
Feature: Solo test
|
118
|
+
@solo
|
119
|
+
Scenario: This scenario is not even run during this test
|
120
|
+
"""
|
110
121
|
|
111
|
-
When I run `geordi cucumber --verbose`
|
122
|
+
When I run `geordi cucumber features/no_solo --verbose`
|
112
123
|
Then the output should contain "# Running features"
|
113
124
|
And the output should match /^> .*cucumber .*--tags ~@solo/
|
114
125
|
But the output should not contain "# Running @solo features"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
desc 'cucumber [FILES]', 'Run Cucumber features'
|
1
|
+
desc 'cucumber [FILES and OPTIONS]', 'Run Cucumber features'
|
2
2
|
long_desc <<-LONGDESC
|
3
3
|
Example: `geordi cucumber features/authentication_feature:3`
|
4
4
|
|
@@ -24,32 +24,38 @@ option :debug, :aliases => '-d', :type => :boolean,
|
|
24
24
|
option :rerun, :aliases => '-r', :type => :numeric, :default => 0,
|
25
25
|
:desc => 'Rerun features up to N times while failing'
|
26
26
|
|
27
|
-
def cucumber(*
|
27
|
+
def cucumber(*args)
|
28
28
|
if File.directory?('features')
|
29
29
|
require 'geordi/cucumber'
|
30
30
|
|
31
31
|
invoke_cmd 'bundle_install'
|
32
32
|
|
33
|
+
cmd_opts, files = args.partition { |f| f.start_with? '-' }
|
34
|
+
cmd_opts << '--format' << 'pretty' << '--backtrace' if options.debug
|
35
|
+
|
33
36
|
announce 'Running features'
|
34
|
-
files << '--format' << 'pretty' << '--backtrace' if options.debug
|
35
37
|
|
36
38
|
# Normal run
|
37
|
-
unless Geordi::Cucumber.new.run(files, :verbose => options.verbose)
|
39
|
+
unless Geordi::Cucumber.new.run(files, cmd_opts, :verbose => options.verbose)
|
40
|
+
cmd_opts << '--profile' << 'rerun'
|
38
41
|
|
39
42
|
# Reruns
|
40
43
|
(1 + options.rerun).times do |i|
|
41
44
|
fail 'Features failed.' if (i == options.rerun) # All reruns done?
|
42
45
|
|
43
46
|
announce "Rerun ##{ i + 1 } of #{ options.rerun }"
|
44
|
-
break if Geordi::Cucumber.new.run(
|
47
|
+
break if Geordi::Cucumber.new.run(files, cmd_opts, :verbose => options.verbose, :parallel => false)
|
45
48
|
end
|
46
49
|
end
|
47
50
|
|
48
51
|
# Serial run of @solo scenarios
|
49
|
-
|
52
|
+
files << 'features' if files.empty? # Proper grepping
|
53
|
+
solo_tag_usages = `grep -r '@solo' #{ files.join(' ') }`.split("\n")
|
50
54
|
if solo_tag_usages.any?
|
55
|
+
cmd_opts << '--tags' << '@solo'
|
56
|
+
|
51
57
|
announce 'Running @solo features'
|
52
|
-
Geordi::Cucumber.new.run
|
58
|
+
Geordi::Cucumber.new.run files, cmd_opts, :verbose => options.verbose, :parallel => false
|
53
59
|
end
|
54
60
|
|
55
61
|
else
|
data/lib/geordi/cucumber.rb
CHANGED
@@ -15,8 +15,8 @@ module Geordi
|
|
15
15
|
VNC_VIEWER_COMMAND = "vncviewer #{VNC_DISPLAY}"
|
16
16
|
VNC_ENV_VARIABLES = %w[DISPLAY BROWSER LAUNCHY_BROWSER]
|
17
17
|
|
18
|
-
def run(files, options = {})
|
19
|
-
self.argv = files
|
18
|
+
def run(files, cucumber_options, options = {})
|
19
|
+
self.argv = files + cucumber_options
|
20
20
|
|
21
21
|
consolidate_rerun_txt_files
|
22
22
|
show_features_to_run
|
@@ -25,7 +25,7 @@ module Geordi
|
|
25
25
|
command = use_parallel_tests?(options) ? parallel_execution_command : serial_execution_command
|
26
26
|
note_cmd(command) if options[:verbose]
|
27
27
|
|
28
|
-
puts
|
28
|
+
puts # Make newline
|
29
29
|
system command # Util.system! would reset the Firefox PATH
|
30
30
|
end
|
31
31
|
|
data/lib/geordi/version.rb
CHANGED
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geordi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
5
|
-
prerelease:
|
4
|
+
version: 1.4.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Henning Koch
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-29 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: thor
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.18.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.18.0
|
30
27
|
description: Collection of command line tools we use in our daily work with Ruby,
|
@@ -53,8 +50,8 @@ executables:
|
|
53
50
|
extensions: []
|
54
51
|
extra_rdoc_files: []
|
55
52
|
files:
|
56
|
-
- .gitignore
|
57
|
-
- .ruby-version
|
53
|
+
- ".gitignore"
|
54
|
+
- ".ruby-version"
|
58
55
|
- Gemfile
|
59
56
|
- Gemfile.lock
|
60
57
|
- LICENSE
|
@@ -131,29 +128,26 @@ files:
|
|
131
128
|
homepage: http://makandra.com
|
132
129
|
licenses:
|
133
130
|
- MIT
|
134
|
-
|
135
|
-
|
136
|
-
'
|
131
|
+
metadata: {}
|
132
|
+
post_install_message: "* Binary `geordi` installed\n"
|
137
133
|
rdoc_options: []
|
138
134
|
require_paths:
|
139
135
|
- lib
|
140
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
-
none: false
|
142
137
|
requirements:
|
143
|
-
- -
|
138
|
+
- - ">="
|
144
139
|
- !ruby/object:Gem::Version
|
145
140
|
version: '0'
|
146
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
142
|
requirements:
|
149
|
-
- -
|
143
|
+
- - ">="
|
150
144
|
- !ruby/object:Gem::Version
|
151
145
|
version: '0'
|
152
146
|
requirements: []
|
153
147
|
rubyforge_project: geordi
|
154
|
-
rubygems_version:
|
148
|
+
rubygems_version: 2.5.1
|
155
149
|
signing_key:
|
156
|
-
specification_version:
|
150
|
+
specification_version: 4
|
157
151
|
summary: Collection of command line tools we use in our daily work with Ruby, Rails
|
158
152
|
and Linux at makandra.
|
159
153
|
test_files: []
|