Module: CemAcpt
- Extended by:
- Logging
- Defined in:
- lib/cem_acpt.rb,
lib/cem_acpt/goss.rb,
lib/cem_acpt/utils.rb,
lib/cem_acpt/config.rb,
lib/cem_acpt/logging.rb,
lib/cem_acpt/version.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/test_runner.rb,
lib/cem_acpt/utils/puppet.rb,
lib/cem_acpt/puppet_helpers.rb,
lib/cem_acpt/utils/terminal.rb,
lib/cem_acpt/logging/formatter.rb,
lib/cem_acpt/image_name_builder.rb,
lib/cem_acpt/provision/terraform.rb,
lib/cem_acpt/goss/api/action_response.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/goss_action_response.rb
Defined Under Namespace
Modules: CoreExtensions, Goss, Logging, Platform, Provision, PuppetHelpers, TestData, TestRunner, Utils Classes: Config, ImageNameBuilder
Constant Summary collapse
- VERSION =
'0.6.1'
Constants included from Logging
Class Attribute Summary collapse
-
.config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
- .print_config(options, format: :yaml) ⇒ Object
- .run(options) ⇒ Object
- .version(as_str: false) ⇒ 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
Class Attribute Details
.config ⇒ Object (readonly)
Returns the value of attribute config.
12 13 14 |
# File 'lib/cem_acpt.rb', line 12 def config @config end |
Class Method Details
.print_config(options, format: :yaml) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/cem_acpt.rb', line 20 def print_config(, format: :yaml) config = new_config() if format == :explain puts config.explain return end puts config.send("to_#{format}".to_sym) end |
.run(options) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/cem_acpt.rb', line 29 def run() # Set up config, logger, and helper @config = new_config() initialize_logger! runner = new_runner # Set up signal handlers Signal.trap('INT') do @trap_context = true logger.trap_context = @trap_context logger.fatal('Signal Handler') { 'Received interrupt signal. Cleaning up test suite...' } runner.clean_up(@trap_context) logger.fatal('Signal Handler') { 'Exiting due to interrupt signal' } exit 1 end # Run the test suite runner.run exit runner.exit_code end |