erb-hiera 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/example/config.yaml +6 -4
- data/example/hiera.yaml +0 -3
- data/example/output/dev/template.txt +2 -2
- data/example/output/stage/template.txt +2 -2
- data/lib/erb-hiera/version.rb +1 -1
- data/lib/erb-hiera.rb +7 -3
- 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: 72323e397c958defd855c4f6cd90b17167f99170
|
4
|
+
data.tar.gz: b24f7a28b719ba44c6184958ebb04689aabba37a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9740b36ac7b38b5e82fe316912f74e3095cb25bed182a9e032bf09c7cb06c18fafe800e10055a33b5574b43dc61ad5cce8e08715fdc3fb46e542ab10b310a795
|
7
|
+
data.tar.gz: d0b558df12b27f483bcd241ad753f11560abc8ac1efddabec52c831d4ca5ba783b10af8e66325ffa64f0fef8f1c20282a78f134413a3c5fdda96a3e88bceace8
|
data/example/config.yaml
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
- scope:
|
2
2
|
environment: dev
|
3
|
-
|
4
|
-
|
3
|
+
dir:
|
4
|
+
input: templates
|
5
|
+
output: output/dev
|
5
6
|
|
6
7
|
- scope:
|
7
8
|
environment: stage
|
8
|
-
|
9
|
-
|
9
|
+
dir:
|
10
|
+
input: templates
|
11
|
+
output: output/stage
|
10
12
|
|
data/example/hiera.yaml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
common variable: some common variable
|
2
|
+
environment variable: this is the development environment
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
common variable: some common variable
|
2
|
+
environment variable: this is the staging environment
|
data/lib/erb-hiera/version.rb
CHANGED
data/lib/erb-hiera.rb
CHANGED
@@ -20,11 +20,15 @@ module ErbHiera
|
|
20
20
|
|
21
21
|
mappings.each do |config|
|
22
22
|
ErbHiera.scope = config["scope"]
|
23
|
-
in_dir = config["
|
24
|
-
out_dir = config["
|
23
|
+
in_dir = config["dir"]["input"]
|
24
|
+
out_dir = config["dir"]["output"]
|
25
|
+
|
26
|
+
[in_dir, out_dir].each do |dir|
|
27
|
+
raise StandardError, "error: undefined #{dir.split('_')[0]} dir" unless dir
|
28
|
+
end
|
25
29
|
|
26
30
|
manifests(in_dir).each do |manifest|
|
27
|
-
out_file = File.join(out_dir
|
31
|
+
out_file = File.join(out_dir, manifest.gsub(in_dir, ""))
|
28
32
|
|
29
33
|
Manifest.info(manifest, out_file) if options[:verbose]
|
30
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erb-hiera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hiera
|