wwtd 0.1.5 → 0.1.6

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: 72359d60792ff8beecbd7ba0d3f73e935d5a8827
4
- data.tar.gz: fa78422745883e6a44cad469c82a86ef28f73c28
3
+ metadata.gz: 8100516d49389256a9f198f600212230d36d986c
4
+ data.tar.gz: bc89e3f3e5e999f1e524e4fae2bbd61bd3d92cfa
5
5
  SHA512:
6
- metadata.gz: 66a6b38295b69343be3cd7f5d5ee5b95b670d2110f6894490371b0acbacd7ec8de020c636d5e7b465fc8f70ae4dcc41d4406c5f9c051934bd7803938aa0a078a
7
- data.tar.gz: f8c5596b70130d5d104d9683c201cfeb5bdc2b481b1ab7b7939dfe72b6cec6669708a3ac7b5f46d6b8237e583e83b1654c5db4867d9accdde4cc060e4af34fd7
6
+ metadata.gz: bd95705875e7e95fa238413c8dfb8177fad6de7ed6203426e76246f41132c5d6e78fbe8302b46d3d884739d0cd031a8ec82956075cb19cdea7b1aa4716d19862
7
+ data.tar.gz: be1775f02c64bed218edb42797969de58604b842fcf004221398baf3d75c705851d82b4cbc2c832014ba164580e0ff6847e8510797d74ef6c6c1c6870828e9a9
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -97,16 +97,16 @@ module WWTD
97
97
  end
98
98
 
99
99
  def matrix(config)
100
- components = COMBINATORS.map do |multiplier|
100
+ matrix = [{}]
101
+ COMBINATORS.each do |multiplier|
101
102
  next unless values = config[multiplier]
102
- Array(values).map { |v| {multiplier => v} }
103
- end.compact
103
+ matrix = Array(values).map { |value| matrix.map { |c| c.merge(multiplier => value) } }.flatten
104
+ end
104
105
 
105
- components = components.inject([{}]) { |all, v| all.product(v).map! { |values| merge_hashes(values) } }
106
106
  if config["matrix"] && config["matrix"]["exclude"]
107
- components -= config.delete("matrix").delete("exclude")
107
+ matrix -= config.delete("matrix").delete("exclude")
108
108
  end
109
- components.map! { |c| config.merge(c) }
109
+ matrix.map! { |c| config.merge(c) }
110
110
  end
111
111
 
112
112
  def truncate(value, number)
@@ -118,14 +118,6 @@ module WWTD
118
118
  end
119
119
  end
120
120
 
121
- def clone(object)
122
- Marshal.load(Marshal.dump(object))
123
- end
124
-
125
- def merge_hashes(array)
126
- array.inject({}) { |all, v| all.merge!(v); all }
127
- end
128
-
129
121
  def run_config(config, lock)
130
122
  if gemfile = config["gemfile"]
131
123
  ENV["BUNDLE_GEMFILE"] = gemfile
@@ -1,3 +1,3 @@
1
1
  module WWTD
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
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.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
@@ -29,7 +29,7 @@ cert_chain:
29
29
  y0kCSWmK6D+x/SbfS6r7Ke07MRqziJdB9GuE1+0cIRuFh8EQ+LN6HXCKM5pon/GU
30
30
  ycwMXfl0
31
31
  -----END CERTIFICATE-----
32
- date: 2013-09-11 00:00:00.000000000 Z
32
+ date: 2013-09-22 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: parallel
metadata.gz.sig CHANGED
Binary file