From f2bbb68ad9d1e2a078fce2e855196f18b1349c47 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Tue, 19 Aug 2014 12:31:31 +0200 Subject: [PATCH] Update rails to address CVE-2014-3514. Fix the deployment --- Gemfile | 3 +++ Gemfile.lock | 52 +++++++++++++++++++++++++----------------------- config/deploy.rb | 4 ++-- 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/Gemfile b/Gemfile index 5ae2b0b7..88ab7025 100644 --- a/Gemfile +++ b/Gemfile @@ -102,6 +102,9 @@ gem 'activeuuid' # We use whenever for recurring jobs gem 'whenever', :require => false +# We use daemons to run scripts +gem 'daemons' + # Use guard and spring for testing in development group :development do # rspec Guard rules diff --git a/Gemfile.lock b/Gemfile.lock index d7f4c47d..129fa41c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,29 +1,29 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.1.4) - actionpack (= 4.1.4) - actionview (= 4.1.4) + actionmailer (4.1.5) + actionpack (= 4.1.5) + actionview (= 4.1.5) mail (~> 2.5.4) - actionpack (4.1.4) - actionview (= 4.1.4) - activesupport (= 4.1.4) + actionpack (4.1.5) + actionview (= 4.1.5) + activesupport (= 4.1.5) rack (~> 1.5.2) rack-test (~> 0.6.2) - actionview (4.1.4) - activesupport (= 4.1.4) + actionview (4.1.5) + activesupport (= 4.1.5) builder (~> 3.1) erubis (~> 2.7.0) active_model_serializers (0.8.1) activemodel (>= 3.0) - activemodel (4.1.4) - activesupport (= 4.1.4) + activemodel (4.1.5) + activesupport (= 4.1.5) builder (~> 3.1) - activerecord (4.1.4) - activemodel (= 4.1.4) - activesupport (= 4.1.4) + activerecord (4.1.5) + activemodel (= 4.1.5) + activesupport (= 4.1.5) arel (~> 5.0.0) - activesupport (4.1.4) + activesupport (4.1.5) i18n (~> 0.6, >= 0.6.9) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -104,6 +104,7 @@ GEM thor d3_rails (3.4.6) railties (>= 3.1.0) + daemons (1.1.9) database_cleaner (1.3.0) debugger-linecache (1.2.0) delayed_job (4.0.2) @@ -267,21 +268,21 @@ GEM ruby-openid (>= 2.1.8) rack-test (0.6.2) rack (>= 1.0) - rails (4.1.4) - actionmailer (= 4.1.4) - actionpack (= 4.1.4) - actionview (= 4.1.4) - activemodel (= 4.1.4) - activerecord (= 4.1.4) - activesupport (= 4.1.4) + rails (4.1.5) + actionmailer (= 4.1.5) + actionpack (= 4.1.5) + actionview (= 4.1.5) + activemodel (= 4.1.5) + activerecord (= 4.1.5) + activesupport (= 4.1.5) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.4) + railties (= 4.1.5) sprockets-rails (~> 2.0) rails-observers (0.1.2) activemodel (~> 4.0) - railties (4.1.4) - actionpack (= 4.1.4) - activesupport (= 4.1.4) + railties (4.1.5) + actionpack (= 4.1.5) + activesupport (= 4.1.5) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.0.0) @@ -417,6 +418,7 @@ DEPENDENCIES cocoon coveralls d3_rails + daemons database_cleaner delayed_job_active_record devise diff --git a/config/deploy.rb b/config/deploy.rb index dfcd0204..aa1f020f 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -29,7 +29,7 @@ end desc 'Deploys the current version to the server.' task deploy: :environment do to :prepare do - queue "cd #{deploy_to}/current && RAILS_ENV=production script/delayed_job stop" + queue "cd #{deploy_to}/current && RAILS_ENV=production bin/delayed_job stop" end deploy do @@ -42,7 +42,7 @@ task deploy: :environment do to :launch do queue "sudo /etc/init.d/apache2 restart" - queue "cd #{deploy_to}/current && RAILS_ENV=production script/delayed_job start" + queue "cd #{deploy_to}/current && RAILS_ENV=production bin/delayed_job start" end invoke :'deploy:cleanup'