Class: PreCommit::Checks::Ci
- Inherits:
-
Plugin
- Object
- Plugin
- PreCommit::Checks::Ci
show all
- Defined in:
- lib/plugins/pre_commit/checks/ci.rb
Constant Summary
collapse
- CI_TASK_NAME =
'pre_commit:ci'
Instance Attribute Summary
Attributes inherited from Plugin
#config, #pluginator
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Plugin
#initialize, #name
Class Method Details
.description ⇒ Object
15
16
17
|
# File 'lib/plugins/pre_commit/checks/ci.rb', line 15
def self.description
"Runs 'rake #{CI_TASK_NAME} --silent'"
end
|
Instance Method Details
#call(_) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/plugins/pre_commit/checks/ci.rb', line 8
def call(_)
return if system("rake #{Ci::CI_TASK_NAME} --silent")
PreCommit::ErrorList.new(
"your test suite has failed, for the full output run `#{CI_TASK_NAME}`"
)
end
|