lib/foreplay/engine/secrets/location.rb in foreplay-0.13.4 vs lib/foreplay/engine/secrets/location.rb in foreplay-0.13.5

- old
+ new

@@ -21,12 +21,11 @@ @secrets when String log "Unexpected secrets found: #{@secrets}" @secrets = {} else - log 'No secrets found' - url ? log("Looked in #{url}") : log('No url found') + url ? log("No secrets found at #{url}") : log('No url for secrets found') log("Secrets #{all_secrets.key?(environment) ? 'has a' : 'has no'} key #{environment}") if all_secrets @secrets = {} end end @@ -39,14 +38,10 @@ log "#{e.class}: #{e.message}".red @all_secrets = {} end def raw_secrets - return @raw_secrets if @raw_secrets - @raw_secrets = `#{command}` - log command - log @raw_secrets - @raw_secrets + @raw_secrets ||= `#{command}` end def command @command ||= "curl -k -L#{header_string} #{url}".fake_erb end