Skip to content
Browse files

Merge branch 'master' of github.com:fatfreecrm/fat_free_crm

  • Loading branch information...
2 parents 933b637 + b19cdbf commit c0f6c32274c573accc500342e09a418343b77ff4 @warp warp committed Apr 3, 2012
Showing with 18 additions and 3 deletions.
  1. +4 −0 Gemfile
  2. +7 −0 Gemfile.lock
  3. +1 −1 Procfile
  4. +4 −0 config/unicorn.rb
  5. +2 −2 lib/plugins/country_select/lib/country_select.rb
View
4 Gemfile
@@ -52,6 +52,10 @@ group :test do
gem 'factory_girl_rails', '~> 1.7.0'
end
+group :heroku do
+ gem 'unicorn', :platform => :ruby
+end
+
# Gems used only for assets and not required
# in production environments by default.
View
7 Gemfile.lock
@@ -112,6 +112,7 @@ GEM
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.6.6)
+ kgio (2.7.4)
libv8 (3.3.10.4)
linecache (0.46)
rbx-require-relative (> 0.0.4)
@@ -160,6 +161,7 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
+ raindrops (0.8.0)
rake (0.9.2.2)
rbx-require-relative (0.0.9)
rdoc (3.12)
@@ -227,6 +229,10 @@ GEM
uglifier (1.2.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
+ unicorn (4.2.0)
+ kgio (~> 2.6)
+ rack
+ raindrops (~> 0.7)
will_paginate (3.0.3)
xpath (0.1.4)
nokogiri (~> 1.3)
@@ -270,4 +276,5 @@ DEPENDENCIES
steak
therubyracer
uglifier (>= 1.0.3)
+ unicorn
will_paginate (~> 3.0.2)
View
2 Procfile
@@ -1 +1 @@
-web: bundle exec unicorn -p $PORT -c config/unicorn.rb
+web: ./bin/unicorn -p $PORT -c config/unicorn.rb
View
4 config/unicorn.rb
@@ -0,0 +1,4 @@
+# http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/
+
+worker_processes 2 # amount of unicorn workers to spin up
+timeout 30 # restarts workers that hang for 30 seconds
View
4 lib/plugins/country_select/lib/country_select.rb
@@ -21,8 +21,8 @@ def country_options_for_select(selected = nil, priority_countries = nil)
country_options += options_for_select(priority_countries, selected)
country_options += "<option value=\"\" disabled=\"disabled\">-------------</option>\n"
- other_countries = COUNTRIES.select{|c| !priority_countries.include?(c[0]) }
- return country_options + options_for_select(other_countries, selected)
+ other_countries = COUNTRIES.select{|c| !priority_countries.include?(c[0]) }
+ return (country_options + options_for_select(other_countries, selected)).html_safe
end
# All the countries included in the country_options output.

0 comments on commit c0f6c32

Please sign in to comment.
Something went wrong with that request. Please try again.