Permalink
Browse files

Removed hard dependencies from the platform (Unicorn, New Relic, Roll…

…bar and Capistrano). TRAD-37 #time 20m Removed hard dependencies
  • Loading branch information...
1 parent 8cf2089 commit aa427d43e2b4cf457d4a2db6fdb4d9c19a75f597 @Jellyfishboy committed Nov 11, 2014
View
@@ -14,6 +14,7 @@ db/development.sqlite3
doc/*
.yardoc
*.gitkeep
+config/deploy.rb
public/uploads/attachment
public/assets
View
@@ -4,11 +4,6 @@ gem 'rails', '4.1.0'
gem 'pg'
-# Production gems
-group :production do
- gem 'unicorn-worker-killer'
-end
-
# Development gems
group :development do
gem 'better_errors'
@@ -19,8 +14,6 @@ group :development do
# gem 'rack-mini-profiler'
gem 'capistrano', '~> 2.15'
gem 'bullet'
- gem 'metric_fu'
- gem 'capistrano-unicorn', :require => false, :platforms => :ruby
gem 'thin'
gem 'colorize'
end
@@ -35,16 +28,12 @@ group :test do
gem 'database_cleaner'
gem 'shoulda-matchers'
gem 'faker'
- # gem 'spork'
- # gem 'guard-rspec', :require => false
- # gem 'guard-spork'
- # gem 'email_spec'
+ gem 'email_spec'
end
group :development, :test do
gem 'jazz_hands', github: 'nixme/jazz_hands', branch: 'bring-your-own-debugger'
gem 'pry-byebug'
- # gem 'terminal-notifier-guard', :platforms => :ruby
end
# Assets
@@ -57,20 +46,13 @@ gem 'jquery-rails'
gem 'uglifier', '>= 1.0.3'
gem 'asset_sync'
-# Web server
-gem 'unicorn', :platforms => :ruby
-
# AJAX file upload
gem 'remotipart', '~> 1.2'
################
# Fix for upload bug for Carrierwave and Rails 4.1
################
gem 'activesupport-json_encoder'
-# Logging/Monitoring
-gem 'rollbar'
-gem 'newrelic_rpm'
-
# Misc
gem 'global'
gem 'protected_attributes'
View
@@ -60,7 +60,6 @@ GEM
activesupport (>= 4.1.0, < 5.0)
addressable (2.3.6)
arel (5.0.1.20140414130214)
- arrayfields (4.9.2)
asset_sync (1.1.0)
activemodel
fog (>= 1.8.0)
@@ -83,16 +82,12 @@ GEM
debugger-linecache (~> 1.2)
callsite (0.0.11)
cancan (1.6.10)
- cane (2.6.2)
- parallel
capistrano (2.15.5)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
- capistrano-unicorn (0.2.0)
- capistrano (< 3.0)
capybara (2.4.3)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@@ -110,18 +105,7 @@ GEM
mime-types (>= 1.16)
chronic (0.10.2)
chunky_png (1.3.1)
- churn (0.0.35)
- chronic (>= 0.2.3)
- hirb
- json_pure
- main
- rest-client (>= 1.6.0)
- ruby_parser (~> 3.0)
- sexp_processor (~> 4.1)
cliver (0.3.2)
- code_analyzer (0.4.5)
- sexp_processor
- code_metrics (0.1.3)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
@@ -154,6 +138,9 @@ GEM
warden (~> 1.2.3)
diff-lcs (1.2.5)
diffy (3.0.6)
+ email_spec (1.6.0)
+ launchy (~> 2.1)
+ mail (~> 2.2)
erubis (2.7.0)
eventmachine (1.0.3)
excon (0.40.0)
@@ -166,13 +153,6 @@ GEM
faker (1.4.3)
i18n (~> 0.5)
fast_blank (0.0.2)
- fattr (2.2.2)
- flay (2.5.0)
- ruby_parser (~> 3.0)
- sexp_processor (~> 4.0)
- flog (4.3.0)
- ruby_parser (~> 3.1, > 3.1.0)
- sexp_processor (~> 4.4)
fog (1.23.0)
fog-brightbox
fog-core (~> 1.23)
@@ -231,42 +211,19 @@ GEM
railties (>= 3.1.0)
turbolinks
json (1.8.1)
- json_pure (1.8.1)
kaminari (0.16.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
- kgio (2.9.2)
launchy (2.4.2)
addressable (~> 2.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- main (6.0.0)
- arrayfields (>= 4.7.4)
- chronic (>= 0.6.2)
- fattr (>= 2.2.0)
- map (>= 5.1.0)
- map (6.5.5)
meta_request (0.3.4)
callsite (~> 0.0, >= 0.0.11)
rack-contrib (~> 1.1)
railties (>= 3.0.0, < 5.0.0)
method_source (0.8.2)
- metric_fu (4.11.1)
- cane (~> 2.5, >= 2.5.2)
- churn (~> 0.0.35)
- code_metrics (~> 0.1)
- coderay
- flay (~> 2.1, >= 2.0.1)
- flog (~> 4.1, >= 4.1.1)
- launchy (~> 2.0)
- metric_fu-Saikuro (~> 1.1, >= 1.1.3)
- multi_json
- rails_best_practices (~> 1.14, >= 1.14.3)
- redcard
- reek (~> 1.3, >= 1.3.4)
- roodi (~> 3.1)
- metric_fu-Saikuro (1.1.3)
mime-types (1.25.1)
mini_magick (3.8.1)
subexec (~> 0.2.1)
@@ -282,8 +239,6 @@ GEM
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
- netrc (0.7.7)
- newrelic_rpm (3.9.5.251)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
offsite_payments (2.0.1)
@@ -295,7 +250,6 @@ GEM
money (< 7.0.0)
nokogiri (~> 1.4)
orm_adapter (0.5.0)
- parallel (1.3.2)
pg (0.17.1)
poltergeist (1.5.1)
capybara (~> 2.1)
@@ -345,46 +299,20 @@ GEM
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.0)
sprockets-rails (~> 2.0)
- rails_best_practices (1.15.4)
- activesupport
- awesome_print
- code_analyzer (>= 0.4.3)
- colored
- erubis
- i18n
- json
- require_all
- ruby-progressbar
railties (4.1.0)
actionpack (= 4.1.0)
activesupport (= 4.1.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
- rainbow (2.0.0)
- raindrops (0.13.0)
rake (10.3.2)
redactor-rails (0.4.5)
devise
mime-types
orm_adapter
- redcard (1.1.0)
- reek (1.3.8)
- rainbow (>= 1.99, < 3.0)
- ruby2ruby (>= 2.0.8, < 3.0)
- ruby_parser (~> 3.3)
- sexp_processor
remotipart (1.2.1)
request_store (1.1.0)
- require_all (1.3.2)
responders (1.1.1)
railties (>= 3.2, < 4.2)
- rest-client (1.7.2)
- mime-types (>= 1.16, < 3.0)
- netrc (~> 0.7)
- rollbar (1.0.1)
- multi_json (~> 1.3)
- roodi (3.3.1)
- ruby_parser (~> 3.2, >= 3.2.2)
rspec-collection_matchers (1.0.0)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.1.5)
@@ -403,19 +331,12 @@ GEM
rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0)
rspec-support (3.1.1)
- ruby-progressbar (1.6.0)
- ruby2ruby (2.1.3)
- ruby_parser (~> 3.1)
- sexp_processor (~> 4.0)
- ruby_parser (3.6.3)
- sexp_processor (~> 4.1)
sass (3.2.19)
sass-rails (4.0.2)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0.0)
- sexp_processor (4.4.4)
shoulda-matchers (2.7.0)
activesupport (>= 3.0.0)
sitemap_generator (5.0.5)
@@ -455,12 +376,6 @@ GEM
unf_ext
unf_ext (0.0.6)
unicode_utils (1.4.0)
- unicorn (4.8.3)
- kgio (~> 2.6)
- rack
- raindrops (~> 0.7)
- unicorn-worker-killer (0.4.2)
- unicorn (~> 4)
uniform_notifier (1.6.2)
warden (1.2.3)
rack (>= 1.0)
@@ -485,7 +400,6 @@ DEPENDENCIES
bullet
cancan
capistrano (~> 2.15)
- capistrano-unicorn
capybara
capybara-screenshot
carrierwave
@@ -494,6 +408,7 @@ DEPENDENCIES
compass-rails
database_cleaner
devise
+ email_spec
factory_girl_rails
faker
fast_blank
@@ -508,9 +423,7 @@ DEPENDENCIES
jquery-turbolinks
kaminari
meta_request
- metric_fu
mini_magick
- newrelic_rpm
pg
poltergeist
protected_attributes
@@ -519,7 +432,6 @@ DEPENDENCIES
rails (= 4.1.0)
redactor-rails
remotipart (~> 1.2)
- rollbar
rspec-collection_matchers
rspec-rails
sass-rails (~> 4.0.0)
@@ -531,6 +443,4 @@ DEPENDENCIES
tzinfo-data
uglifier (>= 1.0.3)
unf
- unicorn
- unicorn-worker-killer
whenever (>= 0.8.4)
@@ -18,7 +18,7 @@ def paypal_ipn
transaction.failed!
end
if transaction.save
- Mailatron4000::Orders.confirmation_email(transaction.order) rescue Rollbar.report_message("PayPal IPN: Order #{transaction.order.id} confirmation email failed to send", "info", :order => transaction.order)
+ Mailatron4000::Orders.confirmation_email(transaction.order) rescue Rails.logger.warn("PayPal IPN: Order #{transaction.order.id} confirmation email failed to send")
end
end
View
@@ -1,23 +1,2 @@
-# --- Start of unicorn worker killer code ---
-
-if ENV['RAILS_ENV'] == 'production'
- require 'unicorn/worker_killer'
-
- max_request_min = 500
- max_request_max = 600
-
- # Max requests per worker
- use Unicorn::WorkerKiller::MaxRequests, max_request_min, max_request_max
-
- oom_min = (240) * (1024**2)
- oom_max = (260) * (1024**2)
-
- # Max memory size (RSS) per worker
- use Unicorn::WorkerKiller::Oom, oom_min, oom_max
-end
-
-# --- End of unicorn worker killer code ---
-# This file is used by Rack-based servers to start the application.
-
require ::File.expand_path('../config/environment', __FILE__)
run Trado::Application
Oops, something went wrong.

0 comments on commit aa427d4

Please sign in to comment.