summaryrefslogtreecommitdiff
path: root/script/generate_bearer_token
diff options
context:
space:
mode:
Diffstat (limited to 'script/generate_bearer_token')
-rwxr-xr-xscript/generate_bearer_token6
1 files changed, 4 insertions, 2 deletions
diff --git a/script/generate_bearer_token b/script/generate_bearer_token
index 7091a8d..3a09382 100755
--- a/script/generate_bearer_token
+++ b/script/generate_bearer_token
@@ -55,8 +55,8 @@ if options[:projectroot].nil? then
puts "You didn't tell us the directory to have your secrets-file created or being filled. Feel free to copy/paste your bearer_token:"
puts $bearer_token
else
- if File.exist?("#{options[:projectroot]}/leap_web/config/secrets.yml")
- secrets = YAML.load_file("#{options[:projectroot]}/leap_web/config/secrets.yml")
+ if File.exist?("#{options[:projectroot]}/config/secrets.yml")
+ secrets = YAML.load_file("#{options[:projectroot]}/config/secrets.yml")
else
puts "Please make sure that you created a secrets-file as described in the documentation or have given the correct directory. No secrets-file could be found."
exit
@@ -73,10 +73,12 @@ else
else
secrets["development"]["twitter"]["twitter_handle"] = options[:twitterhandle]
secrets["test"]["twitter"]["twitter_handle"] = options[:twitterhandle]
+ secrets["production"]["twitter"]["twitter_handle"] = options[:twitterhandle]
end
secrets["development"]["twitter"]["bearer_token"] = $bearer_token
secrets["test"]["twitter"]["bearer_token"] = $bearer_token
+ secrets["production"]["twitter"]["twitter_handle"] = $bearer_token
File.open("#{options[:projectroot]}/leap_web/config/secrets.yml", "r+") do |file|
file.write(secrets.to_yaml)