Class: Licensee::Matchers::Gemspec

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

Constant Summary collapse

VALUE_REGEX =

a value is a string surrounded by any amount of whitespace optionally ended with (non-captured) “.freeze”

/\s*[\'\"]([a-z\-0-9\.]+)[\'\"](?:\.freeze)?\s*/i.freeze
ARRAY_REGEX =

an array contains one or more values. all values, or array itself, can be surrounded by any amount of whitespace. do not capture non-value groups

/\s*\[#{VALUE_REGEX}(?:,#{VALUE_REGEX})*\]\s*/i.freeze
DECLARATION_REGEX =
/
  ^\s*[a-z0-9_]+\.([a-z0-9_]+)\s*\=#{VALUE_REGEX}$
/ix.freeze
LICENSE_REGEX =
/
  ^\s*[a-z0-9_]+\.license\s*\=#{VALUE_REGEX}$
/ix.freeze
LICENSE_ARRAY_REGEX =
/
  ^\s*[a-z0-9_]+\.licenses\s*\=#{ARRAY_REGEX}$
/ix.freeze

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