use Dir.pwd as default path instead of loading Rails and getting the Rails.root
This commit is contained in:
parent
8565a6547c
commit
c2e0320d2a
@ -1,14 +1,5 @@
|
||||
require 'chronic'
|
||||
|
||||
# Hoping to load Rails' Rakefile
|
||||
begin
|
||||
load 'Rakefile'
|
||||
rescue LoadError
|
||||
nil
|
||||
end
|
||||
|
||||
# If Rails' rakefile was loaded than so was active_support, 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
|
||||
|
@ -5,11 +5,7 @@ module Whenever
|
||||
end
|
||||
|
||||
def self.path
|
||||
if defined?(Rails)
|
||||
Rails.root.to_s
|
||||
elsif defined?(::Rails)
|
||||
::Rails.root.to_s
|
||||
end
|
||||
Dir.pwd
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue
Block a user