Skip to content

Commit 1d4fd1b

Browse files
committed
some more rubocop fixes
1 parent 61ca07e commit 1d4fd1b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/puppet/provider/package/openbsd.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def self.instances
3131
begin
3232
packages = listcmd
3333
packages.each { |package, value|
34-
if !package.empty?()
34+
unless package.empty?()
3535
value[:provider] = name
3636
final << new(value)
3737
end
@@ -64,7 +64,7 @@ def self.listcmd
6464
def install
6565
cmd = []
6666

67-
full_name = get_full_name(action = "install")
67+
full_name = get_full_name
6868

6969
cmd << '-r'
7070
cmd << install_options
@@ -78,7 +78,7 @@ def install
7878
end
7979
end
8080

81-
def get_full_name(action = "install")
81+
def get_full_name
8282
# In case of a real update (i.e., the package already exists) then
8383
# pkg_add(8) can handle the flavors. However, if we're actually
8484
# installing with 'latest', we do need to handle the flavors. This is
@@ -100,7 +100,6 @@ def get_full_name(action = "install")
100100
else
101101
"#{use_name}--#{use_branch}"
102102
end
103-
104103
end
105104

106105
def query
@@ -120,9 +119,9 @@ def uninstall_options
120119

121120
def uninstall(purge = false)
122121
if purge
123-
pkgdelete "-c", "-qq", uninstall_options.flatten.compact, get_full_name(action = "uninstall")
122+
pkgdelete "-c", "-qq", uninstall_options.flatten.compact, get_full_name
124123
else
125-
pkgdelete uninstall_options.flatten.compact, get_full_name(action = "uninstall")
124+
pkgdelete uninstall_options.flatten.compact, get_full_name
126125
end
127126
end
128127

0 commit comments

Comments
 (0)