diff options
author | azul <azul@riseup.net> | 2017-03-22 09:46:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-22 09:46:19 +0100 |
commit | 7e266166914d29c32ad6c73852e5e07916e6ecf2 (patch) | |
tree | 9b1857e7d31ec0e22afc838638f79c3fff2e52d4 /script | |
parent | 84be2700a09808ccae4a3f68a8586ce9aa74066c (diff) | |
parent | 65846b33469278f0accbf7ea7f3d614f234b5b18 (diff) |
Merge pull request #242 from LoadToCode/develop
bugfixing for generating token script
Diffstat (limited to 'script')
-rwxr-xr-x | script/generate_bearer_token | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/script/generate_bearer_token b/script/generate_bearer_token index 3a09382..7614f37 100755 --- a/script/generate_bearer_token +++ b/script/generate_bearer_token @@ -60,10 +60,6 @@ else 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 - # secrets_content = {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}} - # secrets = {"development"=> secrets_content, "test"=>secrets_content} - # secrets = {"development"=> {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}, "test"=>{"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}} - # File.new("#{options[:projectroot]}/leap_web/config/secrets.yml", "w") end if options[:twitterhandle].nil? then @@ -78,9 +74,9 @@ else secrets["development"]["twitter"]["bearer_token"] = $bearer_token secrets["test"]["twitter"]["bearer_token"] = $bearer_token - secrets["production"]["twitter"]["twitter_handle"] = $bearer_token + secrets["production"]["twitter"]["bearer_token"] = $bearer_token - File.open("#{options[:projectroot]}/leap_web/config/secrets.yml", "r+") do |file| + File.open("#{options[:projectroot]}/config/secrets.yml", "r+") do |file| file.write(secrets.to_yaml) end end |