Skip to content

Commit

Permalink
Merge pull request newrelic#13 from vosechu/rails-32-updates
Browse files Browse the repository at this point in the history
minor upgrades and fixes
  • Loading branch information
tkrajcar committed May 15, 2015
2 parents 85cfbba + 9426f9b commit b895546
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 66 deletions.
14 changes: 12 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
source 'https://rubygems.org'
gem 'rails', '3.2.12'

ruby '2.2.2'

gem 'rails', '~> 3.2.12'
gem 'puma'

group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "bootstrap-sass", ">= 2.3.0.0"
gem "bootstrap-sass", "~> 2.3.0.0"
gem 'nokogiri'
gem 'httparty'
gem 'dalli'
Expand All @@ -15,10 +20,15 @@ gem 'newrelic_rpm', '>=3.6.8'
gem "pg", ">= 0.14.1"

group :production do
gem 'rails_12factor'
end

group :development do
gem 'RedCloth'
end

group :test do
gem 'test-unit'
end

gem 'memcachier'
137 changes: 75 additions & 62 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,121 +2,131 @@ GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
actionmailer (3.2.12)
actionpack (= 3.2.12)
mail (~> 2.4.4)
actionpack (3.2.12)
activemodel (= 3.2.12)
activesupport (= 3.2.12)
actionmailer (3.2.21)
actionpack (= 3.2.21)
mail (~> 2.5.4)
actionpack (3.2.21)
activemodel (= 3.2.21)
activesupport (= 3.2.21)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.12)
activesupport (= 3.2.12)
activemodel (3.2.21)
activesupport (= 3.2.21)
builder (~> 3.0.0)
activerecord (3.2.12)
activemodel (= 3.2.12)
activesupport (= 3.2.12)
activerecord (3.2.21)
activemodel (= 3.2.21)
activesupport (= 3.2.21)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.12)
activemodel (= 3.2.12)
activesupport (= 3.2.12)
activesupport (3.2.12)
i18n (~> 0.6)
activeresource (3.2.21)
activemodel (= 3.2.21)
activesupport (= 3.2.21)
activesupport (3.2.21)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
arel (3.0.2)
bootstrap-sass (2.3.0.0)
arel (3.0.3)
bootstrap-sass (2.3.0.1)
sass (~> 3.2)
builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.4.0)
dalli (2.6.0)
coffee-script-source (1.9.1.1)
dalli (2.7.4)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.1)
httparty (0.10.2)
multi_json (~> 1.0)
execjs (2.5.2)
hike (1.2.3)
httparty (0.13.4)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.6.1)
i18n (0.7.0)
journey (1.0.4)
jquery-rails (2.2.1)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.7)
mail (2.4.4)
i18n (>= 0.4.0)
json (1.8.2)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
memcachier (0.0.2)
mime-types (1.21)
multi_json (1.6.1)
multi_xml (0.5.3)
newrelic_rpm (3.6.8.164)
nokogiri (1.5.6)
pg (0.14.1)
polyglot (0.3.3)
mime-types (1.25.1)
mini_portile (0.6.2)
multi_json (1.11.0)
multi_xml (0.5.5)
newrelic_rpm (3.12.0.288)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
pg (0.18.2)
polyglot (0.3.5)
power_assert (0.2.2)
puma (2.11.2)
rack (>= 1.1, < 2.0)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack-ssl (1.3.4)
rack
rack-test (0.6.2)
rack-test (0.6.3)
rack (>= 1.0)
rails (3.2.12)
actionmailer (= 3.2.12)
actionpack (= 3.2.12)
activerecord (= 3.2.12)
activeresource (= 3.2.12)
activesupport (= 3.2.12)
rails (3.2.21)
actionmailer (= 3.2.21)
actionpack (= 3.2.21)
activerecord (= 3.2.21)
activeresource (= 3.2.21)
activesupport (= 3.2.21)
bundler (~> 1.0)
railties (= 3.2.12)
railties (3.2.12)
actionpack (= 3.2.12)
activesupport (= 3.2.12)
railties (= 3.2.21)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.3)
railties (3.2.21)
actionpack (= 3.2.21)
activesupport (= 3.2.21)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.3)
rdoc (3.12.1)
rake (10.4.2)
rdoc (3.12.2)
json (~> 1.4)
sass (3.2.5)
sass (3.4.13)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
sprockets (2.2.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
test-unit (3.0.8)
power_assert
thor (0.19.1)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
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)

PLATFORMS
ruby

DEPENDENCIES
RedCloth
bootstrap-sass (>= 2.3.0.0)
bootstrap-sass (~> 2.3.0.0)
coffee-rails (~> 3.2.1)
dalli
httparty
Expand All @@ -125,6 +135,9 @@ DEPENDENCIES
newrelic_rpm (>= 3.6.8)
nokogiri
pg (>= 0.14.1)
rails (= 3.2.12)
puma
rails (~> 3.2.12)
rails_12factor
sass-rails (~> 3.2.3)
test-unit
uglifier (>= 1.0.3)
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bundle exec puma -C config/puma.rb
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Step 2
-------
Load the sample DB locally:

rake db:create
bundle exec rake db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U $USER -d newrelic-ruby-kata_development public/sample-data.dump
bundle exec rails s

Step 3
-------
Expand All @@ -24,7 +25,11 @@ First,

Then, you can load the sample data via:

heroku pgbackups:restore DATABASE 'http://newrelic-ruby-kata.herokuapp.com/sample-data.dump'
heroku addons:create heroku-postgresql:hobby-dev
heroku addons:create memcachier
heroku config:set NEW_RELIC_APP_NAME=<NAME>
heroku pg:credentials DATABASE_URL
pg_restore --verbose --clean --no-acl --no-owner -h <HOSTNAME> -U <USER> -d <DATABASE> -p <PORT> --password public/sample-data.dump

Step 4
-------
Expand Down
15 changes: 15 additions & 0 deletions config/puma.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 5)
threads threads_count, threads_count

preload_app!

rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'

on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end

0 comments on commit b895546

Please sign in to comment.