Commit 22b97fa6 by Jon Frisby

FIX: We could accidentally load the wrong Rakefile if one appeared in a gem's file list.

(For example, the Zookeeper gem...)
parent a19d2cdd
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
* Bugfix: Remove-annotations wasn't properly finding test/spec files, and * Bugfix: Remove-annotations wasn't properly finding test/spec files, and
wasn't even looking for FactoryGirl factories under the new naming wasn't even looking for FactoryGirl factories under the new naming
convention. convention.
* Bugfix: Load the Rakefile from the current directory, not the first Rakefile
in our load path.
* Added support for new FactoryGirl naming convention. * Added support for new FactoryGirl naming convention.
* Expose all `position_*` variables as CLI params. * Expose all `position_*` variables as CLI params.
* Make `ENV ['position']` work as a default for all the `ENV ['position_*']` * Make `ENV ['position']` work as a default for all the `ENV ['position_*']`
......
...@@ -5,7 +5,7 @@ module Annotate ...@@ -5,7 +5,7 @@ module Annotate
def self.load_tasks def self.load_tasks
if File.exists?('Rakefile') if File.exists?('Rakefile')
require 'rake' require 'rake'
load 'Rakefile' load './Rakefile'
Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake } Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake }
return true return true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment