| 1 |
require 'rake/application' |
| 2 |
|
| 3 |
module Rake |
| 4 |
|
| 5 |
# Rake module singleton methods. |
| 6 |
# |
| 7 |
class << self |
| 8 |
# Current Rake Application |
| 9 |
def application |
| 10 |
@application ||= Rake::Application.new |
| 11 |
end |
| 12 |
|
| 13 |
# Set the current Rake application object. |
| 14 |
def application=(app) |
| 15 |
@application = app |
| 16 |
end |
| 17 |
|
| 18 |
# Return the original directory where the Rake application was started. |
| 19 |
def original_dir |
| 20 |
application.original_dir |
| 21 |
end |
| 22 |
|
| 23 |
# Load a rakefile. |
| 24 |
def load_rakefile(path) |
| 25 |
load(path) |
| 26 |
end |
| 27 |
end |
| 28 |
|
| 29 |
end |