lib/js_dependency.rb in js_dependency-0.2.3 vs lib/js_dependency.rb in js_dependency-0.2.3.1

- old
+ new

@@ -128,11 +128,11 @@ else Pathname.new(temp_path) end list += extract_parent_paths(temp_pathname.to_s, index).each do |parent_path| - next if excludes&.any? { |ignore| parent_path.to_s.include?(ignore) } + next if excludes&.any? { |ignore| parent_path.to_s.include?(ignore) || temp_pathname.to_s.include?(ignore) } yield parent_path, temp_pathname.to_s end end temp_paths = list @@ -151,10 +151,10 @@ else Pathname.new(temp_path) end list += extract_children_paths(temp_pathname.to_s, index).each do |child_path| - next if excludes&.any? { |ignore| child_path.to_s.include?(ignore) } + next if excludes&.any? { |ignore| child_path.to_s.include?(ignore) || temp_pathname.to_s.include?(ignore) } yield temp_pathname.to_s, child_path end end temp_paths = list