Skip to content

Commit dda6596

Browse files
authored
fix: switch to cookstyle (#233)
* fix: switch to cookstyle Signed-off-by: Corey Hemminger <hemminger@hotmail.com> * Update .rubocop.yml to cookstyle Signed-off-by: Corey Hemminger <hemminger@hotmail.com> * Update Rakefile for cookstyle Signed-off-by: Corey Hemminger <hemminger@hotmail.com> * lint fixes Signed-off-by: Corey Hemminger <hemminger@hotmail.com> --------- Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
1 parent 0e6c746 commit dda6596

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
require:
3-
- chefstyle
3+
- cookstyle
44

55
AllCops:
66
TargetRubyVersion: 3.1

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ group :debug do
1616
gem "pry"
1717
end
1818

19-
group :chefstyle do
20-
gem "chefstyle", "2.2.3"
19+
group :cookstyle do
20+
gem "cookstyle"
2121
end

Rakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ task :stats do
1515
end
1616

1717
begin
18-
require "chefstyle"
18+
require "cookstyle"
1919
require "rubocop/rake_task"
2020
RuboCop::RakeTask.new(:style) do |task|
21-
task.options += ["--display-cop-names", "--no-color"]
21+
task.options += ["--chefstyle", "--display-cop-names", "--no-color"]
2222
end
2323
rescue LoadError
24-
puts "chefstyle is not available. gem install chefstyle to do style checking."
24+
puts "cookstyle is not available. gem install cookstyle to do style checking."
2525
end
2626

2727
desc "Run all quality tasks"

lib/kitchen/driver/openstack.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ def create_server
178178
raise(ActionFailed, "Cannot specify both network_ref and network_id") if config[:network_id] && config[:network_ref]
179179

180180
if config[:network_id]
181-
networks = [].concat([config[:network_id]])
181+
networks = [].push(config[:network_id])
182182
server_def[:nics] = networks.flatten.map do |net_id|
183183
{ "net_id" => net_id }
184184
end
185185
elsif config[:network_ref]
186-
networks = [].concat([config[:network_ref]])
186+
networks = [].push(config[:network_ref])
187187
server_def[:nics] = networks.flatten.map do |net|
188188
{ "net_id" => find_network(net).id }
189189
end

0 commit comments

Comments
 (0)