Skip to content

Commit aa8ef9d

Browse files
(PA-7815) rubocop updates
1 parent 1e2670b commit aa8ef9d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/puppet/type/ssh_authorized_key.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ module Puppet
8888
the `name` attribute/resource title."
8989

9090
validate do |value|
91-
raise Puppet::Error, _('Key must not contain whitespace: %{value}') % { value: value } if %r{\s}.match?(value)
91+
raise Puppet::Error, _('Key must not contain whitespace: %{value}') % ({ value: }) if %r{\s}.match?(value)
9292
end
9393
end
9494

@@ -144,7 +144,7 @@ def insync?(is)
144144
unless value == :absent || value =~ %r{^[-a-z0-9A-Z_]+(?:=\".*?\")?$}
145145
raise(
146146
Puppet::Error,
147-
_("Option %{value} is not valid. A single option must either be of the form 'option' or 'option=\"value\"'. Multiple options must be provided as an array") % { value: value },
147+
_("Option %{value} is not valid. A single option must either be of the form 'option' or 'option=\"value\"'. Multiple options must be provided as an array") % { value: },
148148
)
149149
end
150150
end
@@ -171,7 +171,7 @@ def insync?(is)
171171
172172
173173
174-
[email protected]|[email protected])\s+([^ ]+)\s*(.*)$}x.freeze
174+
175175
def self.keyline_regex
176176
REGEX
177177
end

lib/puppet/type/sshkey.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def self.title_patterns
6060
6161
* Key headers, such as 'ssh-rsa' --- put these in the `type` attribute."
6262
validate do |value|
63-
raise Puppet::Error, _('Key must contain neither leading nor trailing whitespace: %{value}') % { value: value } if %r{^\s|\s$}.match?(value)
63+
raise Puppet::Error, _('Key must contain neither leading nor trailing whitespace: %{value}') % ({ value: }) if %r{^\s|\s$}.match?(value)
6464
end
6565
end
6666

spec/spec_helper_acceptance.rb

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

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

0 commit comments

Comments
 (0)