Sha256: 5e92c6b365974c424d1673e6283ff6951d5da1e105a1497563b4373793ea316f
Contents?: true
Size: 466 Bytes
Versions: 4
Compression:
Stored size: 466 Bytes
Contents
class Licensee module Matchers class NpmBower < Package # 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 end
Version data entries
4 entries across 4 versions & 1 rubygems