Skip to content

Commit

Permalink
Improve servicability
Browse files Browse the repository at this point in the history
- include work around for JCE security policy
- make sure setup and configuration defaults to production
  • Loading branch information
talbright committed Dec 23, 2013
1 parent 53c2b45 commit 9947da2
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env
@@ -1,2 +1,2 @@
PORT=3000
RAILS_ENV=development
RAILS_ENV=production
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -29,6 +29,7 @@ gem 'omniauth'
gem 'omniauth-google-oauth2'
gem 'rspec-rails'
gem 'foreman'
gem 'pry'

platforms :jruby do
gem 'activerecord-jdbcmysql-adapter'
Expand Down
20 changes: 20 additions & 0 deletions Gemfile.lock
Expand Up @@ -33,7 +33,9 @@ GEM
ancestry (2.0.0)
activerecord (>= 3.0.0)
arel (4.0.1)
atomic (1.1.14)
atomic (1.1.14-java)
bcrypt-ruby (3.1.2)
bcrypt-ruby (3.1.2-java)
bouncy-castle-java (1.5.0147)
broach (0.3.0)
Expand All @@ -42,6 +44,7 @@ GEM
builder (3.1.4)
celluloid (0.14.1)
timers (>= 1.0.0)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
Expand All @@ -61,6 +64,10 @@ GEM
execjs (2.0.2)
faraday (0.8.8)
multipart-post (~> 1.2.0)
ffi (1.9.3-java)
foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6)
foreman (0.63.0-java)
dotenv (>= 0.7)
thor (>= 0.13.6)
Expand All @@ -80,12 +87,14 @@ GEM
thor (>= 0.14, < 2.0)
jruby-openssl (0.9.4)
bouncy-castle-java (>= 1.5.0147)
json (1.8.1)
json (1.8.1-java)
jwt (0.1.8)
multi_json (>= 1.5)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.2)
Expand All @@ -111,6 +120,11 @@ GEM
polyglot (0.3.3)
protected_attributes (1.0.5)
activemodel (>= 4.0.1, < 5.0)
pry (0.9.12.4-java)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
spoon (~> 0.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
Expand Down Expand Up @@ -159,6 +173,9 @@ GEM
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
slop (3.4.7)
spoon (0.0.4)
ffi
sprockets (2.10.1)
hike (~> 1.2)
multi_json (~> 1.0)
Expand All @@ -173,6 +190,8 @@ GEM
therubyrhino_jar (>= 1.7.3)
therubyrhino_jar (1.7.4)
thor (0.18.1)
thread_safe (0.1.3)
atomic
thread_safe (0.1.3-java)
atomic
tilt (1.4.1)
Expand Down Expand Up @@ -201,6 +220,7 @@ DEPENDENCIES
jruby-openssl
omniauth
omniauth-google-oauth2
pry
rails (= 4.0.2)
rearview (= 1.0.0.rc4)
rspec-rails
Expand Down
2 changes: 1 addition & 1 deletion Procfile
@@ -1 +1 @@
web: bin/rails server -p $PORT
web: bin/rails server -p $PORT -e $RAILS_ENV
2 changes: 1 addition & 1 deletion bin/setup
Expand Up @@ -22,7 +22,7 @@ setup_sandbox_bundle() {

setup_rails() {
echo "Setting up databases..."
rake db:setup db:seed
bin/rake RAILS_ENV=production db:setup
}

run_install() {
Expand Down
6 changes: 3 additions & 3 deletions config/database.yml
@@ -1,20 +1,20 @@
development:
adapter: mysql
database: rearview_web_development
database: rearview_development
username: root
password:
host: localhost

test:
adapter: mysql
database: rearview_web_test
database: rearview_test
username: root
password:
host: localhost

production:
adapter: mysql
database: rearview_web_development
database: rearview_production
username: root
password:
host: localhost
5 changes: 5 additions & 0 deletions config/initializers/unlimited_strength_cryptography.rb
@@ -0,0 +1,5 @@
# https://github.com/jruby/jruby/wiki/UnlimitedStrengthCrypto
begin
java.lang.Class.for_name('javax.crypto.JceSecurity').get_declared_field('isRestricted').tap{|f| f.accessible = true; f.set nil, false}
rescue
end

0 comments on commit 9947da2

Please sign in to comment.