geordi 0.12.3 → 0.12.4
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.
- data/lib/geordi/cuc.rb +25 -10
- data/lib/geordi/version.rb +1 -1
- metadata +3 -3
data/lib/geordi/cuc.rb
CHANGED
@@ -41,9 +41,11 @@ module Geordi
|
|
41
41
|
gem 'parallel_tests', parallel_tests_version
|
42
42
|
require 'parallel_tests'
|
43
43
|
type_arg = Gem::Version.new(::ParallelTests::VERSION) > Gem::Version.new('0.7.0') ? 'cucumber' : 'features'
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
features_to_run = command_line_features.join(' ')
|
45
|
+
features_to_run = 'features' if features_to_run == ""
|
46
|
+
parallel_tests_args = "#{features_to_run} -t #{type_arg}"
|
47
|
+
cucumber_args = command_line_args.empty? ? '' : "-o '#{escape_shell_args(command_line_args).join(" ")}'"
|
48
|
+
[use_firefox_for_selenium, 'b parallel_test', parallel_tests_args, cucumber_args].flatten.compact.join(" ")
|
47
49
|
end
|
48
50
|
|
49
51
|
|
@@ -77,12 +79,6 @@ module Geordi
|
|
77
79
|
end
|
78
80
|
end
|
79
81
|
|
80
|
-
def command_line_features
|
81
|
-
@command_line_features ||= argv.select do |arg|
|
82
|
-
arg =~ /.*\.feature/i
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
82
|
def rerun_txt_features
|
87
83
|
@rerun_txt_features ||= begin
|
88
84
|
if File.exists?("rerun.txt")
|
@@ -93,6 +89,25 @@ module Geordi
|
|
93
89
|
end
|
94
90
|
end
|
95
91
|
|
92
|
+
def command_line_features
|
93
|
+
@command_line_features ||= begin
|
94
|
+
index = argv.find_index("--") || -1
|
95
|
+
argv[index + 1 .. -1].map do |file_or_dir|
|
96
|
+
if File.directory?(file_or_dir)
|
97
|
+
file_or_dir = Dir.glob(File.join(file_or_dir, "**", "*.feature"))
|
98
|
+
end
|
99
|
+
file_or_dir
|
100
|
+
end.flatten.uniq.compact
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def command_line_args
|
105
|
+
@command_line_args ||= begin
|
106
|
+
index = argv.find_index("--")
|
107
|
+
index ? argv[0 .. index-1] : []
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
96
111
|
def consolidate_rerun_txt_files
|
97
112
|
parallel_rerun_files = Dir.glob("parallel_rerun*.txt")
|
98
113
|
unless parallel_rerun_files.empty?
|
@@ -132,7 +147,7 @@ module Geordi
|
|
132
147
|
@parallel_tests_version ||= begin
|
133
148
|
parallel_tests = `bundle list`.split("\n").detect{ |x| x =~ /parallel_tests/ }
|
134
149
|
if parallel_tests
|
135
|
-
parallel_tests.scan( /\((
|
150
|
+
parallel_tests.scan( /\(([\d\.]+).*\)/ ).flatten.first
|
136
151
|
end
|
137
152
|
end
|
138
153
|
end
|
data/lib/geordi/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geordi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 39
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 12
|
9
|
-
-
|
10
|
-
version: 0.12.
|
9
|
+
- 4
|
10
|
+
version: 0.12.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Henning Koch
|