diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-25 11:16:20 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-25 11:16:20 -0400 |
commit | 0f0974ffdffcd98665f7e36293813e68e0668bcf (patch) | |
tree | b9444b082d370fb1110c9e64832f475862d62ab2 /config | |
parent | 63a665823b8f05bf0b3a9acf9b18cc01252951fb (diff) |
Use Figaro for configuration
Diffstat (limited to 'config')
-rw-r--r-- | config/application.example.yml | 3 | ||||
-rw-r--r-- | config/initializers/secret_token.rb | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/config/application.example.yml b/config/application.example.yml new file mode 100644 index 0000000..a98b40e --- /dev/null +++ b/config/application.example.yml @@ -0,0 +1,3 @@ +SECRET_TOKEN: 'cc884af613d0dd093f1d6c9153abac1200c5a0db923613245b80c5c3f5e9c9f9ba51712b702f2d494a22ddea8ab40601b38a41eb39eec97b50a7a2e37748b1bc' +RIOT_API_KEY: 'ad539f86-22fd-474d-9279-79a7a296ac38' +RIOT_API_REGION: 'na' diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 604d43d..fbab4b9 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -9,4 +9,8 @@ # Make sure your secret_key_base is kept private # if you're sharing your code publicly. -Leaguer::Application.config.secret_key_base = 'cc884af613d0dd093f1d6c9153abac1200c5a0db923613245b80c5c3f5e9c9f9ba51712b702f2d494a22ddea8ab40601b38a41eb39eec97b50a7a2e37748b1bc' +Leaguer::Application.config.secret_key_base = if Rails.env.development? or Rails.env.test? + ('x' * 30) # meets minimum requirement of 30 chars long +else + ENV['SECRET_TOKEN'] +end |