Sha256: 8d1be13a6dc37d03133be88168439bf170dae7b35d8dcf57a706c4e3681b4502
Contents?: true
Size: 744 Bytes
Versions: 251
Compression:
Stored size: 744 Bytes
Contents
require 'precheck/rule' require 'precheck/rules/abstract_text_match_rule' module Precheck class CopyrightDateRule < AbstractTextMatchRule def self.key :copyright_date end def self.env_name "RULE_COPYRIGHT_DATE" end def self.friendly_name "Incorrect, or missing copyright date" end def self.description "using a copyright date that is any different from this current year, or missing a date" end def pass_if_empty? return false end def supported_fields_symbol_set [:copyright].to_set end def word_search_type WORD_SEARCH_TYPES[:fail_on_exclusion] end def lowercased_words_to_look_for [DateTime.now.year.to_s] end end end
Version data entries
251 entries across 251 versions & 1 rubygems