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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3da78f8745497d0bac247302cb5d78106ade5ff7
4
- data.tar.gz: ca06edbf632fbc9def6e72e88d2b81fbd2b4b8de
3
+ metadata.gz: ca493149bd63da515449929249799fe0981ece1a
4
+ data.tar.gz: 35878f94653960d6208b1597a6f6de22a6f1a600
5
5
  SHA512:
6
- metadata.gz: 98d07e65ce00a14b851143f92f3f1f1b98348ebf373320117b57f345ad47b84974e8a9bf220f1d10b7dc702ef69d4f1f2b71e5fb51f5267f4f9c4edadbcc1529
7
- data.tar.gz: 9b847dadff771541a80e1db777c4b8830371e3dceefbbcacf8e1edc9d2798a4238337a47ae2ef12b1898e5a872c43932380f26dc67d0646da79569b48fd27293
6
+ metadata.gz: 6eaba9b4f1768f8f356b70c8f1bcaf03bfe0352ab6f222810b2d0112febf2e73d967441db1ca8ae19ad38b5d1258f849279fbaa5c76869f2cddac8928b2dcaf1
7
+ data.tar.gz: 3a7064f49de9681177d03ac66e3d35bd8124f9499675da1205ae363c447d529ab390594ca4f84294ec9fc4d0140a11554cffff400cbccd03e99eea3575a25617
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 0.2.0 / 2016-08-22
2
+
3
+ * Semi-breaking changes
4
+
5
+ * Don't blow up if env var in Secretfile is missing, just STDERR it
6
+
1
7
  0.1.0 / 2016-05-04
2
8
 
3
9
  * Breaking changes
@@ -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
- ENV.fetch($1 || $2)
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
@@ -1,3 +1,3 @@
1
1
  module SecretGarden
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  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.1.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-05-05 00:00:00.000000000 Z
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler