Permalink
Browse files

Add a .env sample for a local foreman, add a unicorn config, and upgr…

…ade rails to 4.0.3
  • Loading branch information...
1 parent 6326ce2 commit 86d24244384e5e071782d07a6f361c0a7d0ae7d0 @reconbot reconbot committed Mar 3, 2014
Showing with 78 additions and 57 deletions.
  1. +1 −0 .gitignore
  2. +4 −4 Gemfile
  3. +46 −53 Gemfile.lock
  4. +25 −0 config/unicorn.rb
  5. +2 −0 env.sample
View
@@ -16,3 +16,4 @@
/tmp
.ruby-version
.DS_Store
+.env
View
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
ruby "2.0.0"
-gem 'rails', '4.0.0'
+gem 'rails', '4.0.3'
group :development do
gem "pry-rails"
@@ -13,11 +13,11 @@ group :production do
gem 'rails_12factor'
end
-gem 'sass-rails', '~> 4.0.0'
-gem 'bootstrap-sass', github: 'thomas-mcdonald/bootstrap-sass', branch: '3'
+gem 'sass-rails'
+gem 'bootstrap-sass'
gem "font-awesome-rails"
gem 'uglifier', '>= 1.3.0'
-gem 'coffee-rails', '~> 4.0.0'
+gem 'coffee-rails'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
View
@@ -1,12 +1,4 @@
GIT
- remote: git://github.com/thomas-mcdonald/bootstrap-sass.git
- revision: f4294bfd0218a181a3c288dba7cb9811a99b9f83
- branch: 3
- specs:
- bootstrap-sass (3.0.0.0)
- sass (~> 3.2)
-
-GIT
remote: https://github.com/mongoid/mongoid.git
revision: 5d8397e24b673724f4b70ca2923a62bfe20e6e79
specs:
@@ -19,57 +11,58 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.0.0)
- actionpack (= 4.0.0)
- mail (~> 2.5.3)
- actionpack (4.0.0)
- activesupport (= 4.0.0)
+ actionmailer (4.0.3)
+ actionpack (= 4.0.3)
+ mail (~> 2.5.4)
+ actionpack (4.0.3)
+ activesupport (= 4.0.3)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
- activemodel (4.0.0)
- activesupport (= 4.0.0)
+ activemodel (4.0.3)
+ activesupport (= 4.0.3)
builder (~> 3.1.0)
- activerecord (4.0.0)
- activemodel (= 4.0.0)
+ activerecord (4.0.3)
+ activemodel (= 4.0.3)
activerecord-deprecated_finders (~> 1.0.2)
- activesupport (= 4.0.0)
+ activesupport (= 4.0.3)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
- activesupport (4.0.0)
+ activesupport (4.0.3)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
- arel (4.0.0)
- atomic (1.1.10)
+ arel (4.0.2)
+ atomic (1.1.15)
better_errors (0.9.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
+ bootstrap-sass (3.1.1.0)
+ sass (~> 3.2)
builder (3.1.4)
coderay (1.0.9)
- coffee-rails (4.0.0)
+ coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
- railties (>= 4.0.0.beta, < 5.0)
+ railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
- coffee-script-source (1.6.3)
+ coffee-script-source (1.7.0)
debug_inspector (0.0.2)
erubis (2.7.0)
- execjs (1.4.0)
- multi_json (~> 1.0)
+ execjs (2.0.2)
figaro (0.6.4)
bundler (~> 1.0)
rails (>= 3, < 5)
font-awesome-rails (3.2.1.2)
railties (>= 3.2, < 5.0)
hike (1.2.3)
- i18n (0.6.4)
+ i18n (0.6.9)
jbuilder (1.4.2)
activesupport (>= 3.0.0)
multi_json (>= 1.2.0)
@@ -81,12 +74,12 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
- mime-types (1.23)
+ mime-types (1.25.1)
minitest (4.7.5)
moped (1.5.0)
- multi_json (1.7.7)
+ multi_json (1.8.4)
origin (1.1.0)
- polyglot (0.3.3)
+ polyglot (0.3.4)
pry (0.9.12.4)
coderay (~> 1.0)
method_source (~> 0.8)
@@ -96,51 +89,51 @@ GEM
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
- rails (4.0.0)
- actionmailer (= 4.0.0)
- actionpack (= 4.0.0)
- activerecord (= 4.0.0)
- activesupport (= 4.0.0)
+ rails (4.0.3)
+ actionmailer (= 4.0.3)
+ actionpack (= 4.0.3)
+ activerecord (= 4.0.3)
+ activesupport (= 4.0.3)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.0.0)
+ railties (= 4.0.3)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.1)
rails_stdout_logging (0.0.1)
- railties (4.0.0)
- actionpack (= 4.0.0)
- activesupport (= 4.0.0)
+ railties (4.0.3)
+ actionpack (= 4.0.3)
+ activesupport (= 4.0.3)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.11.0)
- rake (10.1.0)
- sass (3.2.9)
- sass-rails (4.0.0)
- railties (>= 4.0.0.beta, < 5.0)
+ rake (10.1.1)
+ sass (3.2.14)
+ sass-rails (4.0.1)
+ railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0)
slop (3.4.7)
- sprockets (2.10.0)
+ sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sprockets-rails (2.0.0)
+ sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
thor (0.18.1)
- thread_safe (0.1.0)
- atomic
+ thread_safe (0.2.0)
+ atomic (>= 1.1.7, < 2)
tilt (1.4.1)
- treetop (1.4.14)
+ treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (1.3.0)
coffee-rails
- tzinfo (0.3.37)
+ tzinfo (0.3.38)
uglifier (2.1.2)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
@@ -158,17 +151,17 @@ PLATFORMS
DEPENDENCIES
better_errors
binding_of_caller
- bootstrap-sass!
- coffee-rails (~> 4.0.0)
+ bootstrap-sass
+ coffee-rails
figaro
font-awesome-rails
jbuilder (~> 1.2)
jquery-rails
mongoid!
pry-rails
- rails (= 4.0.0)
+ rails (= 4.0.3)
rails_12factor
- sass-rails (~> 4.0.0)
+ sass-rails
turbolinks
uglifier (>= 1.3.0)
unicorn
View
@@ -0,0 +1,25 @@
+# config/unicorn.rb
+worker_processes 3
+timeout 30
+preload_app true
+
+before_fork do |server, worker|
+
+ Signal.trap 'TERM' do
+ puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
+ Process.kill 'QUIT', Process.pid
+ end
+
+ defined?(ActiveRecord::Base) and
+ ActiveRecord::Base.connection.disconnect!
+end
+
+after_fork do |server, worker|
+
+ Signal.trap 'TERM' do
+ puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT'
+ end
+
+ defined?(ActiveRecord::Base) and
+ ActiveRecord::Base.establish_connection
+end
View
@@ -0,0 +1,2 @@
+PORT=3000
+RACK_ENV=DEVELOPMENT

0 comments on commit 86d2424

Please sign in to comment.