Load a rakefile from the given path. The Rakefile is loaded in an
environment that includes the Rake DSL methods.
14: def load_rakefile(rakefile_path)
15: rakefile = open(rakefile_path) { |f| f.read }
16: load_string(rakefile, rakefile_path)
17: end
Load a string of code in the Rake DSL environment.
If the string comes from a file, include the file path so that proper line
numbers references may be retained.
22: def load_string(code, file_name=nil)
23: module_eval(code, file_name || "(eval)")
24: end
Run a block of code in the Rake DSL environment.
27: def run(&block)
28: module_eval(&block)
29: end