Skip to content

Commit fc674de

Browse files
committed
Layout/FirstHashElementIndentation
This commit enables the Rubocop Layout/FirstHashElementIndentation cop and addresses all offenses.
1 parent 63147bb commit fc674de

33 files changed

+257
-263
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +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: EnforcedStyle, IndentationWidth.
27-
# SupportedStyles: special_inside_parentheses, consistent, align_braces
28-
Layout/FirstHashElementIndentation:
29-
Enabled: false
30-
3125
# This cop supports safe auto-correction (--auto-correct).
3226
# Configuration parameters: EnforcedStyle, IndentationWidth.
3327
# SupportedStyles: consistent, align_parentheses

lib/puppet/application/agent.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class Puppet::Application::Agent < Puppet::Application
1212

1313
def app_defaults
1414
super.merge({
15-
:catalog_terminus => :rest,
15+
:catalog_terminus => :rest,
1616
:catalog_cache_terminus => :json,
1717
:node_terminus => :rest,
1818
:facts_terminus => :facter,
19-
})
19+
})
2020
end
2121

2222
def preinit

lib/puppet/application/apply.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ def help
172172

173173
def app_defaults
174174
super.merge({
175-
:default_file_terminus => :file_server,
175+
:default_file_terminus => :file_server,
176176
:write_catalog_summary => false
177-
})
177+
})
178178
end
179179

180180
def run_command

lib/puppet/application/device.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class Puppet::Application::Device < Puppet::Application
1212

1313
def app_defaults
1414
super.merge({
15-
:catalog_terminus => :rest,
15+
:catalog_terminus => :rest,
1616
:catalog_cache_terminus => :json,
1717
:node_terminus => :rest,
1818
:facts_terminus => :network_device,
19-
})
19+
})
2020
end
2121

2222
def preinit

lib/puppet/application/lookup.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ class Puppet::Application::Lookup < Puppet::Application
6161

6262
def app_defaults
6363
super.merge({
64-
:facts_terminus => 'yaml'
65-
})
64+
:facts_terminus => 'yaml'
65+
})
6666
end
6767

6868
def setup_logs

lib/puppet/application/script.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def help
114114

115115
def app_defaults
116116
super.merge({
117-
:default_file_terminus => :file_server,
118-
})
117+
:default_file_terminus => :file_server,
118+
})
119119
end
120120

121121
def run_command

lib/puppet/configurer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def resubmit_facts
669669
puppet = session.route_to(:puppet)
670670

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

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

lib/puppet/face/facts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
puppet = session.route_to(:puppet)
7878

7979
Puppet.notice(_("Uploading facts for '%{node}' to '%{server}'") % {
80-
node: Puppet[:node_name_value],
80+
node: Puppet[:node_name_value],
8181
server: puppet.url.hostname})
8282

8383
puppet.put_facts(Puppet[:node_name_value], facts: facts, environment: Puppet.lookup(:current_environment).name.to_s)

lib/puppet/functions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def internal_type_parse(type_string, loader)
595595
Puppet::Pops::Types::TypeParser.singleton.parse(type_string, loader)
596596
rescue StandardError => e
597597
raise ArgumentError, _("Parsing of type string '\"%{type_string}\"' failed with message: <%{message}>.\n") % {
598-
type_string: type_string,
598+
type_string: type_string,
599599
message: e.message
600600
}
601601
end
@@ -640,7 +640,7 @@ def type(assignment_string)
640640
assignment_string: assignment_string,
641641
message: e.message,
642642
ruby_file_location: rb_location
643-
}
643+
}
644644
end
645645
unless result.body.kind_of?(Puppet::Pops::Model::TypeAlias)
646646
rb_location = rb_location.gsub(/:in.*$/, '')

lib/puppet/http/service/compiler.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ def get_filebucket_file(path, environment:, bucket_path: nil, diff_with: nil, li
308308
# @api public
309309
def put_filebucket_file(path, body:, environment:)
310310
headers = add_puppet_headers({
311-
'Accept' => 'application/octet-stream',
311+
'Accept' => 'application/octet-stream',
312312
'Content-Type' => 'application/octet-stream'
313-
})
313+
})
314314

315315
response = @client.put(
316316
with_base_url("/file_bucket_file/#{path}"),

0 commit comments

Comments
 (0)