secret_garden 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +6 -0
- data/lib/secret_garden/map.rb +8 -1
- data/lib/secret_garden/version.rb +1 -1
- 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: ca493149bd63da515449929249799fe0981ece1a
|
4
|
+
data.tar.gz: 35878f94653960d6208b1597a6f6de22a6f1a600
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eaba9b4f1768f8f356b70c8f1bcaf03bfe0352ab6f222810b2d0112febf2e73d967441db1ca8ae19ad38b5d1258f849279fbaa5c76869f2cddac8928b2dcaf1
|
7
|
+
data.tar.gz: 3a7064f49de9681177d03ac66e3d35bd8124f9499675da1205ae363c447d529ab390594ca4f84294ec9fc4d0140a11554cffff400cbccd03e99eea3575a25617
|
data/CHANGELOG
CHANGED
data/lib/secret_garden/map.rb
CHANGED
@@ -38,10 +38,17 @@ module SecretGarden
|
|
38
38
|
def parse_secret(line)
|
39
39
|
name, path, property = line.scan(/([^\s]+)\s+([^:]+)(:.*)?/).first
|
40
40
|
path.gsub!(/\$(?:([a-zA-Z_][a-zA-Z0-9_]*)|{([a-zA-Z_][a-zA-Z0-9_]*)})/) do
|
41
|
-
|
41
|
+
fetch_env_var($1 || $2)
|
42
42
|
end
|
43
43
|
[name, path, property.to_s[1..-1]]
|
44
44
|
end
|
45
|
+
|
46
|
+
def fetch_env_var(name)
|
47
|
+
unless val = ENV[name]
|
48
|
+
STDERR.puts "WARNING: can't find environment variable #{name} needed in Secretfile"
|
49
|
+
end
|
50
|
+
val
|
51
|
+
end
|
45
52
|
end
|
46
53
|
|
47
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secret_garden
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Kastner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|