Sha256: a72ed9dfd8f965e1b4f92a0be0b3345ed5c5a7490a6042a107160a760e70e267

Contents?: true

Size: 471 Bytes

Versions: 9

Compression:

Stored size: 471 Bytes

Contents

module Licensee
  module Matchers
    class Cran < Package
      attr_reader :file

      # 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 = /
        ^license:\s*([a-z\-0-9\.]+)
      /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

9 entries across 9 versions & 1 rubygems

Version Path
licensee-8.8.5 lib/licensee/matchers/cran_matcher.rb
licensee-8.8.4 lib/licensee/matchers/cran_matcher.rb
licensee-8.8.3 lib/licensee/matchers/cran_matcher.rb
licensee-8.8.2 lib/licensee/matchers/cran_matcher.rb
licensee-8.8.1 lib/licensee/matchers/cran_matcher.rb
licensee-8.8.0 lib/licensee/matchers/cran_matcher.rb
licensee-8.7.0 lib/licensee/matchers/cran_matcher.rb
licensee-8.6.1 lib/licensee/matchers/cran_matcher.rb
licensee-8.6.0 lib/licensee/matchers/cran_matcher.rb