Class: Licensee::Matchers::NuGet

Inherits:
Package show all
Defined in:
lib/licensee/matchers/nuget.rb

Constant Summary collapse

LICENSE_REGEX =

While we could parse the nuspec file, prefer a lenient regex for speed and security. Moar parsing moar problems.

%r{
  <license\s*type\s*=\s*["']expression["']\s*>([a-z\-0-9. +()]+)</license\s*>
}ix
LICENSE_URL_REGEX =
%r{<licenseUrl>\s*(.*)\s*</licenseUrl>}i
NUGET_REGEX =
%r{https?://licenses.nuget.org/(.*)}i
OPENSOURCE_REGEX =
%r{https?://(?:www\.)?opensource.org/licenses/(.*)}i
SPDX_REGEX =
%r{https?://(?:www\.)?spdx.org/licenses/(.*?)(?:\.html|\.txt)?$}i
APACHE_REGEX =
%r{https?://(?:www\.)?apache.org/licenses/(.*?)(?:\.html|\.txt)?$}i

Constants inherited from Matcher

Matcher::HASH_METHODS

Instance Attribute Summary

Attributes inherited from Matcher

#file

Method Summary

Methods inherited from Package

#confidence, #match

Methods inherited from Matcher

#confidence, #initialize, #match, #name

Methods included from HashHelper

#to_h

Constructor Details

This class inherits a constructor from Licensee::Matchers::Matcher