Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
Support rake >10.0 by including Rake::DSL
Browse files Browse the repository at this point in the history
When using rake versions 10.0 and above in a project, using `desc` and `task`
in the global namespace are no longer supported. As fabriation gem loads
lib/tasks/defined_fabricators.rake in the presence of rake, it generates
a warning in rake 0.9.* and errors in rake 10.*. This commit includes
Rake::DSL before loading lib/tasks/*.rake, which allows for error free
use of existing `desc` and `task`.
  • Loading branch information
gregburek committed Sep 8, 2015
1 parent 07d5c03 commit fd0424b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/fabrication.rb
Expand Up @@ -2,6 +2,7 @@

if defined?(Rake)
require 'rake'
include Rake::DSL
Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake }
end

Expand Down

0 comments on commit fd0424b

Please sign in to comment.