Sha256: a7372ed16f395cafd9d28e15a2d7da99ac1f1015097a29f84ff0487f44d316b5
Contents?: true
Size: 538 Bytes
Versions: 21
Compression:
Stored size: 538 Bytes
Contents
module Licensee module Matchers class DistZilla < Licensee::Matchers::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
21 entries across 21 versions & 1 rubygems