Sha256: 6b6159cb7783232714bd764d7a80fe4772c4453118917ff9d41f69c9dbfd0a01
Contents?: true
Size: 545 Bytes
Versions: 1
Compression:
Stored size: 545 Bytes
Contents
module Licensee module Matchers class DistZilla < Licensee::Matchers::Package attr_reader :file LICENSE_REGEX = /^license\s*=\s*([a-z\-0-9\._]+)/i.freeze 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
licensee-9.11.0 | lib/licensee/matchers/dist_zilla.rb |