Skip to content

Commit 22b97fa

Browse files
committed
FIX: We could accidentally load the wrong Rakefile if one appeared in a gem's file list.
(For example, the Zookeeper gem...)
1 parent a19d2cd commit 22b97fa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.rdoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Bugfix: Remove-annotations wasn't properly finding test/spec files, and
44
wasn't even looking for FactoryGirl factories under the new naming
55
convention.
6+
* Bugfix: Load the Rakefile from the current directory, not the first Rakefile
7+
in our load path.
68
* Added support for new FactoryGirl naming convention.
79
* Expose all `position_*` variables as CLI params.
810
* Make `ENV ['position']` work as a default for all the `ENV ['position_*']`

lib/annotate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Annotate
55
def self.load_tasks
66
if File.exists?('Rakefile')
77
require 'rake'
8-
load 'Rakefile'
8+
load './Rakefile'
99

1010
Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake }
1111
return true

0 commit comments

Comments
 (0)