Sha256: 637cc441f130f464aa089ec3b78cfa401fe880711247af0b62530709dfd395a7
Contents?: true
Size: 548 Bytes
Versions: 20
Compression:
Stored size: 548 Bytes
Contents
module Licensee module Matchers class Gemspec < Package # We definitely don't want to be evaling arbitrary Gemspec files # While not 100% accurate, use some lenient regex to try to grep the # license declaration from the Gemspec as a string, if any LICENSE_REGEX = / ^\s*[a-z0-9_]+\.license\s*\=\s*[\'\"]([a-z\-0-9\.]+)[\'\"]\s*$ /ix private def license_property match = @file.content.match LICENSE_REGEX match[1].downcase if match && match[1] end end end end
Version data entries
20 entries across 20 versions & 1 rubygems