Sha256: 8067f33ab2cfc2a2c75899376c4be765b0d85af5f7d417be5600a1057e84da4a

Contents?: true

Size: 343 Bytes

Versions: 8

Compression:

Stored size: 343 Bytes

Contents

class Licensee
  class CopyrightMatcher < Matcher

    REGEX = /\A(Copyright|Copyright ©|Copyright \(c\)) \d{4}.*?\n?\z/i

    def match
      no_license if file.content.strip =~ REGEX
    end

    def confidence
      100
    end

    private

    def no_license
      @no_license ||= Licensee::Licenses.find("no-license")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
licensee-4.7.2 lib/licensee/matchers/copyright_matcher.rb
licensee-4.7.1 lib/licensee/matchers/copyright_matcher.rb
licensee-4.7.0 lib/licensee/matchers/copyright_matcher.rb
licensee-4.6.0 lib/licensee/matchers/copyright_matcher.rb
licensee-4.5.0 lib/licensee/matchers/copyright_matcher.rb
licensee-4.4.2 lib/licensee/matchers/copyright_matcher.rb
licensee-4.4.1 lib/licensee/matchers/copyright_matcher.rb
licensee-4.4.0 lib/licensee/matchers/copyright_matcher.rb