summaryrefslogtreecommitdiff
path: root/lib/chef/provider/mount/mount.rb
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/provider/mount/mount.rb
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/provider/mount/mount.rb')
-rw-r--r--lib/chef/provider/mount/mount.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/provider/mount/mount.rb b/lib/chef/provider/mount/mount.rb
index 0daacbf96d..f8b8684a1b 100644
--- a/lib/chef/provider/mount/mount.rb
+++ b/lib/chef/provider/mount/mount.rb
@@ -170,7 +170,7 @@ class Chef
found = false
::File.readlines("/etc/fstab").reverse_each do |line|
if !found && line =~ /^#{device_fstab_regex}\s+#{Regexp.escape(@new_resource.mount_point)}\s/
- found = true
+ found = true
Chef::Log.debug("#{@new_resource} is removed from fstab")
next
else
@@ -179,7 +179,7 @@ class Chef
end
::File.open("/etc/fstab", "w") do |fstab|
- contents.reverse_each { |line| fstab.puts line}
+ contents.reverse_each { |line| fstab.puts line }
end
else
Chef::Log.debug("#{@new_resource} is not enabled - nothing to do")
@@ -237,13 +237,13 @@ class Chef
def device_mount_regex
if network_device?
# ignore trailing slash
- Regexp.escape(device_real)+"/?"
+ Regexp.escape(device_real) + "/?"
elsif ::File.symlink?(device_real)
# This regular expression tries to match device_real. If that does not match it will try to match the target of device_real.
# So given a symlink like this:
# /dev/mapper/vgroot-tmp.vol -> /dev/dm-9
# First it will try to match "/dev/mapper/vgroot-tmp.vol". If there is no match it will try matching for "/dev/dm-9".
- "(?:#{Regexp.escape(device_real)}|#{Regexp.escape(::File.expand_path(::File.readlink(device_real),::File.dirname(device_real)))})"
+ "(?:#{Regexp.escape(device_real)}|#{Regexp.escape(::File.expand_path(::File.readlink(device_real), ::File.dirname(device_real)))})"
else
Regexp.escape(device_real)
end