Skip to content
Browse files

Don't require Rails and ActionMailer since delayed_job can be used in…

… plain ol' ruby apps with Active Record
  • Loading branch information...
1 parent 7232cf1 commit fa5aab7b614169b491a166399a0993537c936752 @bkeepers bkeepers committed Sep 6, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/delayed_job.rb
View
4 lib/delayed_job.rb
@@ -2,11 +2,11 @@
require File.dirname(__FILE__) + '/delayed/message_sending'
require File.dirname(__FILE__) + '/delayed/performable_method'
-require File.dirname(__FILE__) + '/delayed/performable_mailer'
+require File.dirname(__FILE__) + '/delayed/performable_mailer' if defined?(ActionMailer)
require File.dirname(__FILE__) + '/delayed/yaml_ext'
require File.dirname(__FILE__) + '/delayed/backend/base'
require File.dirname(__FILE__) + '/delayed/worker'
-require File.dirname(__FILE__) + '/delayed/railtie'
+require File.dirname(__FILE__) + '/delayed/railtie' if defined?(Rails::Railtie)
Object.send(:include, Delayed::MessageSending)
Module.send(:include, Delayed::MessageSending::ClassMethods)

0 comments on commit fa5aab7

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