config_layers 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/build/build_with_proxy.sh +1 -1
- data/lib/config_layers/version.rb +2 -2
- data/lib/prc_core_config.rb +27 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 364d951dd8dc3c6f7557c9a44e208d896d93c9eb
|
4
|
+
data.tar.gz: e8b76b78acd844fce6663a8788549b81da7c2375
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f17cdc93399501294cc430acf13924d0afdd76227a41ea312d64f204624559e33fb2b72fb1fb89f9877dd0174d550c47734ce7091291ca74a7143a2c51d4e9c
|
7
|
+
data.tar.gz: e14c9db65a2655c9064fb9ba430818e9a028e7339fb49ca754d968fee0f8e3b28c111ba2c714aa6660b7e8d3cf30572f98bb6bf6a8ac367149cecdc81b450cd4
|
data/build/build_with_proxy.sh
CHANGED
data/lib/prc_core_config.rb
CHANGED
@@ -1228,6 +1228,33 @@ module PRC
|
|
1228
1228
|
data
|
1229
1229
|
end
|
1230
1230
|
|
1231
|
+
# Function to loop in existing data in a mere view of data.
|
1232
|
+
#
|
1233
|
+
# merge can return data only if at least one key value accross layers
|
1234
|
+
# are of type Hash or Array.
|
1235
|
+
# * *Args*
|
1236
|
+
# - +options+ : Hash of how to get the data
|
1237
|
+
# - +:name+ : layer to get data.
|
1238
|
+
# - +:index+ : layer index to get data.
|
1239
|
+
# If neither :name[s] or :index[es] is set, each will use all
|
1240
|
+
# layers
|
1241
|
+
# - +:data_opts+ : Array or Hash. Define data options per layer.
|
1242
|
+
#
|
1243
|
+
def each(options)
|
1244
|
+
parameters = _nameindex_common_options_get(options)
|
1245
|
+
return nil if parameters.nil?
|
1246
|
+
|
1247
|
+
config_layers, = parameters[0]
|
1248
|
+
|
1249
|
+
return nil unless block_given?
|
1250
|
+
|
1251
|
+
config_layers.each do |layer|
|
1252
|
+
layer[:config].data.each do |k, v|
|
1253
|
+
yield(k, v)
|
1254
|
+
end
|
1255
|
+
end
|
1256
|
+
end
|
1257
|
+
|
1231
1258
|
include PRC::CoreConfigRubySpec::Public
|
1232
1259
|
|
1233
1260
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_layers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christophe Larsonneur
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: subhash
|