improve app infrastructure to make a dev environment easier to reproduce

This commit will require a few changes to the deployment process:
* store AWS credentials in AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env vars
* store OpenNeo Auth credentials in OPENNEO_AUTH_APP, OPENNEO_AUTH_SERVER, and OPENNEO_AUTH_SECRET env vars

STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY are now required, too; better have a good .env.
You can always put in dummy values if you have no credentials, though; they only get called up if there's a transaction.

SECRET_TOKEN is now an env var, too, but the production deploy process currently replaces config/initializers/secret_token.rb anyway; this might be the way to go later, though.
This commit is contained in:
Matchu 2015-07-16 17:44:52 -04:00
parent e9449b70f2
commit 0d6caceb24
112 changed files with 103 additions and 101 deletions

View file

@ -1,25 +1,25 @@
GIT
remote: git://github.com/eventmachine/eventmachine.git
revision: c520f9de3969f6f39aa5f4439f825a63dd8c0f85
revision: 45db519d1f24a965c0da3751f0850ff3c099d5a2
specs:
eventmachine (1.0.1)
eventmachine (1.0.7)
GIT
remote: git://github.com/iain/http_accept_language.git
revision: 7738e45ba154015597fca749b7d0257861c14a02
revision: 38890b400e3c7bdd348a386f4460632eb42fc7a8
specs:
http_accept_language (2.0.0.pre)
http_accept_language (2.0.5)
GIT
remote: git://github.com/igrigorik/em-http-request.git
revision: 322f2273fa7ea07c1eeb92755bf67f1f05058e54
revision: 2b894a29f112b451195d5be2e72176288c8ded6e
specs:
em-http-request (1.0.3)
addressable (>= 2.2.3)
cookiejar
em-socksify
eventmachine (>= 1.0.0.beta.4)
http_parser.rb (>= 0.5.3)
em-http-request (1.1.2)
addressable (>= 2.3.4)
cookiejar (<= 0.3.0)
em-socksify (>= 0.3)
eventmachine (>= 1.0.3)
http_parser.rb (>= 0.6.0)
GIT
remote: git://github.com/igrigorik/em-mysqlplus.git
@ -30,9 +30,9 @@ GIT
GIT
remote: git://github.com/igrigorik/em-synchrony.git
revision: 44c3cea84baf13a29f03ddb15c5040ec7703506f
revision: ab7db1c1e7b67a132d742ee640224055c97bba6e
specs:
em-synchrony (1.0.3)
em-synchrony (1.0.4)
eventmachine (>= 1.0.0.beta.1)
GIT
@ -62,9 +62,9 @@ GIT
GIT
remote: git://github.com/oldmoe/mysqlplus.git
revision: f07936d2eb9b0893994ed99fe82267b5e7770d06
revision: 354837499c0c83ddc7dcc0decff2056e36ed4403
specs:
mysqlplus (0.1.1)
mysqlplus (0.1.3)
GIT
remote: git://github.com/rubyamf/rocketamf.git
@ -74,11 +74,10 @@ GIT
GIT
remote: https://github.com/stripe/stripe-ruby
revision: 2c6f4caa99916c33d3f9af57f66422ff5ea913cf
revision: 8c6dc1a838db0d39d9083431f6a4a8287f25d814
specs:
stripe (1.15.0)
stripe (1.23.0)
json (~> 1.8.1)
mime-types (>= 1.25, < 3.0)
rest-client (~> 1.4)
GEM
@ -111,45 +110,44 @@ GEM
activesupport (3.2.18)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.3.5)
airbrake (3.1.8)
activesupport
addressable (2.3.8)
airbrake (3.1.17)
builder
json
multi_json
arel (3.0.3)
bcrypt-ruby (3.0.1)
bcrypt (3.1.10)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
builder (3.0.4)
carrierwave (0.8.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
character-encodings (0.4.1)
chronic (0.6.7)
chunky_png (1.2.7)
compass (0.12.2)
chunky_png (1.3.4)
compass (0.12.7)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
sass (~> 3.2.19)
compass-rails (1.0.3)
compass (>= 0.12.2, < 0.14)
cookiejar (0.3.0)
devise (2.2.3)
devise (2.2.8)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
diff-lcs (1.2.1)
dotenv (0.11.1)
dotenv-deployment (~> 0.0.2)
diff-lcs (1.2.5)
dotenv (2.0.1)
dotenv-deployment (0.0.2)
dotenv-rails (0.11.1)
dotenv (= 0.11.1)
dotenv-rails (2.0.1)
dotenv (= 2.0.1)
dye (0.1.4)
em-socksify (0.2.1)
em-socksify (0.3.0)
eventmachine (>= 1.0.0.beta.4)
erubis (2.7.0)
excon (0.19.3)
execjs (1.4.0)
multi_json (~> 1.0)
excon (0.45.4)
execjs (2.5.2)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
@ -165,59 +163,59 @@ GEM
net-ssh (>= 2.1.3)
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.4)
formatador (0.2.5)
fssm (0.2.10)
haml (4.0.0)
haml (4.0.6)
tilt
hike (1.2.3)
http_parser.rb (0.5.3)
i18n (0.6.9)
http_parser.rb (0.6.0)
i18n (0.7.0)
journey (1.0.4)
json (1.8.1)
launchy (2.4.2)
json (1.8.3)
launchy (2.4.3)
addressable (~> 2.3)
letter_opener (1.2.0)
letter_opener (1.4.1)
launchy (~> 2.2)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
memcache-client (1.8.5)
mime-types (1.25.1)
mini_magick (3.5.0)
mini_magick (3.8.1)
subexec (~> 0.2.1)
msgpack (0.5.3)
msgpack (0.5.12)
multi_json (1.3.7)
mysql2 (0.3.11)
mysql2 (0.3.18)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.6.6)
newrelic_rpm (3.5.8.70)
nokogiri (1.5.6)
net-ssh (2.9.2)
newrelic_rpm (3.12.1.298)
nokogiri (1.5.11)
openneo-auth-signatory (0.1.0)
ruby-hmac
orm_adapter (0.4.0)
paper_trail (2.7.1)
orm_adapter (0.5.0)
paper_trail (2.7.2)
activerecord (~> 3.0)
railties (~> 3.0)
parallel (0.5.21)
passenger_monit (0.1.1)
patron (0.4.18)
polyglot (0.3.4)
patron (0.4.20)
polyglot (0.3.5)
progressbar (0.11.0)
prompter (0.1.6)
dye (>= 0.1.1)
yard (>= 0.6.3)
rack (1.4.5)
rack-attack (2.2.0)
rack (1.4.7)
rack-attack (2.2.1)
rack
rack-cache (1.2)
rack (>= 0.4)
rack-fiber_pool (0.9.2)
rack-protection (1.4.0)
rack-fiber_pool (0.9.3)
rack-protection (1.5.3)
rack
rack-ssl (1.3.4)
rack
rack-test (0.6.2)
rack-test (0.6.3)
rack (>= 1.0)
rails (3.2.18)
actionmailer (= 3.2.18)
@ -227,8 +225,9 @@ GEM
activesupport (= 3.2.18)
bundler (~> 1.0)
railties (= 3.2.18)
rails-i18n (0.7.2)
rails-i18n (3.0.1)
i18n (~> 0.5)
rails (>= 3.0.0, < 4.0.0)
railties (3.2.18)
actionpack (= 3.2.18)
activesupport (= 3.2.18)
@ -236,7 +235,7 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.3.1)
rake (10.4.2)
rdiscount (1.6.8)
rdoc (3.12.2)
json (~> 1.4)
@ -245,10 +244,10 @@ GEM
rails (>= 3.1)
react-source (= 0.8.0)
react-source (0.8.0)
redis (3.0.3)
redis-namespace (1.2.1)
redis (~> 3.0.0)
resque (1.23.0)
redis (3.2.1)
redis-namespace (1.5.2)
redis (~> 3.0, >= 3.0.4)
resque (1.23.1)
multi_json (~> 1.0)
redis-namespace (~> 1.0)
sinatra (>= 0.9.2)
@ -256,15 +255,15 @@ GEM
resque-retry (0.1.0)
resque (>= 1.8.0)
resque-scheduler (>= 1.8.0)
resque-scheduler (2.0.0)
resque-scheduler (2.0.1)
redis (>= 2.0.1)
resque (>= 1.20.0)
rufus-scheduler
rest-client (1.6.7)
mime-types (>= 1.16)
rest-client (1.6.9)
mime-types (~> 1.16)
right_aws (2.1.0)
right_http_connection (>= 1.2.5)
right_http_connection (1.3.0)
right_http_connection (1.5.0)
rspec (2.0.1)
rspec-core (~> 2.0.1)
rspec-expectations (~> 2.0.1)
@ -278,44 +277,43 @@ GEM
rspec-rails (2.0.1)
rspec (~> 2.0.0)
ruby-hmac (0.4.0)
rufus-scheduler (2.0.17)
tzinfo (>= 0.3.23)
sanitize (2.0.3)
nokogiri (>= 1.4.4, < 1.6)
sass (3.2.6)
rufus-scheduler (3.1.3)
sanitize (2.0.6)
nokogiri (>= 1.4.4)
sass (3.2.19)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sinatra (1.3.3)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
sprockets (2.2.2)
sinatra (1.4.6)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sprockets (2.2.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
subexec (0.2.2)
subexec (0.2.3)
swf_converter (0.0.3)
thor (0.19.1)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.39)
uglifier (1.3.0)
tzinfo (0.3.44)
uglifier (2.7.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
json (>= 1.8.0)
vegas (0.1.11)
rack (>= 1.0.0)
warden (1.2.1)
warden (1.2.3)
rack (>= 1.0)
whenever (0.7.3)
activesupport (>= 2.3.4)
chronic (~> 0.6.3)
will_paginate (3.0.4)
yard (0.8.7.3)
will_paginate (3.0.7)
yard (0.8.7.6)
PLATFORMS
ruby
@ -373,3 +371,6 @@ DEPENDENCIES
uglifier (>= 1.0.3)
whenever (~> 0.7.3)
will_paginate (~> 3.0.pre2)
BUNDLED WITH
1.10.5

View file

@ -1,3 +0,0 @@
access_key_id: ACCESS_KEY_ID
secret_access_key: SECRET_ACCESS_KEY

View file

@ -1,8 +1,13 @@
require 'yaml'
access_key_id = ENV.fetch('AWS_ACCESS_KEY_ID')
secret_access_key = ENV.fetch('AWS_SECRET_ACCESS_KEY')
config = YAML.load_file Rails.root.join('config', 'aws_s3.yml')
access_key_id = config.delete 'access_key_id'
secret_access_key = config.delete 'secret_access_key'
def set(params, params_key, env_key)
params[params_key] = ENV[env_key] if ENV.has_key?(env_key)
end
IMPRESS_S3 = RightAws::S3.new access_key_id, secret_access_key, config
params = {}
set params, :server, 'AWS_SERVER_HOST'
set params, :port, 'AWS_SERVER_PORT'
set params, :protocol, 'AWS_SERVER_PROTOCOL'
IMPRESS_S3 = RightAws::S3.new access_key_id, secret_access_key, params

View file

@ -1,10 +1,9 @@
require 'openneo-auth'
require 'yaml'
Openneo::Auth.configure do |config|
YAML.load_file(Rails.root.join('config', 'openneo_auth.yml'))[Rails.env].each do |key, value|
config.send("#{key}=", value)
end
config.app = ENV.fetch('OPENNEO_AUTH_APP')
config.auth_server = ENV.fetch('OPENNEO_AUTH_SERVER')
config.secret = ENV.fetch('OPENNEO_AUTH_SECRET')
config.remote_auth_user_finder do |user_data|
User.find_or_create_from_remote_auth_data(user_data)

View file

@ -1,6 +1,6 @@
Rails.configuration.stripe = {
:publishable_key => ENV['STRIPE_PUBLISHABLE_KEY'],
:secret_key => ENV['STRIPE_SECRET_KEY']
:publishable_key => ENV.fetch('STRIPE_PUBLISHABLE_KEY'),
:secret_key => ENV.fetch('STRIPE_SECRET_KEY')
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]

Binary file not shown.

BIN
vendor/cache/addressable-2.3.8.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/airbrake-3.1.17.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/bcrypt-3.1.10.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/bcrypt-ruby-3.1.5.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/chunky_png-1.3.4.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/compass-0.12.7.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/devise-2.2.8.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/diff-lcs-1.2.5.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/dotenv-2.0.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/dotenv-rails-2.0.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/em-socksify-0.3.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/excon-0.45.4.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/execjs-2.5.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/formatador-0.2.5.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/haml-4.0.6.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/http_parser.rb-0.6.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/i18n-0.7.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/json-1.8.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/launchy-2.4.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/letter_opener-1.4.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/mini_magick-3.8.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/msgpack-0.5.12.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/mysql2-0.3.18.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/net-ssh-2.9.2.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/newrelic_rpm-3.12.1.298.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/nokogiri-1.5.11.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/orm_adapter-0.5.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/paper_trail-2.7.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/patron-0.4.20.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/polyglot-0.3.5.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-1.4.7.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-attack-2.2.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-fiber_pool-0.9.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-protection-1.5.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-test-0.6.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rails-i18n-3.0.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rake-10.4.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/redis-3.2.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/redis-namespace-1.5.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/resque-1.23.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/resque-scheduler-2.0.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rest-client-1.6.9.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rufus-scheduler-3.1.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/sanitize-2.0.6.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/sass-3.2.19.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/sinatra-1.4.6.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/sprockets-2.2.3.gem vendored Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more