Class: Licensee::Matchers::Cran

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

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 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

#to_h

Constructor Details

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

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



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

def file
  @file
end