diff --git a/.rubocop.yml b/.rubocop.yml index 8fd406e..df528bf 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,6 @@ --- require: - - chefstyle + - cookstyle AllCops: TargetRubyVersion: 3.1 diff --git a/Gemfile b/Gemfile index c29f133..c441101 100644 --- a/Gemfile +++ b/Gemfile @@ -16,6 +16,6 @@ group :debug do gem "pry" end -group :chefstyle do - gem "chefstyle", "2.2.3" +group :cookstyle do + gem "cookstyle" end diff --git a/Rakefile b/Rakefile index 982e39d..d75e210 100644 --- a/Rakefile +++ b/Rakefile @@ -15,13 +15,13 @@ task :stats do end begin - require "chefstyle" + require "cookstyle" require "rubocop/rake_task" RuboCop::RakeTask.new(:style) do |task| - task.options += ["--display-cop-names", "--no-color"] + task.options += ["--chefstyle", "--display-cop-names", "--no-color"] end rescue LoadError - puts "chefstyle is not available. gem install chefstyle to do style checking." + puts "cookstyle is not available. gem install cookstyle to do style checking." end desc "Run all quality tasks" diff --git a/lib/kitchen/driver/openstack.rb b/lib/kitchen/driver/openstack.rb index 1365b46..ac53857 100755 --- a/lib/kitchen/driver/openstack.rb +++ b/lib/kitchen/driver/openstack.rb @@ -178,12 +178,12 @@ def create_server raise(ActionFailed, "Cannot specify both network_ref and network_id") if config[:network_id] && config[:network_ref] if config[:network_id] - networks = [].concat([config[:network_id]]) + networks = [].push(config[:network_id]) server_def[:nics] = networks.flatten.map do |net_id| { "net_id" => net_id } end elsif config[:network_ref] - networks = [].concat([config[:network_ref]]) + networks = [].push(config[:network_ref]) server_def[:nics] = networks.flatten.map do |net| { "net_id" => find_network(net).id } end