Sha256: 0cb313a38f456696e584f5cfeb238e3f1421e1b8151d68b603a0d6a9a54bf56e
Contents?: true
Size: 456 Bytes
Versions: 11
Compression:
Stored size: 456 Bytes
Contents
module Licensee module Matchers class Spdx < Licensee::Matchers::Package # While we could parse the LICENSE.spdx file, prefer # a lenient regex for speed and security. Moar parsing moar problems. LICENSE_REGEX = /PackageLicenseDeclared:\s*([a-z\-0-9\. +()]+)\s*/i private def license_property match = @file.content.match LICENSE_REGEX match[1].downcase if match && match[1] end end end end
Version data entries
11 entries across 11 versions & 1 rubygems