Skip to content

Commit 3e4a916

Browse files
committed
Correct Layout/HashAlignment
1 parent 476d0db commit 3e4a916

File tree

2 files changed

+27
-37
lines changed

2 files changed

+27
-37
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 27
10-
# This cop supports safe autocorrection (--autocorrect).
11-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
12-
# SupportedHashRocketStyles: key, separator, table
13-
# SupportedColonStyles: key, separator, table
14-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
15-
Layout/HashAlignment:
16-
Exclude:
17-
- 'spec/unit/puppet_x/dsc_lite/powershell_hash_formatter_spec.rb'
18-
199
# Offense count: 7
2010
# This cop supports safe autocorrection (--autocorrect).
2111
Layout/HeredocIndentation:

spec/unit/puppet_x/dsc_lite/powershell_hash_formatter_spec.rb

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
HERE
4343

4444
result = formatter.format('ensure' => 'Present',
45-
'name' => 'foo',
46-
'state' => 'Started',
47-
'physicalpath' => 'c:/inetpub/wwwroot',
45+
'name' => 'foo',
46+
'state' => 'Started',
47+
'physicalpath' => 'c:/inetpub/wwwroot',
4848
'bindinginfo' => {
49-
'dsc_type' => 'MSFT_xWebBindingInformation[]',
49+
'dsc_type' => 'MSFT_xWebBindingInformation[]',
5050
'dsc_properties' => {
5151
'protocol' => 'HTTP',
5252
'port' => 80
@@ -73,11 +73,11 @@
7373
HERE
7474

7575
result = formatter.format('ensure' => 'Present',
76-
'name' => 'foo',
77-
'state' => 'Started',
78-
'physicalpath' => 'c:/inetpub/wwwroot',
76+
'name' => 'foo',
77+
'state' => 'Started',
78+
'physicalpath' => 'c:/inetpub/wwwroot',
7979
'authenticationinfo' => {
80-
'dsc_type' => 'MSFT_xWebAuthenticationInformation',
80+
'dsc_type' => 'MSFT_xWebAuthenticationInformation',
8181
'dsc_properties' => {
8282
'anonymous' => true,
8383
'basic' => false,
@@ -113,21 +113,21 @@
113113
HERE
114114

115115
result = formatter.format('ensure' => 'Present',
116-
'name' => 'foo',
117-
'state' => 'Started',
116+
'name' => 'foo',
117+
'state' => 'Started',
118118
'physicalpath' => 'c:/inetpub/wwwroot',
119-
'bindinginfo' => {
120-
'dsc_type' => 'MSFT_xWebBindingInformation[]',
119+
'bindinginfo' => {
120+
'dsc_type' => 'MSFT_xWebBindingInformation[]',
121121
'dsc_properties' => [
122122
{
123123
'protocol' => 'HTTP',
124-
'port' => 80
124+
'port' => 80
125125
},
126126
{
127-
'protocol' => 'HTTPS',
128-
'port' => 443,
127+
'protocol' => 'HTTPS',
128+
'port' => 443,
129129
'certificatethumbprint' => '5438DC0CB31B1C91B8945C7D91B3338F9C08BEFA',
130-
'certificatestorename' => 'My',
130+
'certificatestorename' => 'My',
131131
'ipaddress' => '*'
132132
},
133133
]
@@ -152,16 +152,16 @@
152152
HERE
153153
result = formatter.format('username' => 'jane-doe',
154154
'description' => 'Jane Doe user',
155-
'ensure' => 'present',
156-
'password' => {
155+
'ensure' => 'present',
156+
'password' => {
157157
'dsc_type' => 'MSFT_Credential',
158158
'dsc_properties' => {
159-
'user' => 'jane-doe',
159+
'user' => 'jane-doe',
160160
'password' => 'jane-password'
161161
}
162162
},
163163
'passwordneverexpires' => false,
164-
'disabled' => true)
164+
'disabled' => true)
165165
expect(result).to eq expected.strip
166166
end
167167

@@ -177,9 +177,9 @@
177177
}
178178
HERE
179179
result = formatter.format('destinationPath' => "c:\fileName.jpg",
180-
'uri' => 'http://www.contoso.com/image.jpg',
181-
'userAgent' => '[Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer',
182-
'headers' => {
180+
'uri' => 'http://www.contoso.com/image.jpg',
181+
'userAgent' => '[Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer',
182+
'headers' => {
183183
'Accept-Language' => 'en-US'
184184
})
185185
expect(result).to eq expected.strip
@@ -202,16 +202,16 @@
202202
sensitive_pass = Puppet::Pops::Types::PSensitiveType::Sensitive.new('password')
203203
result = formatter.format('username' => 'jane-doe',
204204
'description' => 'Jane Doe user',
205-
'ensure' => 'present',
206-
'password' => {
205+
'ensure' => 'present',
206+
'password' => {
207207
'dsc_type' => 'MSFT_Credential',
208208
'dsc_properties' => {
209-
'user' => 'jane-doe',
209+
'user' => 'jane-doe',
210210
'password' => sensitive_pass
211211
}
212212
},
213213
'passwordneverexpires' => false,
214-
'disabled' => true)
214+
'disabled' => true)
215215
expect(result).to eq expected.strip
216216
end
217217
end

0 commit comments

Comments
 (0)