Class: CC::CLI::Engines::Enable
- Inherits:
-
EngineCommand
- Object
- Command
- EngineCommand
- CC::CLI::Engines::Enable
- Defined in:
- lib/cc/cli/engines/enable.rb
Constant Summary collapse
- ARGUMENT_LIST =
"<engine_name>".freeze
- SHORT_HELP =
"Enable an engine in your codeclimate.yml.".freeze
- HELP =
"#{SHORT_HELP}\n" \ "\n"\ " <engine_name> Engine to enable in your codeclimate.yml".freeze
Constants included from Analyzer
Constants inherited from Command
Command::CODECLIMATE_YAML, Command::NAMESPACE
Instance Method Summary collapse
Methods inherited from Command
[], abstract!, abstract?, all, command_name, #execute, help, inherited, #initialize, #require_codeclimate_yml, short_help, synopsis
Methods included from Output
#colorize, #fatal, #rainbow, #say, #success, #terminal, #warn
Constructor Details
This class inherits a constructor from CC::CLI::Command
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cc/cli/engines/enable.rb', line 13 def run require_codeclimate_yml if !engine_exists? say "Engine not found. Run 'codeclimate engines:list' for a list of valid engines." elsif engine_enabled? say "Engine already enabled." pull_docker_images else enable_engine update_yaml say "Engine added to .codeclimate.yml." pull_docker_images end end |