build-environment 1.12.0 → 1.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/build/environment/constructor.rb +7 -11
- data/lib/build/environment/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c59a041f9e185733886e13a24f4e434369a5e6a88d4203454cd2132e4adcc433
|
4
|
+
data.tar.gz: 8114f0fb6b0810ea9211d1d4c2644340fd6e1d048f7feefe2187984f1af49532
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f529b8c0a93eca654f45079fa54785a7d7bedd50dff9c04257b430bee65b3ce122fa0fe2db18a691d81ec95275fc083e21171534be1e9943a261035324736275
|
7
|
+
data.tar.gz: 34f5d39bec20b91d6ef7204420fad4ff4ab74cb85ed4e70fa8a34cec64e695b908b8fd78cdbe5147e2e7f106a32ecf7bbb9dcbed5c9be8281b318f151bcdc446
|
@@ -125,17 +125,15 @@ module Build
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
+
# Flatten the list of environments.
|
128
129
|
def self.combine(*environments)
|
129
|
-
|
130
|
-
environments = environments.collect do |environment|
|
131
|
-
if Environment === environment
|
132
|
-
environment.to_a
|
133
|
-
else
|
134
|
-
environment
|
135
|
-
end
|
136
|
-
end.flatten
|
130
|
+
ordered = []
|
137
131
|
|
138
|
-
environments.
|
132
|
+
environments.each do |environment|
|
133
|
+
environment.flatten_to_array(ordered)
|
134
|
+
end
|
135
|
+
|
136
|
+
ordered.inject(nil) do |parent, environment|
|
139
137
|
environment.dup(parent: parent)
|
140
138
|
end
|
141
139
|
end
|
@@ -153,8 +151,6 @@ module Build
|
|
153
151
|
return flat
|
154
152
|
end
|
155
153
|
|
156
|
-
protected
|
157
|
-
|
158
154
|
def flatten_to_array(array)
|
159
155
|
if @parent
|
160
156
|
@parent.flatten_to_array(array)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-environment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
4
|
+
version: 1.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: covered
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
|
-
rubygems_version: 3.0.
|
120
|
+
rubygems_version: 3.0.4
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: A nested hash data structure for controlling build environments.
|