class LicenseAuto::Matcher::FilepathName
Constants
- DPKG_COPYRIGHT_PATTERN
Debian Linux doc:
[4.2. copyright. Required files under the debian directory](https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#copyright)
- LICENSE_PATTERN
- NOTICE_PATTERN
- README_PATTERN
Attributes
name[R]
Public Class Methods
new(name)
click to toggle source
# File lib/license_auto/matcher.rb, line 82 def initialize(name) @name = name end
Public Instance Methods
match_license_file()
click to toggle source
# File lib/license_auto/matcher.rb, line 86 def match_license_file() LICENSE_PATTERN.match(@name) end
match_notice_file()
click to toggle source
# File lib/license_auto/matcher.rb, line 94 def match_notice_file() NOTICE_PATTERN.match(@name) end
match_readme_file()
click to toggle source
# File lib/license_auto/matcher.rb, line 90 def match_readme_file() README_PATTERN.match(@name) end
match_the_ref(ref)
click to toggle source
git ref: commit hash/branch/tag
# File lib/license_auto/matcher.rb, line 100 def match_the_ref(ref) # LicenseAuto.logger.debug(ref) version_pattern = /[vV]?#{@name.gsub(/\./, '\.').gsub(/\//, '\/')}$/i # LicenseAuto.logger.debug(version_pattern) version_pattern.match(ref) end