From c2e0320d2a4790725ab29b14536e37a0a10b3b12 Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Thu, 24 Jun 2010 13:51:17 -0400 Subject: [PATCH] use Dir.pwd as default path instead of loading Rails and getting the Rails.root --- lib/whenever.rb | 9 --------- lib/whenever/base.rb | 6 +----- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/whenever.rb b/lib/whenever.rb index 59e2fce..4801211 100644 --- a/lib/whenever.rb +++ b/lib/whenever.rb @@ -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 diff --git a/lib/whenever/base.rb b/lib/whenever/base.rb index 45d6944..a299f25 100644 --- a/lib/whenever/base.rb +++ b/lib/whenever/base.rb @@ -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 \ No newline at end of file