summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/TWITTER_FEED.md5
-rwxr-xr-xscript/generate_bearer_token2
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md
index 221c334..592cd38 100644
--- a/doc/TWITTER_FEED.md
+++ b/doc/TWITTER_FEED.md
@@ -30,6 +30,11 @@ test:
enabled: false # set to true for usage
twitter_handle: XXXXX #put your twitter handle here
bearer_token: XXXXX #put your bearer token here
+production:
+ twitter:
+ enabled: false # set to true for usage
+ twitter_handle: XXXXX #put your twitter handle here
+ bearer_token: XXXXX #put your bearer token here
```
* To have your bearer token created, run script in terminal being in the file of leap_web: `script/generate_bearer_token`
* To have the script run properly you have to add before running: `--key your_consumerkey --secret your_consumersecret`
diff --git a/script/generate_bearer_token b/script/generate_bearer_token
index 7091a8d..60e4600 100755
--- a/script/generate_bearer_token
+++ b/script/generate_bearer_token
@@ -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)