Skip to content

Commit a43d2e0

Browse files
committed
make rubocop a bit happier
1 parent e8ebb05 commit a43d2e0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/puppet/provider/package/openbsd.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def latest
6969
query = @resource[:name] + "--"
7070
end
7171

72-
output = Puppet::Util.withenv({}) {pkginfo "-Q", query}
72+
output = Puppet::Util.withenv({}) { pkginfo "-Q", query }
7373

7474
if output.nil? or output.size == 0 or output =~ /Error from /
7575
debug "Failed to query for #{resource[:name]}"
@@ -91,12 +91,12 @@ def latest
9191
return match[2]
9292
end
9393

94-
vcmp = properties[:ensure].split('.').map{|s|s.to_i} <=> match[2].split('.').map{|s|s.to_i}
94+
vcmp = properties[:ensure].split('.').map { |s|s.to_i } <=> match[2].split('.').map { |s|s.to_i }
9595
if vcmp > 0
9696
# The locally installed package may actually be newer than what a mirror
9797
# has. Log it at debug, but ignore it otherwise.
9898
debug "Package #{resource[:name]} #{properties[:ensure]} newer then available #{match[2]}"
99-
return properties[:ensure]
99+
properties[:ensure]
100100
else
101101
match[2]
102102
end
@@ -142,11 +142,11 @@ def get_full_name(latest = false)
142142
use_version = @resource[:ensure]
143143
else
144144
use_version = ''
145-
end
145+
end
146146
"#{resource[:name]}-#{use_version}-#{resource[:flavor]}"
147147
elsif resource[:name].to_s.match(/[a-z0-9]%[0-9a-z]/i)
148148
"#{resource[:name]}"
149-
elsif not latest
149+
elsif ! latest
150150
"#{resource[:name]}--"
151151
else
152152
# If :ensure contains a version, use that instead of looking it up.
@@ -168,7 +168,7 @@ def get_full_name(latest = false)
168168

169169
def get_version
170170
pkg_search_name = @resource[:name]
171-
unless pkg_search_name.match(/[a-z0-9]%[0-9a-z]/i) and not @resource[:flavor]
171+
unless pkg_search_name.match(/[a-z0-9]%[0-9a-z]/i) and ! @resource[:flavor]
172172
# we are only called when no flavor is specified
173173
# so append '--' to the :name to avoid patch versions on flavors
174174
pkg_search_name << "--"

0 commit comments

Comments
 (0)