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.freeze
PLUS_FILE_LICENSE_REGEX =
/\s*\+\s*file\s+LICENSE$/i.freeze
GPL_VERSION_REGEX =
/^GPL(?:-([23])|\s*\(\s*>=\s*([23])\s*\))$/i.freeze

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.



4
5
6
# File 'lib/licensee/matchers/cran.rb', line 4

def file
  @file
end