summaryrefslogtreecommitdiff
path: root/lib/chef/monkey_patches
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
commit686113531d23f30e9973d659c456ae33eb9cff1f (patch)
treef225de7251a8b49b8d183dd168bab0a0addbe23f /lib/chef/monkey_patches
parentd1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff)
downloadchef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
Diffstat (limited to 'lib/chef/monkey_patches')
-rw-r--r--lib/chef/monkey_patches/net-ssh-multi.rb4
-rw-r--r--lib/chef/monkey_patches/net_http.rb2
-rw-r--r--lib/chef/monkey_patches/webrick-utils.rb4
-rw-r--r--lib/chef/monkey_patches/win32/registry.rb2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/monkey_patches/net-ssh-multi.rb b/lib/chef/monkey_patches/net-ssh-multi.rb
index dd4da6865f..b0d05a0b27 100644
--- a/lib/chef/monkey_patches/net-ssh-multi.rb
+++ b/lib/chef/monkey_patches/net-ssh-multi.rb
@@ -47,14 +47,14 @@ if Net::SSH::Multi::Version::STRING == "1.1.0" || Net::SSH::Multi::Version::STRI
# Make sure that server returns false if the ssh connection
# has failed.
- def busy?(include_invisible=false)
+ def busy?(include_invisible = false)
!failed? && session && session.busy?(include_invisible)
end
end
class Session
- def next_session(server, force=false) #:nodoc:
+ def next_session(server, force = false) #:nodoc:
# don't retry a failed attempt
return nil if server.failed?
diff --git a/lib/chef/monkey_patches/net_http.rb b/lib/chef/monkey_patches/net_http.rb
index 6aad6029c3..c1cb87bffd 100644
--- a/lib/chef/monkey_patches/net_http.rb
+++ b/lib/chef/monkey_patches/net_http.rb
@@ -21,7 +21,7 @@ module Net
end
end
-if Net::HTTP.instance_methods.map {|m| m.to_s}.include?("proxy_uri")
+if Net::HTTP.instance_methods.map { |m| m.to_s }.include?("proxy_uri")
begin
# Ruby 2.0 changes the way proxy support is implemented in Net::HTTP.
# The implementation does not work correctly with IPv6 literals because it
diff --git a/lib/chef/monkey_patches/webrick-utils.rb b/lib/chef/monkey_patches/webrick-utils.rb
index f7f2cf6ad4..ff275a434d 100644
--- a/lib/chef/monkey_patches/webrick-utils.rb
+++ b/lib/chef/monkey_patches/webrick-utils.rb
@@ -11,7 +11,7 @@ module WEBrick
# create_listeners on Windows with Ruby > 2.0.0 does not
# raise an error if we're already listening on a port.
#
- def create_listeners(address, port, logger=nil)
+ def create_listeners(address, port, logger = nil)
#
# utils.rb -- Miscellaneous utilities
#
@@ -40,7 +40,7 @@ module WEBrick
sockets << sock
rescue => ex
logger.warn("TCPServer Error: #{ex}") if logger
- last_error = ex
+ last_error = ex
end
}
raise last_error if sockets.empty?
diff --git a/lib/chef/monkey_patches/win32/registry.rb b/lib/chef/monkey_patches/win32/registry.rb
index b8b3fb6fdd..a9333bdb99 100644
--- a/lib/chef/monkey_patches/win32/registry.rb
+++ b/lib/chef/monkey_patches/win32/registry.rb
@@ -53,7 +53,7 @@ module Win32
when REG_SZ, REG_EXPAND_SZ
data = data.to_s.encode(WCHAR) + WCHAR_NUL
when REG_MULTI_SZ
- data = data.to_a.map {|s| s.encode(WCHAR)}.join(WCHAR_NUL) << WCHAR_NUL << WCHAR_NUL
+ data = data.to_a.map { |s| s.encode(WCHAR) }.join(WCHAR_NUL) << WCHAR_NUL << WCHAR_NUL
when REG_BINARY
data = data.to_s
when REG_DWORD