Permalink
Browse files

Update how we store env variables.

  • Loading branch information...
zackgilbert committed Jul 23, 2018
1 parent 42244f0 commit 2bc3746b5b84b7fee69de9576b73eb9d5de0df28
View
@@ -11,6 +11,11 @@
/db/*.sqlite3
# Ignore all logfiles and tempfiles.
.DS_Store
package-lock.json
/log/*.log.*
/log/*.log
/tmp
/config/app_environment_variables.rb
vendor/.DS_Store
vendor/bundle/
View
@@ -0,0 +1 @@
2.0.0-p648
View
@@ -188,7 +188,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rollbar (2.16.2)
rollbar (2.16.3)
multi_json
rubyzip (1.2.1)
sass (3.2.14)
@@ -204,7 +204,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sshkit (1.16.1)
sshkit (1.17.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
therubyracer (0.12.3)
@@ -221,7 +221,7 @@ GEM
rack-accept (~> 0.4)
tilt (>= 1.4, < 3)
tzinfo (0.3.54)
uglifier (4.1.14)
uglifier (4.1.16)
execjs (>= 0.3.0, < 3)
underscore-rails (1.8.3)
unf (0.1.4)
@@ -275,4 +275,4 @@ DEPENDENCIES
yaml_db
BUNDLED WITH
1.16.2
1.16.3
View
@@ -1,15 +1,15 @@
defaults: &defaults
development:
app_id: "REPLACE_ME"
app_secret: "REPLACE_ME"
callback_url: "http://localhost:3000/session/callback"
aws_key: "REPLACE_ME"
aws_secret: "REPLACE_ME"
cloudwatch_key: "REPLACE_ME"
cloudwatch_secret: "REPLACE_ME"
google_maps_key: "REPLACE_ME"
s3_bucket: "REPLACE_ME"
app_id: "<%= ENV['FOURSQUARE_CLIENT_ID'] %>"
app_secret: "<%= ENV['FOURSQUARE_CLIENT_SECRET'] %>"
callback_url: "<%= ENV['OAUTH_CALLBACK'] %>"
aws_key: "<%= ENV['AWS_KEY'] %>"
aws_secret: "<%= ENV['AWS_SECRET'] %>"
cloudwatch_key: "<%= ENV['CLOUDWATCH_KEY'] %>"
cloudwatch_secret: "<%= ENV['CLOUDWATCH_SECRET'] %>"
google_maps_key: "<%= ENV['GOOGLE_MAPS_KEY'] %>"
s3_bucket: "<%= ENV['AWS_S3_BUCKET'] %>"
test:
View
@@ -4,11 +4,11 @@
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: mysql2
database: REPLACE_ME
username: REPLACE_ME
password: REPLACE_ME
host: localhost
adapter: "<%= ENV['DB_ADAPTER'] %>"
database: "<%= ENV['DB_DATABASE'] %>"
username: "<%= ENV['DB_USERNAME'] %>"
password: "<%= ENV['DB_PASSWORD'] %>"
host: "<%= ENV['DB_HOST'] %>"
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
@@ -23,10 +23,10 @@ production:
adapter: mysql2
database: REPLACE_ME
username: REPLACE_ME
password: REPLACE_ME
password: REPLACE_ME
host: localhost
beta:
beta:
adapter: mysql2
database: REPLACE_ME
username: REPLACE_ME
View
@@ -1,5 +1,10 @@
# Load the rails application
require File.expand_path('../application', __FILE__)
# Load the app's custom environment variables here, so that they are loaded before environments/*.rb
# via https://stackoverflow.com/questions/4911607/is-it-possible-to-set-env-variables-for-rails-development-environment-in-my-code/11765775#11765775
app_environment_variables = File.join(Rails.root, 'config', 'app_environment_variables.rb')
load(app_environment_variables) if File.exists?(app_environment_variables)
# Initialize the rails application
Foursweep::Application.initialize!
@@ -0,0 +1,5 @@
require 'active_record/connection_adapters/mysql2_adapter'
class ActiveRecord::ConnectionAdapters::Mysql2Adapter
NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
end
@@ -2,7 +2,7 @@
Rollbar.configure do |config|
config.enabled = false
config.access_token = 'REPLACE_ME'
config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']
config.exception_level_filters.merge!('ActionController::RoutingError' => 'ignore')
config.dj_threshold = 5
@@ -4,4 +4,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.
Foursweep::Application.config.secret_token = 'REPLACE_ME'
Foursweep::Application.config.secret_token = ENV['APP_SECRET']

0 comments on commit 2bc3746

Please sign in to comment.