whenever/lib/whenever.rb

31 lines
622 B
Ruby
Raw Normal View History

2009-02-16 03:24:10 +00:00
require 'chronic'
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
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
end