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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aaf173c438b057ddc0fde8ff1b335f076f2ffdcf
4
- data.tar.gz: de324a6c925e15d68c9710236e8d23f20a9af746
3
+ metadata.gz: 70eab832c2ae31d87619740f7ba06cdfdba470f2
4
+ data.tar.gz: d0306b66c8fe6dc0dc28420701e3e3d4974e1848
5
5
  SHA512:
6
- metadata.gz: 401234f4b9e42a343b34ef6c44f115f84bb247c8977fbfba06b2096773ccb015627bc4a16db5f6a24d7cedc6077b8b1202e9dce0e96b41498f94dca9dafe1e45
7
- data.tar.gz: dae16e6defcbbea3e9aba080565a0aaed888b8d53f03068c59935b6d053780a8702fed63ce8b27d686b882f40ffeef1c11a38446c5ef1d52416e818fc932cc4f
6
+ metadata.gz: 382223df994462c0d1c05536b2f16ec151915d468fba0ed76fcfbe3ad350b23a51a58a8bfca771983349ae5485b143ee47705e8eabeb504b67b207a05af30efa
7
+ data.tar.gz: 22f7aa83cc69583497198684be562a249e68570a888b879d2b3cd39aaa6317c18ae26a4b043d42576edea1ad9d867f4d87d793c761109c11a3fd5a28a6b9cdc5
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,5 @@
1
- *dvͺ��)�%HK���.��lg����_oǹ�k�����
2
- ��ӈy"M"P�|.J��y&�V
1
+
2
+ ��zO�Ч�#Z-2� ���jޫՠ�I�y�[�yw��8x�,LY�q�oV#������|��>4,�Q�i���F5
3
+ ���.=���%
4
+ ��>�*���!�[/�˽'���SI��)lBU=ύ�Ϙ��� � t(��$A t��=Z
5
+ �E���2,p��I f�K߂~��\�9� }.R�.�%�Fo�у��� �I亞��u�T+$u^�C2)@la���8�;*V���bp�gQ�
@@ -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| # does not return values in ruby 1.8
31
- results = in_multiple_threads(matrix.each_with_index, options[:parallel]) do |config, i|
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
- puts cmd
79
- Open3.popen2(env, cmd) do |stdin, stdout, wait|
80
- while str = stdout.gets
81
- puts str
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)
@@ -1,3 +1,3 @@
1
1
  module WWTD
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wwtd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
metadata.gz.sig CHANGED
Binary file