Sha256: 302c600b5cae0cc6f5856eb7a0ceca649180e48ca6567c3ca2863f7347ffddb5
Contents?: true
Size: 437 Bytes
Versions: 8
Compression:
Stored size: 437 Bytes
Contents
class Licensee class NpmBowerMatcher < PackageMatcher # While we could parse the package.json or bower.json file, prefer # a lenient regex for speed and security. Moar parsing moar problems. LICENSE_REGEX = /\s*[\"\']license[\"\']\s*\:\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
Version data entries
8 entries across 8 versions & 1 rubygems