Sha256: ba0d1de6effba5b35452a6acf92fc59e12e0f2057b2bfe86b3145745a38ef5f8
Contents?: true
Size: 518 Bytes
Versions: 8
Compression:
Stored size: 518 Bytes
Contents
module Licensee module Matchers class DistZilla < Package attr_reader :file LICENSE_REGEX = /^license\s*=\s*([a-z\-0-9\._]+)/i private def license_property match = file.content.match LICENSE_REGEX spdx_name(match[1]).downcase if match && match[1] end def spdx_name(perl_name) perl_name.sub('_', '-') .sub('_', '.') .sub('Mozilla', 'MPL') .sub(/^GPL-(\d)$/, 'GPL-\1.0') end end end end
Version data entries
8 entries across 8 versions & 1 rubygems