Skip to content

Commit a763d24

Browse files
committed
Layout/HashAlignment
This commit enables the Rubocop Layout/HashAlignment cop and addresses all offenses.
1 parent 6febfd7 commit a763d24

File tree

101 files changed

+1407
-1282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1407
-1282
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ I18n/GetText/DecorateStringFormattingUsingPercent:
2222
I18n/RailsI18n/DecorateString:
2323
Enabled: false
2424

25-
# This cop supports safe auto-correction (--auto-correct).
26-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
27-
# SupportedHashRocketStyles: key, separator, table
28-
# SupportedColonStyles: key, separator, table
29-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
30-
Layout/HashAlignment:
31-
Enabled: false
32-
3325
# This cop supports safe auto-correction (--auto-correct).
3426
Layout/HeredocIndentation:
3527
Enabled: false

ext/windows/service/daemon.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def report_windows_event(type,id,message)
146146
eventlog = nil
147147
eventlog = Puppet::Util::Windows::EventLog.open("Puppet")
148148
eventlog.report_event(
149-
:event_type => type, # EVENTLOG_ERROR_TYPE, etc
150-
:event_id => id, # 0x01 or 0x02, 0x03 etc.
151-
:data => message # "the message"
149+
:event_type => type, # EVENTLOG_ERROR_TYPE, etc
150+
:event_id => id, # 0x01 or 0x02, 0x03 etc.
151+
:data => message # "the message"
152152
)
153153
rescue Exception
154154
# Ignore all errors

lib/puppet/application.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ def configure_indirector_routes
504504
def log_runtime_environment(extra_info=nil)
505505
runtime_info = {
506506
'puppet_version' => Puppet.version,
507-
'ruby_version' => RUBY_VERSION,
508-
'run_mode' => self.class.run_mode.name
507+
'ruby_version' => RUBY_VERSION,
508+
'run_mode' => self.class.run_mode.name
509509
}
510510
unless Puppet::Util::Platform.jruby_fips?
511511
runtime_info['openssl_version'] = "'#{OpenSSL::OPENSSL_VERSION}'"

lib/puppet/application/agent.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class Puppet::Application::Agent < Puppet::Application
1313
def app_defaults
1414
super.merge({
1515
:catalog_terminus => :rest,
16-
:catalog_cache_terminus => :json,
17-
:node_terminus => :rest,
18-
:facts_terminus => :facter,
16+
:catalog_cache_terminus => :json,
17+
:node_terminus => :rest,
18+
:facts_terminus => :facter,
1919
})
2020
end
2121

lib/puppet/application/apply.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def help
173173
def app_defaults
174174
super.merge({
175175
:default_file_terminus => :file_server,
176-
:write_catalog_summary => false
176+
:write_catalog_summary => false
177177
})
178178
end
179179

lib/puppet/application/device.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class Puppet::Application::Device < Puppet::Application
1313
def app_defaults
1414
super.merge({
1515
:catalog_terminus => :rest,
16-
:catalog_cache_terminus => :json,
17-
:node_terminus => :rest,
18-
:facts_terminus => :network_device,
16+
:catalog_cache_terminus => :json,
17+
:node_terminus => :rest,
18+
:facts_terminus => :network_device,
1919
})
2020
end
2121

lib/puppet/application/lookup.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ def main
293293

294294
if merge == 'deep'
295295
merge_options = {'strategy' => 'deep',
296-
'sort_merged_arrays' => !options[:sort_merged_arrays].nil?,
297-
'merge_hash_arrays' => !options[:merge_hash_arrays].nil?}
296+
'sort_merged_arrays' => !options[:sort_merged_arrays].nil?,
297+
'merge_hash_arrays' => !options[:merge_hash_arrays].nil?}
298298

299299
if options[:prefix]
300300
merge_options['knockout_prefix'] = options[:prefix]

lib/puppet/application/ssl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def clean(certname)
286286

287287
paths = {
288288
'private key' => Puppet[:hostprivkey],
289-
'public key' => Puppet[:hostpubkey],
289+
'public key' => Puppet[:hostpubkey],
290290
'certificate request' => Puppet[:hostcsr],
291291
'certificate' => Puppet[:hostcert],
292292
'private key password file' => Puppet[:passfile]

lib/puppet/configurer.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ def resubmit_facts
670670

671671
Puppet.info(_("Uploading facts for %{node} to %{server}") % {
672672
node: facts.name,
673-
server: puppet.url.hostname})
673+
server: puppet.url.hostname})
674674

675675
puppet.put_facts(facts.name, facts: facts, environment: Puppet.lookup(:current_environment).name.to_s)
676676

@@ -714,7 +714,7 @@ def retrieve_catalog_from_cache(query_options)
714714
Puppet[:node_name_value],
715715
query_options.merge(
716716
:ignore_terminus => true,
717-
:environment => Puppet::Node::Environment.remote(@environment)
717+
:environment => Puppet::Node::Environment.remote(@environment)
718718
)
719719
)
720720
end
@@ -730,12 +730,12 @@ def retrieve_new_catalog(facts, query_options)
730730
result = Puppet::Resource::Catalog.indirection.find(
731731
Puppet[:node_name_value],
732732
query_options.merge(
733-
:ignore_cache => true,
733+
:ignore_cache => true,
734734
# don't update cache until after environment converges
735735
:ignore_cache_save => true,
736-
:environment => Puppet::Node::Environment.remote(@environment),
736+
:environment => Puppet::Node::Environment.remote(@environment),
737737
:check_environment => true,
738-
:fail_on_404 => true,
738+
:fail_on_404 => true,
739739
:facts_for_catalog => facts
740740
)
741741
)

lib/puppet/data_binding.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Puppet::DataBinding
88
extend Puppet::Indirector
99

1010
indirects(:data_binding, :terminus_setting => :data_binding_terminus,
11-
:doc => "Where to find external data bindings.")
11+
:doc => "Where to find external data bindings.")
1212

1313
class LookupError < Puppet::PreformattedError; end
1414

0 commit comments

Comments
 (0)