module NdrDevSupport::RakeCI::CommitCop::Deputisable

Deputisable cop concern

Private Instance Methods

attachment(severity, title, text) click to toggle source
# File lib/ndr_dev_support/rake_ci/commit_cop/concerns/deputisable.rb, line 34
def attachment(severity, title, text)
  {
    color: severity.to_s, title: title, text: text, mrkdwn_in: ['text']
  }
end
migration_file?() click to toggle source
# File lib/ndr_dev_support/rake_ci/commit_cop/concerns/deputisable.rb, line 12
def migration_file?
  proc do |file|
    if file.is_a?(Array)
      file.any?(&migration_file?)
    else
      file.start_with?(*NdrDevSupport::RakeCI::CommitCop.migration_paths) &&
        file =~ /\d{14}_.*\.rb\z/
    end
  end
end
structure_dump_file?() click to toggle source
# File lib/ndr_dev_support/rake_ci/commit_cop/concerns/deputisable.rb, line 30
def structure_dump_file?
  proc { |file| file =~ NdrDevSupport::RakeCI::CommitCop.structure_dump_pattern }
end
unscoped_migration_file?() click to toggle source
# File lib/ndr_dev_support/rake_ci/commit_cop/concerns/deputisable.rb, line 23
def unscoped_migration_file?
  proc do |file|
    file.start_with?(*NdrDevSupport::RakeCI::CommitCop.migration_paths) &&
      file =~ /\d{14}_[^\.]*\.rb\z/
  end
end