Skip to content

Commit

Permalink
Merge pull request #167 from k0kubun/plugin-runner
Browse files Browse the repository at this point in the history
Allow `load_recipes` to load plugin recipes directly
  • Loading branch information
ryotarai committed Sep 24, 2015
2 parents 1b093e4 + 6e1b69e commit a2e0d19
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/itamae/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ def initialize(backend, options)

def load_recipes(paths)
paths.each do |path|
recipe = Recipe.new(self, File.expand_path(path))
expanded_path = File.expand_path(path)
if path.include?('::')
gem_path = Recipe.find_recipe_in_gem(path)
expanded_path = gem_path if gem_path
end

recipe = Recipe.new(self, expanded_path)
children << recipe
recipe.load
end
Expand Down

0 comments on commit a2e0d19

Please sign in to comment.