module Kitchen::Terraform::Configurable
Refinements to Kitchen::Configurable. This class implements the interface of Kitchen::Configurable which requires the following Reek suppressions: :reek: MissingSafeMethod { exclude: [ finalize_config! ] } @see github.com/test-kitchen/test-kitchen/blob/v1.16.0/lib/kitchen/configurable.rb Kitchen::Configurable
Attributes
version_requirement[RW]
workspace_name[RW]
Public Class Methods
included(configurable_class)
click to toggle source
A callback to define the plugin version which is invoked when this module is included in a plugin class.
@return [self]
# File lib/kitchen/terraform/configurable.rb, line 32 def self.included(configurable_class) ::Kitchen::Terraform::Version.assign_plugin_version configurable_class: configurable_class self end
Public Instance Methods
finalize_config!(instance)
click to toggle source
finalize_config!
invokes the super implementation and then defines the workspace name and version requirement.
@param instance [Kitchen::Instance] an associated instance. @raise [Kitchen::ClientError] if the instance is nil. @return [self] @see Kitchen::Configurable#finalize_config!
Calls superclass method
# File lib/kitchen/terraform/configurable.rb, line 43 def finalize_config!(instance) super instance self.version_requirement = ::Gem::Requirement.new ">= 0.11.4", "< 1.1.0" self.workspace_name = "kitchen-terraform-#{::Shellwords.escape instance.name}" end
Private Instance Methods
expand_paths!()
click to toggle source
Calls superclass method
# File lib/kitchen/terraform/configurable.rb, line 53 def expand_paths! validate_config! if !@validate_config_called super end
validate_config!()
click to toggle source
Calls superclass method
# File lib/kitchen/terraform/configurable.rb, line 58 def validate_config! @validate_config_called ||= true super end