summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorthea <ta.kupler@gmail.com>2016-09-23 16:08:27 +0200
committerthea <ta.kupler@gmail.com>2016-09-23 16:08:27 +0200
commitd18ad52a8bd35c53b5dee5041527f313aa18015a (patch)
tree6426713b247d0ce686c221779e7acb6df3c99df3 /script
parenta5958e51fbf106fa841a7aca444b705600714585 (diff)
parent873ba38715bb0e08f39a1effd64a26e9d05af78b (diff)
merging develop and marie
Diffstat (limited to 'script')
-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)