recumber 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/bin/recumber +2 -4
- data/lib/recumber.rb +4 -1
- data/lib/recumber/cucumber_runner.rb +14 -2
- data/recumber.gemspec +1 -1
- data/spec/lib/recumber/cucumber_runner_spec.rb +16 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTVlNTg5MzEwOTc4YmM4NmYyYTMwM2EzMGExZjdlYmUyYTNkNGE5ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWZiMjdhYzliYTY2MWQyY2UyMDY3NGY4MmMwMWJmZTk4MGUyYjI4MQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmNlNzU0NzYzMzNkODY0MTliNDMzOTBlZjVhZTcxOTYyZDIzYjEwZTA3YjRm
|
10
|
+
N2UzMTU0NTVmYjNmMzI1MmM2NmEzM2ExZDk4OGY4MDk3NDBjNzY2MzdlOTdj
|
11
|
+
ZjA4MTJmYmZkMzdkMDk3MjdjNTg3ODQ5NTNmNDMwNjE4ODMzMjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Mzc0NWQ1Y2ZkYmRmNmQxNjJlYzI5YjZlN2Y4ZWE0OTcxMjE0YmZmOTc5OGJl
|
14
|
+
YjI5NGY0ZTVjYzE3MTIyMzNjYjE3MzAxM2IzN2I5Y2QwZDk2NjEyZmQ5ZjJk
|
15
|
+
MTg2ZmY5NjM2YTU5N2UyYWMwNWY0MjdjYjc2NGNlNTIyYWI0OTg=
|
data/Gemfile.lock
CHANGED
data/bin/recumber
CHANGED
@@ -4,9 +4,7 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
|
4
4
|
|
5
5
|
require 'recumber'
|
6
6
|
|
7
|
-
options =
|
8
|
-
|
9
|
-
parse_command_line_args
|
7
|
+
options = parse_command_line_args
|
10
8
|
|
11
9
|
cuke_log_path = "log/cucumber/last_run.log"
|
12
10
|
|
@@ -26,7 +24,7 @@ if cuke_input.length > 0
|
|
26
24
|
print_no_failures_message
|
27
25
|
else
|
28
26
|
print_rerun_message failed_features
|
29
|
-
CucumberRunner.rerun_features
|
27
|
+
CucumberRunner.rerun_features(failed_features, options)
|
30
28
|
end
|
31
29
|
else
|
32
30
|
puts "Incorrect usage!"
|
data/lib/recumber.rb
CHANGED
@@ -7,6 +7,8 @@ def read_piped_input
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def parse_command_line_args
|
10
|
+
options_hash = {}
|
11
|
+
|
10
12
|
option_parser = OptionParser.new do |option|
|
11
13
|
option.banner = "Usage: recumber COMMAND [OPTIONS]"
|
12
14
|
option.separator ""
|
@@ -15,7 +17,7 @@ def parse_command_line_args
|
|
15
17
|
option.separator "Options"
|
16
18
|
|
17
19
|
option.on("-z","--zeus","Rerun the failing steps under Zeus") do
|
18
|
-
|
20
|
+
options_hash[:zeus] = true
|
19
21
|
end
|
20
22
|
|
21
23
|
option.on("-h","--help","help") do
|
@@ -24,6 +26,7 @@ def parse_command_line_args
|
|
24
26
|
end
|
25
27
|
|
26
28
|
option_parser.parse!
|
29
|
+
options_hash
|
27
30
|
end
|
28
31
|
|
29
32
|
def print_no_failures_message
|
@@ -1,10 +1,22 @@
|
|
1
1
|
class CucumberRunner
|
2
2
|
|
3
|
-
def self.rerun_features(feature_paths)
|
4
|
-
command =
|
3
|
+
def self.rerun_features(feature_paths, options)
|
4
|
+
command = get_command_from_options(options)
|
5
|
+
command << " " << feature_paths.join(' ')
|
6
|
+
|
5
7
|
puts "Recumber command: #{command}"
|
6
8
|
|
7
9
|
system(command)
|
8
10
|
end
|
9
11
|
|
12
|
+
private
|
13
|
+
|
14
|
+
def self.get_command_from_options(options)
|
15
|
+
if options[:zeus]
|
16
|
+
command = "zeus cucumber"
|
17
|
+
else
|
18
|
+
command = "cucumber"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
10
22
|
end
|
data/recumber.gemspec
CHANGED
@@ -7,9 +7,22 @@ describe CucumberRunner do
|
|
7
7
|
let(:system) { double }
|
8
8
|
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
context "with no options specified" do
|
11
|
+
let(:options) { {} }
|
12
|
+
|
13
|
+
it "calls 'system' with the joined array" do
|
14
|
+
CucumberRunner.should_receive(:system).with("cucumber cmd_1 cmd_2")
|
15
|
+
CucumberRunner.rerun_features(feature_paths, options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "with zeus specified in the options hash" do
|
20
|
+
let(:options) { { zeus: true } }
|
21
|
+
|
22
|
+
it "calls 'system' with the joined array" do
|
23
|
+
CucumberRunner.should_receive(:system).with("zeus cucumber cmd_1 cmd_2")
|
24
|
+
CucumberRunner.rerun_features(feature_paths, options)
|
25
|
+
end
|
13
26
|
end
|
14
27
|
end
|
15
28
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todd Mohney
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Automatically re-runs failed cucumber features.
|
14
14
|
email:
|