Module: CemAcpt
- Extended by:
- Logging
- Defined in:
- lib/cem_acpt/config.rb,
lib/cem_acpt.rb,
lib/cem_acpt/cli.rb,
lib/cem_acpt/bolt.rb,
lib/cem_acpt/goss.rb,
lib/cem_acpt/utils.rb,
lib/cem_acpt/actions.rb,
lib/cem_acpt/logging.rb,
lib/cem_acpt/version.rb,
lib/cem_acpt/bolt/cmd.rb,
lib/cem_acpt/goss/api.rb,
lib/cem_acpt/provision.rb,
lib/cem_acpt/test_data.rb,
lib/cem_acpt/utils/ssh.rb,
lib/cem_acpt/bolt/tasks.rb,
lib/cem_acpt/bolt/tests.rb,
lib/cem_acpt/bolt/errors.rb,
lib/cem_acpt/config/base.rb,
lib/cem_acpt/test_runner.rb,
lib/cem_acpt/utils/files.rb,
lib/cem_acpt/utils/shell.rb,
lib/cem_acpt/bolt/helpers.rb,
lib/cem_acpt/bolt/project.rb,
lib/cem_acpt/utils/puppet.rb,
lib/cem_acpt/action_result.rb,
lib/cem_acpt/bolt/cmd/base.rb,
lib/cem_acpt/bolt/cmd/task.rb,
lib/cem_acpt/image_builder.rb,
lib/cem_acpt/bolt/inventory.rb,
lib/cem_acpt/bolt/yaml_file.rb,
lib/cem_acpt/puppet_helpers.rb,
lib/cem_acpt/utils/terminal.rb,
lib/cem_acpt/bolt/cmd/output.rb,
lib/cem_acpt/config/cem_acpt.rb,
lib/cem_acpt/logging/formatter.rb,
lib/cem_acpt/image_builder/exec.rb,
lib/cem_acpt/image_name_builder.rb,
lib/cem_acpt/utils/winrm_runner.rb,
lib/cem_acpt/provision/terraform.rb,
lib/cem_acpt/bolt/summary_results.rb,
lib/cem_acpt/config/cem_acpt_image.rb,
lib/cem_acpt/utils/finalizer_queue.rb,
lib/cem_acpt/goss/api/action_response.rb,
lib/cem_acpt/test_runner/test_results.rb,
lib/cem_acpt/provision/terraform/linux.rb,
lib/cem_acpt/test_runner/log_formatter.rb,
lib/cem_acpt/provision/terraform/os_data.rb,
lib/cem_acpt/provision/terraform/windows.rb,
lib/cem_acpt/test_runner/log_formatter/base.rb,
lib/cem_acpt/image_builder/provision_commands.rb,
lib/cem_acpt/provision/terraform/terraform_cmd.rb,
lib/cem_acpt/test_runner/log_formatter/bolt_error_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb,
lib/cem_acpt/test_runner/log_formatter/goss_error_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/bolt_output_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/standard_error_formatter.rb,
lib/cem_acpt/test_runner/log_formatter/bolt_summary_results_formatter.rb
Overview
Module contains the CemAcptConfig::Base class which serves as a base class for different configs.
Defined Under Namespace
Modules: Actions, Bolt, Cli, Config, CoreExt, Goss, ImageBuilder, Logging, Platform, Provision, PuppetHelpers, TestData, TestRunner, Utils Classes: ActionResult, ErrorActionResult, ImageNameBuilder, ShellCommandError, ShellCommandNotFoundError
Constant Summary collapse
- VERSION =
'0.10.5'
Constants included from Logging
Class Attribute Summary collapse
-
.config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
- .print_config(options, command: :cem_acpt, format: :yaml) ⇒ Object
- .run(command, original_command, options) ⇒ Object
Methods included from Logging
current_log_config, current_log_config, current_log_format, current_log_format, current_log_level, current_log_level, included, logger, logger, new_log_config, new_log_config, new_log_formatter, new_log_formatter, new_log_level, new_log_level, new_logger, new_logger, verbose?, verbose?
Class Attribute Details
.config ⇒ Object (readonly)
Returns the value of attribute config.
13 14 15 |
# File 'lib/cem_acpt.rb', line 13 def config @config end |
Class Method Details
.print_config(options, command: :cem_acpt, format: :yaml) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/cem_acpt.rb', line 15 def print_config(, command: :cem_acpt, format: :yaml) config = new_config(, command: command) if format == :explain puts config.explain return end puts config.send("to_#{format}".to_sym) end |
.run(command, original_command, options) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/cem_acpt.rb', line 24 def run(command, original_command, ) set_up_signal_handlers case command when :version puts "#{original_command} v#{CemAcpt::VERSION}" when :print_yaml_config print_config(, command: original_command.to_sym, format: :yaml) when :print_explain_config print_config(, command: original_command.to_sym, format: :explain) when :cem_acpt trace_it([:trace], [:trace_events]) { run_cem_acpt() } when :cem_acpt_image trace_it([:trace], [:trace_events]) { run_cem_acpt_image() } else raise "Command #{command} does not exist" end end |