Sha256: 55d9d3e757d279d1818739a4eff5b4f62da245e19b1bfb76aca6a0c02b882edc

Contents?: true

Size: 484 Bytes

Versions: 20

Compression:

Stored size: 484 Bytes

Contents

module Licensee
  module Matchers
    class NpmBower < Package
      # 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 = /
        s*[\"\']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

Version Path
licensee-8.9.2 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.9.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.8.5 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.8.4 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.8.3 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.8.2 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.8.1 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.8.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.7.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.6.1 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.6.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.5.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.4.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.3.1 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.3.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.2.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.1.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-8.0.0 lib/licensee/matchers/npm_bower_matcher.rb
licensee-7.0.1 lib/licensee/matchers/npm_bower_matcher.rb
licensee-7.0.0 lib/licensee/matchers/npm_bower_matcher.rb