Class: Licensee::Matchers::Cran

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

Overview

Matches license identifiers in R package DESCRIPTION files.

Constant Summary collapse

LICENSE_FIELD_REGEX =

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

/^license:\s*(.+)/i
PLUS_FILE_LICENSE_REGEX =
/\s*\+\s*file\s+LICENSE$/i
GPL_VERSION_REGEX =
/^GPL(?:-([23])|\s*\(\s*>=\s*([23])\s*\))$/i

Constants inherited from Package

Package::SPDX_SUFFIX_REGEX

Constants inherited from Matcher

Matcher::HASH_METHODS

Instance Attribute Summary collapse

Method Summary

Methods inherited from Package

#confidence, #match

Methods inherited from Matcher

#confidence, #initialize, #match, #name

Methods included from HashHelper

#serialize_hash_value, #to_h

Constructor Details

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

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



7
8
9
# File 'lib/licensee/matchers/cran.rb', line 7

def file
  @file
end