Add staging and testing environments to secrets.yml if rails >=4.1
Add staging and testing environments to secrets.yml if rails >=4.1
Example(with figaro):
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
development:
secret_key_base: ...
test:
secret_key_base: ...
# Do not keep production secrets in the repository,
# instead read values from the environment.
testing:
url: <%= Figaro.env.secret_key_base! if Rails.env.testing? %>
staging:
url: <%= Figaro.env.secret_key_base! if Rails.env.staging? %>
production:
url: <%= Figaro.env.secret_key_base! if Rails.env.production? %>
Example(without figaro):
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
development:
secret_key_base: 336fe0249b77b7e0c18df45b29418ce3368b4b3a2c9ada26935a8024911584762f68a4fd3d0ad680d1d465235e8169b600a688c2129cf5a9c6fa1e99ad0391d9
test:
secret_key_base: a448b208708ac203f5c74a4ba87cff287b1734660405d720ba73ed5267d711af88bab0cb3a1a4a5fdfd39c1338a088b5e1637e08d0fecc0da6d5b840b4abbabc
# Do not keep production secrets in the repository,
# instead read values from the environment.
testing:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
staging:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>