summaryrefslogtreecommitdiff
path: root/script/generate_bearer_token
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-09-26 09:55:37 +0200
committerAzul <azul@riseup.net>2016-09-26 09:55:37 +0200
commit917cddbeb6e3adaf346a7c5784fa9e6d70462e03 (patch)
tree7665d638e722be4b17bad33bdfb446c89966445d /script/generate_bearer_token
parent4a73c2ca2938ae748588d7ca72a785af99724c92 (diff)
parent69b182b1bf811e1d09c734debf0f71f8412dd6b7 (diff)
Merge remote-tracking branch 'pr/239' into develop
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)