Skip to content

Commit b50d002

Browse files
committed
(CONT-786) Rubocop Auto Fixs 56-58
- Style/StringLiterals - Style/StringLiteralsInInterpolation - Style/TrailingCommaInHashLiteral
1 parent 736f36b commit b50d002

File tree

546 files changed

+2390
-2412
lines changed

Some content is hidden

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

546 files changed

+2390
-2412
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -223,32 +223,10 @@ Style/SpecialGlobalVars:
223223
Style/StringConcatenation:
224224
Enabled: false
225225

226-
# Offense count: 2228
227-
# This cop supports safe autocorrection (--autocorrect).
228-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
229-
# SupportedStyles: single_quotes, double_quotes
230-
Style/StringLiterals:
231-
Enabled: false
232-
233-
# Offense count: 1
234-
# This cop supports safe autocorrection (--autocorrect).
235-
# Configuration parameters: EnforcedStyle.
236-
# SupportedStyles: single_quotes, double_quotes
237-
Style/StringLiteralsInInterpolation:
238-
Exclude:
239-
- 'tooling/kube_tool/create_certs.rb'
240-
241226
# Offense count: 1
242227
# This cop supports unsafe autocorrection (--autocorrect-all).
243228
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
244229
# AllowedMethods: define_method
245230
Style/SymbolProc:
246231
Exclude:
247232
- 'spec/spec_helper_acceptance_local.rb'
248-
249-
# Offense count: 734
250-
# This cop supports safe autocorrection (--autocorrect).
251-
# Configuration parameters: EnforcedStyleForMultiline.
252-
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
253-
Style/TrailingCommaInHashLiteral:
254-
Enabled: false

spec/classes/cluster_roles_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
{
55
kernel: 'Linux',
66
networking: {
7-
hostname: 'foo',
7+
hostname: 'foo'
88
},
99
os: {
1010
family: 'Debian',
1111
name: 'Ubuntu',
1212
release: {
13-
full: '16.04',
13+
full: '16.04'
1414
},
1515
distro: {
16-
codename: 'xenial',
17-
},
16+
codename: 'xenial'
17+
}
1818
},
1919
ec2_metadata: {
20-
hostname: 'ip-10-10-10-1.ec2.internal',
21-
},
20+
hostname: 'ip-10-10-10-1.ec2.internal'
21+
}
2222
}
2323
end
2424

@@ -27,7 +27,7 @@
2727
let(:params) do
2828
{
2929
'controller' => true,
30-
'worker' => false,
30+
'worker' => false
3131
}
3232
end
3333

@@ -39,7 +39,7 @@
3939
let(:params) do
4040
{
4141
'controller' => false,
42-
'worker' => true,
42+
'worker' => true
4343
}
4444
end
4545

spec/classes/config/kubeadm_spec.rb

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
{
88
kernel: 'Linux',
99
networking: {
10-
hostname: 'foo',
10+
hostname: 'foo'
1111
},
1212
os: {
1313
family: 'Debian',
1414
name: 'Ubuntu',
1515
release: {
16-
full: '16.04',
16+
full: '16.04'
1717
},
1818
distro: {
19-
codename: 'xenial',
20-
},
19+
codename: 'xenial'
20+
}
2121
},
2222
ec2_metadata: {
23-
hostname: 'ip-10-10-10-1.ec2.internal',
24-
},
23+
hostname: 'ip-10-10-10-1.ec2.internal'
24+
}
2525
}
2626
end
2727

@@ -32,7 +32,7 @@
3232
'manage_etcd' => true,
3333
'kubeadm_extra_config' => { 'foo' => ['bar', 'baz'] },
3434
'kubelet_extra_config' => { 'baz' => ['bar', 'foo'] },
35-
'kubelet_extra_arguments' => ['foo'],
35+
'kubelet_extra_arguments' => ['foo']
3636
}
3737
end
3838

@@ -68,7 +68,7 @@
6868
'kubeadm_extra_config' => { 'foo' => ['bar', 'baz'] },
6969
'kubelet_extra_config' => { 'baz' => ['bar', 'foo'] },
7070
'kubelet_extra_arguments' => ['foo'],
71-
'etcd_listen_metric_urls' => 'http://0.0.0.0:2381',
71+
'etcd_listen_metric_urls' => 'http://0.0.0.0:2381'
7272
}
7373
end
7474

@@ -85,7 +85,7 @@
8585
'kubelet_extra_config' => { 'baz' => ['bar', 'foo'] },
8686
'kubelet_extra_arguments' => ['foo'],
8787
'delegated_pki' => true,
88-
'etcd_version' => '3.3.0',
88+
'etcd_version' => '3.3.0'
8989
}
9090
end
9191

@@ -122,7 +122,7 @@
122122
'manage_etcd' => false,
123123
'kubeadm_extra_config' => { 'foo' => ['bar', 'baz'] },
124124
'kubelet_extra_config' => { 'baz' => ['bar', 'foo'] },
125-
'kubelet_extra_arguments' => ['foo'],
125+
'kubelet_extra_arguments' => ['foo']
126126
}
127127
end
128128

@@ -157,7 +157,7 @@
157157
'kubelet_extra_config' => { 'baz' => ['bar', 'foo'] },
158158
'kubelet_extra_arguments' => ['foo'],
159159
'manage_etcd' => true,
160-
'etcd_version' => '3.3.0',
160+
'etcd_version' => '3.3.0'
161161
}
162162
end
163163

@@ -178,7 +178,7 @@
178178
'kubelet_extra_arguments' => ['foo'],
179179
'manage_etcd' => true,
180180
'etcd_version' => '3.3.0',
181-
'etcd_listen_metric_urls' => 'http://0.0.0.0:2381',
181+
'etcd_listen_metric_urls' => 'http://0.0.0.0:2381'
182182
}
183183
end
184184

@@ -196,7 +196,7 @@
196196
'manage_etcd' => true,
197197
'etcd_discovery_srv' => 'etcd-autodiscovery',
198198
'etcd_version' => '2.9.9',
199-
'etcd_data_dir' => '/var/lib/foo',
199+
'etcd_data_dir' => '/var/lib/foo'
200200
}
201201
end
202202

@@ -217,7 +217,7 @@
217217
'kubelet_extra_arguments' => ['foo'],
218218
'manage_etcd' => true,
219219
'etcd_discovery_srv' => 'etcd-autodiscovery',
220-
'etcd_version' => '2.9.9',
220+
'etcd_version' => '2.9.9'
221221
}
222222
end
223223

@@ -236,7 +236,7 @@
236236
'kubelet_extra_config' => { 'baz' => ['bar', 'foo'] },
237237
'kubelet_extra_arguments' => ['foo'],
238238
'manage_etcd' => true,
239-
'etcd_data_dir' => '/var/lib/bar',
239+
'etcd_data_dir' => '/var/lib/bar'
240240
}
241241
end
242242

@@ -254,7 +254,7 @@
254254
'node_name' => 'foo',
255255
'cloud_provider' => 'aws',
256256
'cloud_config' => :undef,
257-
'kubelet_extra_arguments' => ['foo: bar'],
257+
'kubelet_extra_arguments' => ['foo: bar']
258258
}
259259
end
260260

@@ -283,7 +283,7 @@
283283
'cgroup_driver' => 'systemd',
284284
'cloud_provider' => 'aws',
285285
'cloud_config' => '/etc/kubernetes/cloud.conf',
286-
'kubelet_extra_arguments' => ['foo: bar'],
286+
'kubelet_extra_arguments' => ['foo: bar']
287287
}
288288
end
289289

@@ -298,7 +298,7 @@
298298
let(:params) do
299299
{
300300
'kubernetes_version' => '1.12.3',
301-
'kubernetes_cluster_name' => 'my_own_name',
301+
'kubernetes_cluster_name' => 'my_own_name'
302302
}
303303
end
304304

@@ -312,7 +312,7 @@
312312
let(:params) do
313313
{
314314
'kubernetes_version' => '1.13.0',
315-
'kubernetes_cluster_name' => 'my_own_name',
315+
'kubernetes_cluster_name' => 'my_own_name'
316316
}
317317
end
318318

@@ -326,7 +326,7 @@
326326
let(:params) do
327327
{
328328
'kubernetes_version' => '1.14.1',
329-
'apiserver_extra_arguments' => ['foo', 'bar'],
329+
'apiserver_extra_arguments' => ['foo', 'bar']
330330
}
331331
end
332332

@@ -347,7 +347,7 @@
347347
let(:params) do
348348
{
349349
'kubernetes_version' => '1.14.1',
350-
'controllermanager_extra_arguments' => ['foo', 'bar'],
350+
'controllermanager_extra_arguments' => ['foo', 'bar']
351351
}
352352
end
353353

@@ -368,7 +368,7 @@
368368
let(:params) do
369369
{
370370
'kubernetes_version' => '1.14.1',
371-
'scheduler_extra_arguments' => ['foo', 'bar'],
371+
'scheduler_extra_arguments' => ['foo', 'bar']
372372
}
373373
end
374374

@@ -394,9 +394,9 @@
394394
'hostPath' => '/mnt',
395395
'mountPath' => '/data',
396396
'readOnly' => false,
397-
'pathType' => 'Directory',
398-
},
399-
},
397+
'pathType' => 'Directory'
398+
}
399+
}
400400
}
401401
end
402402

@@ -418,9 +418,9 @@
418418
'hostPath' => '/mnt',
419419
'mountPath' => '/data',
420420
'readOnly' => false,
421-
'pathType' => 'Directory',
422-
},
423-
},
421+
'pathType' => 'Directory'
422+
}
423+
}
424424
}
425425
end
426426

@@ -437,7 +437,7 @@
437437
let(:params) do
438438
{
439439
'kubernetes_version' => '1.14.1',
440-
'controller_address' => 'foo',
440+
'controller_address' => 'foo'
441441
}
442442
end
443443

@@ -454,7 +454,7 @@
454454
let(:params) do
455455
{
456456
'kubernetes_version' => '1.14.2',
457-
'proxy_mode' => 'ipvs',
457+
'proxy_mode' => 'ipvs'
458458
}
459459
end
460460

@@ -472,7 +472,7 @@
472472
{
473473
'kubernetes_version' => '1.14.2',
474474
'metrics_bind_address' => '0.0.0.0',
475-
'kube_api_bind_port' => 12_345,
475+
'kube_api_bind_port' => 12_345
476476
}
477477
end
478478

@@ -494,7 +494,7 @@
494494
{
495495
'kubernetes_version' => '1.16.3',
496496
'metrics_bind_address' => '0.0.0.0',
497-
'kube_api_bind_port' => 12_345,
497+
'kube_api_bind_port' => 12_345
498498
}
499499
end
500500

@@ -515,7 +515,7 @@
515515
let(:params) do
516516
{
517517
'kubernetes_version' => '1.14.2',
518-
'metrics_bind_address' => 'invalid',
518+
'metrics_bind_address' => 'invalid'
519519
}
520520
end
521521

@@ -529,7 +529,7 @@
529529
'conntrack_max_per_core' => 0,
530530
'conntrack_min' => 0,
531531
'conntrack_tcp_wait_timeout' => '0h0m0s',
532-
'conntrack_tcp_stablished_timeout' => '0h0m0s',
532+
'conntrack_tcp_stablished_timeout' => '0h0m0s'
533533
}
534534
end
535535

@@ -561,7 +561,7 @@
561561
'conntrack_max_per_core' => 0,
562562
'conntrack_min' => 0,
563563
'conntrack_tcp_wait_timeout' => '0h0m0s',
564-
'conntrack_tcp_stablished_timeout' => '0h0m0s',
564+
'conntrack_tcp_stablished_timeout' => '0h0m0s'
565565
}
566566
end
567567

@@ -589,7 +589,7 @@
589589
context 'set role control-plane' do
590590
let(:params) do
591591
{
592-
'kubernetes_version' => '1.20.0',
592+
'kubernetes_version' => '1.20.0'
593593
}
594594
end
595595

0 commit comments

Comments
 (0)