Permalink
Browse files

Merge pull request #13703 from schneems/schneems/rail-secrets-key

Favor canonical environment variables for secrets
  • Loading branch information...
2 parents fe24a38 + b9095ec commit 8b70319c270415e9f99ed8eb1f12dd1caaade1fd @rafaelfranca rafaelfranca committed Jan 13, 2014
@@ -19,4 +19,4 @@ test:
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
- secret_key_base: <%%= ENV["RAILS_SECRET_KEY_BASE"] %>
+ secret_key_base: <%%= ENV["SECRET_KEY_BASE"] %>
@@ -93,8 +93,8 @@ module Generation
# Build an application by invoking the generator and going through the whole stack.
def build_app(options = {})
@prev_rails_env = ENV['RAILS_ENV']
- ENV['RAILS_ENV'] = 'development'
- ENV['RAILS_SECRET_KEY_BASE'] ||= SecureRandom.hex(16)
+ ENV['RAILS_ENV'] = "development"
+ ENV['SECRET_KEY_BASE'] ||= SecureRandom.hex(16)
FileUtils.rm_rf(app_path)
FileUtils.cp_r(app_template_path, app_path)

0 comments on commit 8b70319

Please sign in to comment.