foreplay 0.13.3 → 0.13.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreplay/engine/secrets/location.rb +9 -2
- data/lib/foreplay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 835370114e89442e50a14f939a99b94289dca31f
|
4
|
+
data.tar.gz: 387e9e42551da591a55202ef089563da4810da47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be81e9201606808b424bb99522987a42c1ef6c0be3d8a7b669c7cd24782579179380770dce01651dbfd4a4aaf8cc0b61d61a24d463bcab7031dc19e88699179a
|
7
|
+
data.tar.gz: 86e5b0ddc11eb62e398d5809499d9ba9bc6f3431ed92e6ab87c33eb36d75e3f3e3219a0c9fc3ec0d75b3d25a2243fd261f6c77a2c003adcb9a790c534b579f34
|
@@ -26,7 +26,6 @@ module Foreplay
|
|
26
26
|
log 'No secrets found'
|
27
27
|
url ? log("Looked in #{url}") : log('No url found')
|
28
28
|
log("Secrets #{all_secrets.key?(environment) ? 'has a' : 'has no'} key #{environment}") if all_secrets
|
29
|
-
log all_secrets.inspect if all_secrets
|
30
29
|
@secrets = {}
|
31
30
|
end
|
32
31
|
end
|
@@ -34,13 +33,21 @@ module Foreplay
|
|
34
33
|
def all_secrets
|
35
34
|
return @all_secrets if @all_secrets
|
36
35
|
|
37
|
-
@all_secrets = url ? YAML.load(
|
36
|
+
@all_secrets = url ? YAML.load(raw_secrets) : {}
|
38
37
|
rescue Psych::SyntaxError => e
|
39
38
|
log "Exception caught when loading secrets from this location: #{url}"
|
40
39
|
log "#{e.class}: #{e.message}".red
|
41
40
|
@all_secrets = {}
|
42
41
|
end
|
43
42
|
|
43
|
+
def raw_secrets
|
44
|
+
return @raw_secrets if @raw_secrets
|
45
|
+
@raw_secrets = `#{command}`
|
46
|
+
log command
|
47
|
+
log @raw_secrets
|
48
|
+
@raw_secrets
|
49
|
+
end
|
50
|
+
|
44
51
|
def command
|
45
52
|
@command ||= "curl -k -L#{header_string} #{url}".fake_erb
|
46
53
|
end
|
data/lib/foreplay/version.rb
CHANGED