Browse Source

Use Rails.root in the Rakefile

It seems more robust (or certainly easier to understand on reading
the code) to make these paths relative to the Rails root rather
than File.dirname(__FILE__).
release/0.16
Mark Longair 8 years ago
parent
commit
656d2d1170
  1. 4
      Rakefile

4
Rakefile

@ -5,7 +5,7 @@ require File.expand_path('../config/application', __FILE__)
require 'rake'
Alaveteli::Application.load_tasks
if Rails.env == 'test'
Dir[File.join(File.dirname(__FILE__),'commonlib','rblib','tests','*.rake')].each { |file| load(file) }
Dir[Rails.root.join('commonlib','rblib','tests','*.rake')].each { |file| load(file) }
end
# Make sure the the acts_as_xapian tasks are also loaded:
Dir[File.join(File.dirname(__FILE__),'lib','acts_as_xapian','tasks','*.rake')].each { |file| load(file) }
Dir[Rails.root.join('lib','acts_as_xapian','tasks','*.rake')].each { |file| load(file) }

Loading…
Cancel
Save