Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

Favor canonical environment variables for secrets
  • Loading branch information...
commit 8b70319c270415e9f99ed8eb1f12dd1caaade1fd 2 parents fe24a38 + b9095ec
@rafaelfranca rafaelfranca authored
View
2  railties/lib/rails/generators/rails/app/templates/config/secrets.yml
@@ -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"] %>
View
4 railties/test/isolation/abstract_unit.rb
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.