use Dir.pwd as default path instead of loading Rails and getting the Rails.root

This commit is contained in:
Javan Makhmali 2010-06-24 13:51:17 -04:00
parent 8565a6547c
commit c2e0320d2a
2 changed files with 1 additions and 14 deletions

View File

@ -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

View File

@ -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