From 72f46135b5f1380f6caee2007cc361266d8054e9 Mon Sep 17 00:00:00 2001 From: Daniel Collis-Puro Date: Wed, 28 Apr 2010 14:17:19 -0400 Subject: [PATCH] delayed_job updates. --- Rakefile | 5 +++++ config/environments/test.rb | 10 +++++----- ...d_jobs.rb => 20100428181216_create_delayed_jobs.rb} | 0 script/delayed_job | 6 ++---- 4 files changed, 12 insertions(+), 9 deletions(-) rename db/migrate/{20090730182227_create_delayed_jobs.rb => 20100428181216_create_delayed_jobs.rb} (100%) diff --git a/Rakefile b/Rakefile index 3bb0e85..86736ae 100644 --- a/Rakefile +++ b/Rakefile @@ -8,3 +8,8 @@ require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails' +begin + require 'delayed/tasks' +rescue LoadError + STDERR.puts "Run `rake gems:install` to install delayed_job" +end diff --git a/config/environments/test.rb b/config/environments/test.rb index a81485a..512142a 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -21,10 +21,10 @@ # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test -config.gem "thoughtbot-shoulda", :lib => "shoulda", :source => "http://gems.github.com" +config.gem "shoulda", :version => '2.10.3' -config.gem "rspec", :lib => false -config.gem "rspec-rails", :lib => false -config.gem "remarkable_rails", :lib => false +config.gem "rspec", :version => '1.3.0' +config.gem "rspec-rails", :version => '1.3.2' +config.gem "remarkable_rails", :version => '3.1.13' -config.gem "thoughtbot-factory_girl", :lib => 'factory_girl', :source => 'http://gems.github.com' +config.gem "factory_girl", :version => '1.2.4' diff --git a/db/migrate/20090730182227_create_delayed_jobs.rb b/db/migrate/20100428181216_create_delayed_jobs.rb similarity index 100% rename from db/migrate/20090730182227_create_delayed_jobs.rb rename to db/migrate/20100428181216_create_delayed_jobs.rb diff --git a/script/delayed_job b/script/delayed_job index 276ba6d..edf1959 100755 --- a/script/delayed_job +++ b/script/delayed_job @@ -1,7 +1,5 @@ #!/usr/bin/env ruby -# Daemons sets pwd to /, so we have to explicitly set RAILS_ROOT -RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) - -require File.join(File.dirname(__FILE__), *%w(.. vendor plugins delayed_job lib delayed command)) +require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment')) +require 'delayed/command' Delayed::Command.new(ARGV).daemonize