Skip to content

Commit

Permalink
read vault server location from env
Browse files Browse the repository at this point in the history
  • Loading branch information
skabbass1 committed Nov 5, 2018
1 parent ecfee12 commit 3a78fc6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/spendthrift/secrets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ module Spendthrift

module Secrets

VAULT_LOCATION = "http://127.0.0.1:8200/v1/secret/"

def self.get_secrets
app = get_secrets_at_path(app_secrets_path)
aws = get_secrets_at_path(aws_secrets_path)
Expand All @@ -26,11 +24,11 @@ def self.get_secrets_at_path(path)
end

def self.aws_secrets_path
"#{VAULT_LOCATION}/aws"
"#{ENV['VAULT_LOCATION']}/aws"
end

def self.app_secrets_path
"#{VAULT_LOCATION}/spendthrift"
"#{ENV['VAULT_LOCATION']}/spendthrift"
end
end
end

0 comments on commit 3a78fc6

Please sign in to comment.