lib/hoe.rb in hoe-1.12.0 vs lib/hoe.rb in hoe-1.12.1
- old
+ new
@@ -132,11 +132,11 @@
# This will set the +Gem::Specification+ platform to the one indicated in
# +FORCE_PLATFORM+ (instead of default Gem::Platform::CURRENT)
#
class Hoe
- VERSION = '1.12.0'
+ VERSION = '1.12.1'
GEMURL = URI.parse 'http://gems.rubyforge.org' # for namespace :deps below
ruby_prefix = Config::CONFIG['prefix']
sitelibdir = Config::CONFIG['sitelibdir']
@@ -1171,20 +1171,26 @@
@tasks
end
end
##
+ # Simple shortcut for Rake.application.all_tasks
+ def self.all_tasks
+ Rake.application.all_tasks
+ end
+
+ ##
# Hooks into rake and allows us to clear out a task by name or
# regexp. Use this if you want to completely override a task instead
# of extend it.
def self.clear_tasks(*tasks)
tasks.flatten.each do |name|
case name
when Regexp then
- Rake.application.all_tasks.delete_if { |k,_| k =~ name }
+ all_tasks.delete_if { |k,_| k =~ name }
else
- Rake.application.all_tasks.delete(name)
+ all_tasks.delete(name)
end
end
end
##
@@ -1193,10 +1199,9 @@
# actions.
#
# require 'hoe'
# require 'tasks/rails'
# Rake.undo("test") # rolls out rails' test task
-
def self.undo(*names)
names.each do |name|
all_tasks[name].actions.delete_at(-1)
end
end