lib/tap/tasks/rake.rb in bahuvrihi-tap-0.10.8 vs lib/tap/tasks/rake.rb in bahuvrihi-tap-0.11.0
- old
+ new
@@ -14,37 +14,10 @@
#
# The only exeception is in the use of the --help option. Use --rake-help
# to access the rake help, and --help to access this help.
#
class Rake < Tap::Task
-
- # Modifies Rake::Application by adding a hook to the standard_exception_handling
- # method. This allows more fine-grained use of Rake::Applications by Tap.
- module Application
- def enq_top_level(app)
- # takes the place of rake.top_level
- if options.show_tasks
- display_tasks_and_comments
- exit
- elsif options.show_prereqs
- display_prerequisites
- exit
- else
- top_level_tasks.each do |task_string|
- name, args = parse_task_string(task_string)
- task = self[name]
-
- unless task.kind_of?(Tap::Support::Executable)
- Tap::Support::Executable.initialize(task, :invoke)
- end
-
- app.enq(task, *args)
- end
- end
- end
- end
-
class << self
# Overrides Tap::Support::FrameworkClass#parse! to do
# nothing so that all args get passed forward to rake.
def parse!(argv, app=Tap::App.instance) # => instance, argv
@@ -53,25 +26,14 @@
exit
end
[new({}, default_name, app), argv.collect {|arg| arg == '--rake-help' ? '--help' : arg}]
end
end
-
- #--
- # def on_complete(override=false, &block)
- # @rake_tasks.each do |task|
- # task.on_complete(override, &block)
- # end
- # end
- #++
def enq(*argv)
rake = ::Rake.application
- unless rake.kind_of?(Application)
- rake.extend Application
- end
-
+
# run as if from command line using argv
current_argv = ARGV.dup
begin
ARGV.clear
ARGV.concat(argv)
@@ -87,8 +49,9 @@
rake.enq_top_level(app)
nil
end
+
end
end
end
\ No newline at end of file