Class: Nanoc::CLI::Commands::Check
- Inherits:
-
Nanoc::CLI::CommandRunner
- Object
- Cri::CommandRunner
- Nanoc::CLI::CommandRunner
- Nanoc::CLI::Commands::Check
- Defined in:
- lib/nanoc/cli/commands/check.rb
Instance Method Summary (collapse)
Methods inherited from Nanoc::CLI::CommandRunner
#call, call, #debug?, #is_in_site_dir?, #load_site, #require_site, #site
Instance Method Details
- (Object) run
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/nanoc/cli/commands/check.rb', line 17 def run require_site runner = Nanoc::Extra::Checking::Runner.new(site) if [:list] runner.list_checks return end success = if [:all] runner.run_all elsif [:deploy] runner.run_for_deploy else runner.run_specific(arguments) end unless success raise Nanoc::Errors::GenericTrivial, 'One or more checks failed' end end |