Skip to content

Commit fa3f4e6

Browse files
(PA-7815) Rubocop changes for pdk template 3.5.1
1 parent 54becc0 commit fa3f4e6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/puppet/provider/zone/solaris.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def exec_cmd(var)
142142
# entire pipeline
143143
out = execute("echo \"#{var[:input]}\" | #{var[:cmd]}", failonfail: false, combine: true)
144144
st = $CHILD_STATUS.exitstatus
145-
{ out: out, exit: st }
145+
{ out:, exit: st }
146146
end
147147

148148
# Clear out the cached values.

lib/puppet/type/zone.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def sync
118118
# everything between it and us.
119119
self.class.state_sequence(retrieve, should).each do |state|
120120
method = state[direction]
121-
raise Puppet::DevError, _('Cannot move %{direction} from %{name}') % { direction: direction, name: st[:name] } unless method
121+
raise Puppet::DevError, _('Cannot move %{direction} from %{name}') % { direction:, name: st[:name] } unless method
122122
provider_sync_send(method)
123123
end
124124

@@ -323,12 +323,12 @@ def insync?(is)
323323
def validate_ip(ip, name)
324324
IPAddr.new(ip) if ip
325325
rescue ArgumentError
326-
raise Puppet::Error, _("'%{ip}' is an invalid %{name}") % { ip: ip, name: name }, $ERROR_INFO
326+
raise Puppet::Error, _("'%{ip}' is an invalid %{name}") % ({ ip:, name: }), $ERROR_INFO
327327
end
328328

329329
def validate_exclusive(interface, address, _router)
330330
return if !interface.nil? && address.nil?
331-
fail _('only interface may be specified when using exclusive IP stack: %{interface}:%{address}') % { interface: interface, address: address }
331+
fail _('only interface may be specified when using exclusive IP stack: %{interface}:%{address}') % ({ interface:, address: })
332332
end
333333

334334
def validate_shared(interface, address, router)

spec/spec_helper_acceptance.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def run_puppet_install_helper
2222

2323
agent_sha = ENV['BEAKER_PUPPET_AGENT_SHA'] || ENV['PUPPET_AGENT_SHA']
2424
if agent_sha.nil? || agent_sha.empty?
25-
install_puppet_agent_on(hosts, options.merge(version: version))
25+
install_puppet_agent_on(hosts, options.merge(version:))
2626
else
2727
# If we have a development sha, assume we're testing internally
2828
dev_builds_url = ENV['DEV_BUILDS_URL'] || 'http://builds.delivery.puppetlabs.net'

spec/unit/provider/zone/solaris_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
iptype = instance_double 'Puppet::Property'
1717
allow(iptype).to receive(:name).and_return(:iptype)
1818
allow(iptype).to receive(:safe_insync?).with(iptype).and_return(false)
19-
allow(provider).to receive(:properties).and_return(iptype: iptype)
19+
allow(provider).to receive(:properties).and_return(iptype:)
2020
allow(resource).to receive(:properties).and_return([iptype])
2121
resource[:create_args] = 'create_args'
2222
expect(provider).to receive(:setconfig).with("create -b create_args\nset ip-type=shared")

0 commit comments

Comments
 (0)