Created
September 30, 2014 16:50
-
-
Save lardcanoe/7188f396aab80f1d2fba to your computer and use it in GitHub Desktop.
Require tasks from all gems in a group from a Gemfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :engines do | |
gem 'my_engine' | |
gem 'another_engine' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Needed a way to require rake tasks for any gem in the :engines group | |
Bundler.definition.dependencies.each do |dep| | |
if dep.groups.any?{ |g| g == :engines } | |
require "#{dep.name}/tasks" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment