diff --git a/.gitignore b/.gitignore index ec3d0956..dd12009a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,7 @@ rerun.txt pickle-email-*.html # Secrets -config/initializers/secret_token.rb +config/secrets.yml ## Environment normalisation: /.bundle diff --git a/config/application.rb b/config/application.rb index 0d7f97e0..191e73d3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -15,9 +15,6 @@ class Application < Rails::Application # Fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = true - # Heroku: prevent app from starting up during precompilation... - config.assets.initialize_on_precompile = false - # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb new file mode 100644 index 00000000..38b95d48 --- /dev/null +++ b/config/initializers/secret_token.rb @@ -0,0 +1,5 @@ +Rails.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_KEY_BASE'] +end diff --git a/config/secrets.yml b/config/secrets.yml deleted file mode 100644 index ce4be6ea..00000000 --- a/config/secrets.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Rake Secrets: -# DEV ENV key is now constant for easier development. -# TEST ENV key is a unique key stored for Travis CI testing. -# Production Key is a unique key stored on Heroku configs. - -development: - secret_key_base: e08f02eccd8de8db74210ca17fc952cb4900be29f87551884dc5d6b4db47e8777ccb047d6725e8aa0ab9d787ed2cf35c168589c54f4569c45d4db6d0bc5efc4f - -test: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> - -production: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>