lib/licensee/matchers/nuget.rb in licensee-9.16.0 vs lib/licensee/matchers/nuget.rb in licensee-9.16.1
- old
+ new
@@ -5,17 +5,17 @@
class NuGet < Licensee::Matchers::Package
# While we could parse the nuspec file, prefer a lenient regex for speed and security.
# Moar parsing moar problems.
LICENSE_REGEX = %r{
<license\s*type\s*=\s*["']expression["']\s*>([a-z\-0-9. +()]+)</license\s*>
- }ix.freeze
+ }ix
- LICENSE_URL_REGEX = %r{<licenseUrl>\s*(.*)\s*</licenseUrl>}i.freeze
+ LICENSE_URL_REGEX = %r{<licenseUrl>\s*(.*)\s*</licenseUrl>}i
- NUGET_REGEX = %r{https?://licenses.nuget.org/(.*)}i.freeze
- OPENSOURCE_REGEX = %r{https?://(?:www\.)?opensource.org/licenses/(.*)}i.freeze
- SPDX_REGEX = %r{https?://(?:www\.)?spdx.org/licenses/(.*?)(?:\.html|\.txt)?$}i.freeze
- APACHE_REGEX = %r{https?://(?:www\.)?apache.org/licenses/(.*?)(?:\.html|\.txt)?$}i.freeze
+ 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
private
def license_from_first_capture(url, pattern)
match = url.match(pattern)