2009-02-16 03:24:10 +00:00
|
|
|
unless defined?(Whenever)
|
|
|
|
$:.unshift(File.dirname(__FILE__))
|
|
|
|
|
|
|
|
# Hoping to load Rails' Rakefile
|
|
|
|
begin
|
|
|
|
load 'Rakefile'
|
|
|
|
rescue LoadError => e
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
require 'chronic'
|
|
|
|
|
2009-06-26 01:37:23 +00:00
|
|
|
# If Rails' rakefile was loaded than so was activesupport, but
|
|
|
|
# if this is being used in a non-rails enviroment we need to require it.
|
|
|
|
# It was previously defined as a dependency of this gem, but that became
|
|
|
|
# problematic. See: http://github.com/javan/whenever/issues#issue/1
|
|
|
|
begin
|
|
|
|
require 'activesupport'
|
|
|
|
rescue LoadError => e
|
|
|
|
warn 'To user Whenever you need the activesupport gem:'
|
|
|
|
warn '$ sudo gem install activesupport'
|
|
|
|
exit(1)
|
|
|
|
end
|
|
|
|
|
2009-02-17 19:22:18 +00:00
|
|
|
# Whenever files
|
2009-03-06 01:28:36 +00:00
|
|
|
%w{
|
|
|
|
base
|
|
|
|
version
|
|
|
|
job_list
|
|
|
|
job_types/default
|
|
|
|
job_types/rake_task
|
|
|
|
job_types/runner
|
|
|
|
outputs/cron
|
2009-10-20 15:52:09 +00:00
|
|
|
outputs/cron/output_redirection
|
2009-03-06 01:28:36 +00:00
|
|
|
command_line
|
|
|
|
}.each { |file| require File.expand_path(File.dirname(__FILE__) + "/#{file}") }
|