Skip to content

Commit

Permalink
Chefstyle fixes for the latest release
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 committed Apr 29, 2021
1 parent 1cb17cf commit d076258
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion knife-google.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$:.push File.expand_path("../lib", __FILE__)
$:.push File.expand_path("lib", __dir__)
require "knife-google/version"

Gem::Specification.new do |s|
Expand Down
3 changes: 1 addition & 2 deletions lib/chef/knife/cloud/google_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,7 @@ def image_alias_url(image_alias)

latest_image = connection.list_images(image_project).items
.select { |image| image.name.start_with?(image_prefix) }
.sort_by(&:name)
.last
.max_by(&:name)

return if latest_image.nil?

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/knife/google_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def validate_params!
def before_bootstrap
super

config[:chef_node_name] = config[:chef_node_name] ? config[:chef_node_name] : instance_name
config[:chef_node_name] = config[:chef_node_name] || instance_name
config[:bootstrap_ip_address] = ip_address_for_bootstrap

if config[:image_os_type] == "windows"
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$:.unshift File.expand_path("../../lib", __FILE__)
$:.unshift File.expand_path("../lib", __dir__)
require "chef"
require "chef/knife"
require "chef/knife/cloud/google_service_helpers"
Expand Down

0 comments on commit d076258

Please sign in to comment.