Skip to content

Commit d18a203

Browse files
committed
Use direct path to rake file
Before this, we were relying on the Gem's `lib` dir being on the $LOAD_PATH, and thus `load` would find the `tasks/doc.rake` file. This can break when a different gem also has a `tasks/docs.rake` file, and it's further up in the load path. Same goes for a Rails app with a `tasks/docs.rake` file existing. This ensures we get OUR `tasks/docs.rake` file.
1 parent 351020a commit d18a203

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module RspecApiDocumentation
22
class Railtie < Rails::Railtie
33
rake_tasks do
4-
load "tasks/docs.rake"
4+
load File.join(File.dirname(__FILE__), '../tasks/docs.rake')
55
end
66
end
77
end

0 commit comments

Comments
 (0)