diff --git a/Gemfile b/Gemfile index 990a6c8..812a9d5 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gemspec gem 'kitchen-docker', '~> 2.6.0' gem 'rake', '~> 10.4.2' gem 'rspec', '~> 3.3.0' -gem 'rubocop', '~> 0.34' +gem 'rubocop', '~> 0.49' gem 'simplecov', '~> 0.10' # group :integration do diff --git a/lib/kitchen/provisioner/puppet_bolt.rb b/lib/kitchen/provisioner/puppet_bolt.rb index e9bfd0f..6685853 100644 --- a/lib/kitchen/provisioner/puppet_bolt.rb +++ b/lib/kitchen/provisioner/puppet_bolt.rb @@ -24,7 +24,6 @@ require 'kitchen' module Kitchen - module Configurable def platform_name instance.platform.name @@ -36,38 +35,30 @@ module Provisioner # Puppet Bolt provisioner. # class PuppetBolt < Base -# attr_accessor :tmp_dir + attr_accessor :tmp_dir default_config :bolt_version, nil - default_config :require_bolt_repo, true default_config :remove_bolt_repo, false - default_config :custom_install_command, nil default_config :custom_pre_install_command, nil default_config :custom_pre_bolt_command, nil default_config :custom_post_bolt_command, nil - default_config :require_bolt_omnibus, false - default_config :bolt_commands, [] default_config :platform, &:platform_name - default_config :http_proxy, nil default_config :https_proxy, nil default_config :no_proxy, nil - - # for future use - default_config :bolt_cmd, nil # bolt command run , bolt script run, bolt task run, bolt plan run, bolt file upload default_config :bolt_nodes, nil # REQUIRED default_config :bolt_user, nil # BOLT_USER env variable default_config :bolt_password, nil default_config :bolt_modulepath, [] # Required for tasks and plans. The path to the module containing the task. Separate multiple paths with a semicolon (;) on Windows or a colon (:) on all other platforms. - default_config :bolt_params,nil - default_config :bolt_tty,false - default_config :bolt_insecure,true + default_config :bolt_params, nil + default_config :bolt_tty, false + default_config :bolt_insecure, true default_config :bolt_transport, nil # Install the dependencies for your platform. @@ -193,7 +184,7 @@ def install_bolt end def init_command - debug("Init Command") + debug('Init Command') end def create_sandbox @@ -236,10 +227,8 @@ def run_command protected def bolt_commands_to_run - bolt_commands_to_run = [] - if config[:bolt_commands] - bolt_commands_to_run = config[:bolt_commands].is_a?(Array) ? config[:bolt_commands] : [config[:bolt_commands]] - end + [] + config[:bolt_commands].is_a?(Array) ? config[:bolt_commands] : [config[:bolt_commands]] if config[:bolt_commands] end def bolt_platform