lib/spdx.rb in spdx-1.4.2 vs lib/spdx.rb in spdx-1.4.3

- old
+ new

@@ -5,10 +5,11 @@ # Fuzzy matcher for licenses to SPDX standard licenses module Spdx # rubocop:disable Metrics/ModuleLength def self.find(name) name = name.strip return nil if commercial?(name) + return nil if non_spdx?(name) search(name) end def self.search(name) @@ -17,9 +18,13 @@ closest(name) end def self.commercial?(name) name.casecmp('commercial').zero? + end + + def self.non_spdx?(name) + ['standard pil license'].include? name.downcase end def self.lookup(name) return false if name.nil? return SpdxLicenses[name] if SpdxLicenses.exist?(name)