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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 492f25a57714d2d9919a2f2a104b087f4544fd4b4cfbb6add3ab752197214970
4
- data.tar.gz: c0080ffc1303d650ae5fdb6a45fb7e2fd315590c6a341da5e6a006b10ddab71f
3
+ metadata.gz: c59a041f9e185733886e13a24f4e434369a5e6a88d4203454cd2132e4adcc433
4
+ data.tar.gz: 8114f0fb6b0810ea9211d1d4c2644340fd6e1d048f7feefe2187984f1af49532
5
5
  SHA512:
6
- metadata.gz: c6d269df24c6a24c8497ec2639c5f0a66382920cf70b69ff20623d484e6cf9e32b6860a416998a699fb717b1b4a0cf93f667ab9e34701cab22b480a6199c77f2
7
- data.tar.gz: 5c18852270059bf9b6341e84861940ee4fa4161dd25538e122a7eeb209c0e0e697d50b9c5277c84af456fc55b34973b5df0d88fb871817d5b53b849729bd9ad9
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
- # Flatten the list of environments:
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.inject(nil) do |parent, environment|
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)
@@ -1,5 +1,5 @@
1
1
  module Build
2
2
  class Environment
3
- VERSION = "1.12.0"
3
+ VERSION = "1.12.1"
4
4
  end
5
5
  end
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.0
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-09-30 00:00:00.000000000 Z
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.3
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.