Skip to content

Commit

Permalink
RuboCop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad committed Jun 9, 2014
1 parent 1ee6309 commit 9af6aef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ def dockercfg_parse_auth(str)
if decoded_str
auth = {}
auth['username'], auth['password'] = decoded_str.split(':')
auth
return auth
end
nil
end

def timeout
Expand Down
15 changes: 7 additions & 8 deletions providers/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,14 @@ def docker_containers
lines[1, lines.length].map do |line|
ps = { 'line' => line }
[:id, :image, :command, :created, :status, :ports, :names].each do |name|
if ranges.key?(name)
start = ranges[name][0]
if ranges[name].length == 2
finish = ranges[name][1]
else
finish = line.length
end
ps[name.to_s] = line[start..finish - 1].strip
next unless ranges.key?(name)
start = ranges[name][0]
if ranges[name].length == 2
finish = ranges[name][1]
else
finish = line.length
end
ps[name.to_s] = line[start..finish - 1].strip
end
ps
end
Expand Down

0 comments on commit 9af6aef

Please sign in to comment.