diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-29 20:06:39 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-29 20:06:39 +0100 |
commit | 23d08c6749eb142b24f22045f643d0591af579ff (patch) | |
tree | b0a9a211e03e77be014ce64659e7674b7419b213 /config | |
parent | 0e8f59c16fcb21301c736ecbc4424cb4c5388c42 (diff) |
Changing the use of config constants to the Rails configuration object
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/ostatus.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config/initializers/ostatus.rb b/config/initializers/ostatus.rb index 624ea9ca0..3cb17c718 100644 --- a/config/initializers/ostatus.rb +++ b/config/initializers/ostatus.rb @@ -1,7 +1,7 @@ -LOCAL_DOMAIN = ENV['LOCAL_DOMAIN'] || 'localhost' -HUB_URL = ENV['HUB_URL'] || 'https://pubsubhubbub.superfeedr.com' -CANONICAL_PROTOCOL = ENV['LOCAL_HTTPS'] == 'true' ? 'https://' : 'http://' - Rails.application.configure do - config.action_mailer.default_url_options = { host: LOCAL_DOMAIN, protocol: CANONICAL_PROTOCOL } + config.x.local_domain = ENV['LOCAL_DOMAIN'] || 'localhost' + config.x.hub_url = ENV['HUB_URL'] || 'https://pubsubhubbub.superfeedr.com' + config.x.use_https = ENV['LOCAL_HTTPS'] == 'true' + + config.action_mailer.default_url_options = { host: config.x.local_domain, protocol: config.x.use_https ? 'https://' : 'http://' } end |