Skip to content

Commit 222fa7f

Browse files
jordanbreen28jordanbreen28
authored andcommitted
(CONT-971) - Correct Style/TrailingCommaInHashLiteral
1 parent 75b99a6 commit 222fa7f

File tree

11 files changed

+31
-48
lines changed

11 files changed

+31
-48
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -216,20 +216,3 @@ Style/OptionalBooleanParameter:
216216
- 'spec/spec_helper_acceptance_local.rb'
217217
- 'tests/beaker/lib/lvm_helper.rb'
218218

219-
220-
# Offense count: 31
221-
# This cop supports safe autocorrection (--autocorrect).
222-
# Configuration parameters: EnforcedStyleForMultiline.
223-
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
224-
Style/TrailingCommaInHashLiteral:
225-
Exclude:
226-
- 'lib/puppet/provider/filesystem/aix.rb'
227-
- 'spec/lib/helpers.rb'
228-
- 'spec/spec_helper.rb'
229-
- 'spec/unit/classes/lvm_spec.rb'
230-
- 'spec/unit/facter/logical_volumes_spec.rb'
231-
- 'spec/unit/facter/physical_volumes_spec.rb'
232-
- 'spec/unit/facter/volume_groups_spec.rb'
233-
- 'spec/unit/puppet/type/filesystem_spec.rb'
234-
- 'spec/unit/puppet/type/logical_volume_spec.rb'
235-
- 'tasks/ensure_pv.rb'

lib/puppet/provider/filesystem/aix.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def attribute_flag(pvalue)
6565
size: 'size',
6666
extended_attributes: 'ea',
6767
mount_options: 'options',
68-
encrypted: 'efs',
68+
encrypted: 'efs'
6969
}[pvalue] || pvalue.to_s
7070
end
7171

@@ -162,7 +162,7 @@ def attribute_flag(pvalue)
162162
size: 'size',
163163
extended_attributes: 'ea',
164164
mount_options: 'options',
165-
encrypted: 'efs',
165+
encrypted: 'efs'
166166
}[pvalue] || pvalue.to_s
167167
end
168168
end

spec/lib/helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Helpers
77
pv: :physical_volume,
88
lv: :logical_volume,
99
vg: :volume_group,
10-
fs: :filesystem,
10+
fs: :filesystem
1111
}.freeze
1212

1313
def self.included(obj)

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
default_facts = {
1515
puppetversion: Puppet.version,
16-
facterversion: Facter.version,
16+
facterversion: Facter.version
1717
}
1818

1919
default_fact_files = [

spec/unit/classes/lvm_spec.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
'backup' => {
2323
'size' => '5G',
2424
'mountpath' => '/var/backups',
25-
'mountpath_require' => false,
26-
},
27-
},
28-
},
29-
},
25+
'mountpath_require' => false
26+
}
27+
}
28+
}
29+
}
3030
}
3131
end
3232

@@ -66,11 +66,11 @@
6666
'size' => '5G',
6767
'mounted' => false,
6868
'mountpath' => '/mnt/not_mounted',
69-
'mountpath_require' => false,
70-
},
71-
},
72-
},
73-
},
69+
'mountpath_require' => false
70+
}
71+
}
72+
}
73+
}
7474
}
7575
end
7676

@@ -88,16 +88,16 @@
8888
'logical_volumes' => {
8989
'swap' => {
9090
'size' => '20G',
91-
'fs_type' => 'swap',
91+
'fs_type' => 'swap'
9292
},
9393
'swap2' => {
9494
'ensure' => 'absent',
9595
'size' => '20G',
96-
'fs_type' => 'swap',
97-
},
98-
},
99-
},
100-
},
96+
'fs_type' => 'swap'
97+
}
98+
}
99+
}
100+
}
101101
}
102102
end
103103

spec/unit/facter/logical_volumes_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
'role' => 'public',
5656
'active' => 'active',
5757
'size' => '800.00m',
58-
'permissions' => 'writeable',
58+
'permissions' => 'writeable'
5959
},
6060
'lame_tasks' => {
6161
'uuid' => 'gmNS3G-cAhA-vRj0-2Uf0-21yO-QVdy-LNXfBv',
@@ -67,7 +67,7 @@
6767
'role' => 'public',
6868
'active' => 'active',
6969
'size' => '400.00m',
70-
'permissions' => 'writeable',
70+
'permissions' => 'writeable'
7171
},
7272
'root' => {
7373
'uuid' => 'E7qan8-4NGf-jq2P-l11v-6fFe-MPHK-T6IGzl',
@@ -79,7 +79,7 @@
7979
'role' => 'public',
8080
'active' => 'active',
8181
'size' => '18.46g',
82-
'permissions' => 'writeable',
82+
'permissions' => 'writeable'
8383
},
8484
'swap' => {
8585
'uuid' => 'buUXDX-GDUh-rN2t-y80n-vtCt-xhhu-XSZ5kA',
@@ -91,7 +91,7 @@
9191
'role' => 'public',
9292
'active' => 'active',
9393
'size' => '1.00g',
94-
'permissions' => 'writeable',
94+
'permissions' => 'writeable'
9595
})
9696
end
9797
end

spec/unit/facter/physical_volumes_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
'mda_count' => '1',
5757
'mda_used_count' => '1',
5858
'ba_start' => '0',
59-
'ba_size' => '0',
59+
'ba_size' => '0'
6060
},
6161
'/dev/sdc' => {
6262
'uuid' => '09ksGm-Pt28-AR9H-NlgQ-QxtG-5uEH-Qzy1RR',
@@ -70,7 +70,7 @@
7070
'mda_count' => '1',
7171
'mda_used_count' => '1',
7272
'ba_start' => '0',
73-
'ba_size' => '0',
73+
'ba_size' => '0'
7474
},
7575
'/dev/sdd2' => {
7676
'uuid' => 'PpSFVZ-SS3P-n3a6-ctPF-sb9H-6M85-i0TqBv',
@@ -84,7 +84,7 @@
8484
'mda_count' => '1',
8585
'mda_used_count' => '1',
8686
'ba_start' => '0',
87-
'ba_size' => '0',
87+
'ba_size' => '0'
8888
})
8989
end
9090
end

spec/unit/facter/volume_groups_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
'permissions' => 'writeable',
5757
'allocation_policy' => 'normal',
5858
'size' => '3.99g',
59-
'free' => '2.82g',
59+
'free' => '2.82g'
6060
})
6161
end
6262
end

spec/unit/puppet/type/filesystem_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@type = Puppet::Type.type(:filesystem)
88
@valid_params = {
99
name: '/dev/myvg/mylv',
10-
ensure: 'present',
10+
ensure: 'present'
1111
}
1212
stub_default_provider!
1313
end

spec/unit/puppet/type/logical_volume_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
persistent: :false,
1616
minor: 100,
1717
thinpool: false,
18-
poolmetadatasize: '10M',
18+
poolmetadatasize: '10M'
1919
}
2020
stub_default_provider!
2121
end

0 commit comments

Comments
 (0)