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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8b5a1a125ffebd2ffbe463e0b9b9615caa7917f
4
- data.tar.gz: f81a653bc6c839f4ca89c27b80fdcddfa363b802
3
+ metadata.gz: 835370114e89442e50a14f939a99b94289dca31f
4
+ data.tar.gz: 387e9e42551da591a55202ef089563da4810da47
5
5
  SHA512:
6
- metadata.gz: 12063d79a8321a8b1672d89ce024353824f67952b4e3a5fd17f62774228f6dede9534c5b6a5709a76e4722db0638a271605302c5be9cb3967ce78351e5be9f71
7
- data.tar.gz: a64a80b6bf0fbf3c309118ffdc02cef7cc6b3890d36f73b216b1aa1ed4c803c56306624ae768f429b490bd3d98937c7af5cc82eaa0cc29d4cd58432fcf89b2fc
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(`#{command}`) : {}
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
@@ -1,3 +1,3 @@
1
1
  module Foreplay
2
- VERSION = '0.13.3'
2
+ VERSION = '0.13.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreplay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto