Skip to content

Commit

Permalink
Merge pull request #226 from ironsand/patch-1
Browse files Browse the repository at this point in the history
Dir.exists? is deprecated, use Dir.exist?
  • Loading branch information
sorah authored Oct 26, 2016
2 parents 26e0809 + 908291f commit bd91ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/itamae/recipe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def define(name, params = {}, &block)

def include_recipe(target)
expanded_path = ::File.expand_path(target, File.dirname(@recipe.path))
expanded_path = ::File.join(expanded_path, 'default.rb') if ::Dir.exists?(expanded_path)
expanded_path = ::File.join(expanded_path, 'default.rb') if ::Dir.exist?(expanded_path)
expanded_path.concat('.rb') unless expanded_path.end_with?('.rb')
candidate_paths = [expanded_path, Recipe.find_recipe_in_gem(target)].compact
path = candidate_paths.find {|path| File.exist?(path) }
Expand Down

0 comments on commit bd91ea7

Please sign in to comment.