in lib/between_meals/changes/cookbook.rb [129:160]
def self.find(list, cookbook_dirs, logger, repo, track_symlinks = false)
@@logger = logger
return [] if list.nil? || list.empty?
@repo_dir = File.realpath(repo.repo_path)
@cookbook_dirs = cookbook_dirs
list += map_symlinks(list) if track_symlinks
list.
group_by do |x|
g = self.explode_path(x[:path])
g[:cookbook_dir] + '/' + g[:name] if g
end.
map do |_, change|
is_cookbook = change.select do |c|
self.meaningful_cookbook_file?(c[:path])
end.any?
if is_cookbook
BetweenMeals::Changes::Cookbook.new(change, @cookbook_dirs)
end
end.compact
end