moved everthing into a whenever/ dir
This commit is contained in:
parent
295cabe56c
commit
b84c8a8f0b
@ -1,37 +1,31 @@
|
|||||||
unless defined?(Whenever)
|
|
||||||
$:.unshift(File.dirname(__FILE__))
|
|
||||||
|
|
||||||
# Hoping to load Rails' Rakefile
|
|
||||||
begin
|
|
||||||
load 'Rakefile'
|
|
||||||
rescue LoadError => e
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
require 'chronic'
|
require 'chronic'
|
||||||
|
|
||||||
|
# Hoping to load Rails' Rakefile
|
||||||
|
begin
|
||||||
|
load 'Rakefile'
|
||||||
|
rescue LoadError
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
# If Rails' rakefile was loaded than so was activesupport, but
|
# 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.
|
# 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
|
# It was previously defined as a dependency of this gem, but that became
|
||||||
# problematic. See: http://github.com/javan/whenever/issues#issue/1
|
# problematic. See: http://github.com/javan/whenever/issues#issue/1
|
||||||
begin
|
begin
|
||||||
require 'activesupport'
|
require 'activesupport'
|
||||||
rescue LoadError => e
|
rescue LoadError
|
||||||
warn 'To user Whenever you need the activesupport gem:'
|
warn 'To user Whenever you need the activesupport gem:'
|
||||||
warn '$ sudo gem install activesupport'
|
warn '$ sudo gem install activesupport'
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Whenever files
|
# Whenever files
|
||||||
%w{
|
require 'whenever/base'
|
||||||
base
|
require 'whenever/version'
|
||||||
version
|
require 'whenever/job_list'
|
||||||
job_list
|
require 'whenever/job_types/default'
|
||||||
job_types/default
|
require 'whenever/job_types/rake_task'
|
||||||
job_types/rake_task
|
require 'whenever/job_types/runner'
|
||||||
job_types/runner
|
require 'whenever/outputs/cron'
|
||||||
outputs/cron
|
require 'whenever/outputs/cron/output_redirection'
|
||||||
outputs/cron/output_redirection
|
require 'whenever/command_line'
|
||||||
command_line
|
|
||||||
}.each { |file| require File.expand_path(File.dirname(__FILE__) + "/#{file}") }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user