class PreCommit::Checks::Ci
The CI check will run `rake pre_commmit:ci` before the commit and check its exit code. If the task runs successfully, the commit will proceed. If it fails, the commit will be aborted.
Constants
- CI_TASK_NAME
Public Class Methods
description()
click to toggle source
# File lib/plugins/pre_commit/checks/ci.rb, line 13 def self.description "Runs 'rake #{CI_TASK_NAME} --silent'" end
Public Instance Methods
call(_)
click to toggle source
# File lib/plugins/pre_commit/checks/ci.rb, line 17 def call(_) return if system("rake", CI_TASK_NAME, "--silent") PreCommit::ErrorList.new( "your test suite has failed, for the full output run `#{CI_TASK_NAME}`" ) end