lib/licensed/configuration.rb in licensed-2.6.2 vs lib/licensed/configuration.rb in licensed-2.7.0
- old
+ new
@@ -73,10 +73,12 @@
Array(self["reviewed"][dependency["type"]]).include?(dependency["name"])
end
# Is the given dependency ignored?
def ignored?(dependency)
- Array(self["ignored"][dependency["type"]]).include?(dependency["name"])
+ Array(self["ignored"][dependency["type"]]).any? do |pattern|
+ File.fnmatch?(pattern, dependency["name"], File::FNM_PATHNAME | File::FNM_CASEFOLD)
+ end
end
# Is the license of the dependency allowed?
def allowed?(license)
Array(self["allowed"]).include?(license)