Skip to content

Commit

Permalink
Fix a couple rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Fitzgerald committed Apr 17, 2015
1 parent 67d5b74 commit 4795dd9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/kitchen/driver/digitalocean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ def create(state)
sleep 8
droplet = client.droplets.find(id: state[:server_id])

break if droplet \
&& droplet.networks[:v4] \
&& droplet.networks[:v4].any? { |n| n[:type] == 'public' }
break if droplet && droplet.networks[:v4] && droplet.networks[:v4].any? { |n| n[:type] == 'public' }
end

state[:hostname] = droplet.networks[:v4]
.find { |n| n[:type] == 'public' }['ip_address']
.find { |n| n[:type] == 'public' }['ip_address']

wait_for_sshd(state[:hostname]); print "(ssh ready)\n"
debug("digitalocean:create #{state[:hostname]}")
Expand Down

0 comments on commit 4795dd9

Please sign in to comment.