2009-02-16 03:24:10 +00:00
|
|
|
require 'chronic'
|
2010-09-06 17:18:39 +00:00
|
|
|
require 'active_support/all'
|
2011-05-25 02:07:14 +00:00
|
|
|
require 'thread'
|
2009-02-16 03:24:10 +00:00
|
|
|
|
2010-10-26 00:41:57 +00:00
|
|
|
module Whenever
|
2011-07-31 13:27:18 +00:00
|
|
|
autoload :JobList, 'whenever/job_list'
|
|
|
|
autoload :Job, 'whenever/job'
|
|
|
|
autoload :CommandLine, 'whenever/command_line'
|
|
|
|
|
|
|
|
module Output
|
|
|
|
autoload :Cron, 'whenever/cron'
|
|
|
|
autoload :Redirection, 'whenever/output_redirection'
|
|
|
|
end
|
2010-10-26 00:41:57 +00:00
|
|
|
|
|
|
|
def self.cron(options)
|
|
|
|
Whenever::JobList.new(options).generate_cron_output
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.path
|
|
|
|
Dir.pwd
|
|
|
|
end
|
|
|
|
|
2011-07-19 08:17:17 +00:00
|
|
|
def self.rails3?
|
|
|
|
File.exists?(File.join(path, 'script', 'rails'))
|
|
|
|
end
|
|
|
|
|
2011-07-19 08:19:13 +00:00
|
|
|
def self.bundler?
|
|
|
|
File.exists?(File.join(path, 'Gemfile'))
|
|
|
|
end
|
2011-07-19 08:17:17 +00:00
|
|
|
end
|