wwtd 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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +5 -2
- data/lib/wwtd.rb +8 -12
- data/lib/wwtd/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70eab832c2ae31d87619740f7ba06cdfdba470f2
|
4
|
+
data.tar.gz: d0306b66c8fe6dc0dc28420701e3e3d4974e1848
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 382223df994462c0d1c05536b2f16ec151915d468fba0ed76fcfbe3ad350b23a51a58a8bfca771983349ae5485b143ee47705e8eabeb504b67b207a05af30efa
|
7
|
+
data.tar.gz: 22f7aa83cc69583497198684be562a249e68570a888b879d2b3cd39aaa6317c18ae26a4b043d42576edea1ad9d867f4d87d793c761109c11a3fd5a28a6b9cdc5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
data/lib/wwtd.rb
CHANGED
@@ -7,7 +7,6 @@ require "tmpdir"
|
|
7
7
|
require "wwtd/ruby"
|
8
8
|
require "wwtd/run"
|
9
9
|
require "wwtd/cli"
|
10
|
-
require "open3"
|
11
10
|
|
12
11
|
module WWTD
|
13
12
|
CONFIG = ".travis.yml"
|
@@ -24,11 +23,10 @@ module WWTD
|
|
24
23
|
end
|
25
24
|
|
26
25
|
def run(matrix, options, &block)
|
27
|
-
results = nil
|
28
26
|
with_clean_dot_bundle do
|
29
27
|
with_clean_env do
|
30
|
-
Dir.mktmpdir do |lock|
|
31
|
-
|
28
|
+
Dir.mktmpdir do |lock|
|
29
|
+
in_multiple_threads(matrix.each_with_index, options[:parallel]) do |config, i|
|
32
30
|
# set env as parallel_tests does to reuse existing infrastructure
|
33
31
|
env = {}
|
34
32
|
env["TEST_ENV_NUMBER"] = (i == 0 ? "" : (i + 1).to_s) if options[:parallel]
|
@@ -37,7 +35,6 @@ module WWTD
|
|
37
35
|
end
|
38
36
|
end
|
39
37
|
end
|
40
|
-
results
|
41
38
|
end
|
42
39
|
|
43
40
|
private
|
@@ -72,16 +69,15 @@ module WWTD
|
|
72
69
|
matrix.map! { |c| config.merge(c) }
|
73
70
|
end
|
74
71
|
|
75
|
-
# http://grosser.it/2010/12/11/sh-without-rake/
|
76
72
|
def sh(env, cmd=nil)
|
77
73
|
cmd, env = env, {} unless cmd
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
end
|
83
|
-
wait.value.success?
|
74
|
+
env = if env.any?
|
75
|
+
env.map {|k,v| "export #{k}=#{Shellwords.escape(v)}" }.join(" && ") + " && "
|
76
|
+
else
|
77
|
+
""
|
84
78
|
end
|
79
|
+
puts cmd
|
80
|
+
system("#{env}#{cmd}")
|
85
81
|
end
|
86
82
|
|
87
83
|
def with_clean_env(&block)
|
data/lib/wwtd/version.rb
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|