Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
require:
- chefstyle
- cookstyle

AllCops:
TargetRubyVersion: 3.1
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ group :debug do
gem "pry"
end

group :chefstyle do
gem "chefstyle", "2.2.3"
group :cookstyle do
gem "cookstyle"
end
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions lib/kitchen/driver/openstack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down