prefer autoload to require
This commit is contained in:
parent
16f988f47d
commit
15d91a3efd
@ -2,14 +2,15 @@ require 'chronic'
|
|||||||
require 'active_support/all'
|
require 'active_support/all'
|
||||||
require 'thread'
|
require 'thread'
|
||||||
|
|
||||||
require 'whenever/job_list'
|
|
||||||
require 'whenever/job'
|
|
||||||
require 'whenever/cron'
|
|
||||||
require 'whenever/output_redirection'
|
|
||||||
require 'whenever/command_line'
|
|
||||||
require 'whenever/version'
|
|
||||||
|
|
||||||
module Whenever
|
module Whenever
|
||||||
|
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
|
||||||
|
|
||||||
def self.cron(options)
|
def self.cron(options)
|
||||||
Whenever::JobList.new(options).generate_cron_output
|
Whenever::JobList.new(options).generate_cron_output
|
||||||
@ -26,5 +27,4 @@ module Whenever
|
|||||||
def self.bundler?
|
def self.bundler?
|
||||||
File.exists?(File.join(path, 'Gemfile'))
|
File.exists?(File.join(path, 'Gemfile'))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user