Permalink
Browse files

Task hacker degrades gracefully on undefined task

  • Loading branch information...
1 parent 22def71 commit 40dffa7d055c5c54d387375cbc88a616a632d6ee @dazuma dazuma committed Apr 13, 2012
Showing with 8 additions and 2 deletions.
  1. +4 −0 History.rdoc
  2. +1 −1 Version
  3. +3 −1 lib/rgeo/active_record/task_hacker.rb
View
@@ -1,3 +1,7 @@
+=== 0.4.5 / 2012-04-13
+
+* Task hacker failed ungracefully when attempting to hack a nonexistent task. Fixed.
+
=== 0.4.4 / 2012-04-12
* Support cartesian bounding boxes in queries.
View
@@ -1 +1 @@
-0.4.4
+0.4.5
@@ -88,7 +88,9 @@ class << self
# configuration hash.
def modify(name_, env_, pattern_, &block_)
- ::Rake::Task[name_].actions.unshift(Action.new(env_, pattern_, block_))
+ if ::Rake::Task.task_defined?(name_)
+ ::Rake::Task[name_].actions.unshift(Action.new(env_, pattern_, block_))
+ end
end

0 comments on commit 40dffa7

Please sign in to comment.