Skip to content

POC: Use ENV variables for configuration to allow for upgradability (and heroku support) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source :rubygems
ruby '1.9.3'

# FRAMEWORK
gem 'rails', git: 'git://github.com/rails/rails.git', branch: '3-2-stable'
Expand Down
5 changes: 5 additions & 0 deletions config/initializers/dogfood.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

Squash::Ruby.configure Squash::Configuration.dogfood

Squash::Configuration.authentication.strategy == 'password'
Squash::Configuration.authentication['password'] = {
salt: ENV['SQUASH_AUTHENTICATION_PASSWORD_SALT']
}

# Auto-configure development dogfood

unless defined?(IRB)
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/secret_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
# 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.
Squash::Application.config.secret_token = '_SECRET_'
Squash::Application.config.secret_token = ENV['SQUASH_SECRET_TOKEN']