Skip to content

Commit 69cec29

Browse files
jordanbreen28jordanbreen28
authored andcommitted
(CONT-971) - Correct Style/RedundantArgument
1 parent b95124f commit 69cec29

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

.rubocop_todo.yml

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

219-
# Offense count: 4
220-
# This cop supports unsafe autocorrection (--autocorrect-all).
221-
# Configuration parameters: Methods.
222-
Style/RedundantArgument:
223-
Exclude:
224-
- 'lib/puppet/provider/logical_volume/lvm.rb'
225-
- 'lib/puppet/provider/physical_volume/lvm.rb'
226-
- 'lib/puppet/provider/volume_group/lvm.rb'
227-
- 'lib/puppet_x/lvm/output.rb'
228-
229219
# Offense count: 3
230220
# This cop supports safe autocorrection (--autocorrect).
231221
Style/RedundantAssignment:

lib/puppet/provider/logical_volume/lvm.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def self.get_logical_volume_properties(logical_volumes_line)
4949
# LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
5050

5151
# Split on spaces
52-
output_array = logical_volumes_line.gsub(%r{\s+}m, ' ').strip.split(' ')
52+
output_array = logical_volumes_line.gsub(%r{\s+}m, ' ').strip.split
5353

5454
# Assign properties based on headers
5555
logical_volumes_properties[:ensure] = :present

lib/puppet/provider/physical_volume/lvm.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def self.get_physical_volume_properties(physical_volumes_line)
6565
# PV VG Fmt Attr PSize PFree
6666

6767
# Split on spaces
68-
output_array = physical_volumes_line.gsub(%r{\s+}m, ' ').strip.split(' ')
68+
output_array = physical_volumes_line.gsub(%r{\s+}m, ' ').strip.split
6969

7070
# Assign properties based on headers
7171
# Just doing name for now...

lib/puppet/provider/volume_group/lvm.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def self.get_logical_volume_properties(volume_groups_line)
3535
# VG #PV #LV #SN Attr VSize VFree
3636

3737
# Split on spaces
38-
output_array = volume_groups_line.gsub(%r{\s+}m, ' ').strip.split(' ')
38+
output_array = volume_groups_line.gsub(%r{\s+}m, ' ').strip.split
3939

4040
# Assign properties based on headers
4141
# Just doing name for now...

lib/puppet_x/lvm/output.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def self.parse(key, columns, data)
1717
key = remove_prefix(key)
1818

1919
data.split("\n").each do |line|
20-
parsed_line = line.gsub(%r{\s+}, ' ').strip.split(' ')
20+
parsed_line = line.gsub(%r{\s+}, ' ').strip.split
2121
values = columns.zip(parsed_line).to_h
2222
current_key = values[key]
2323
values.delete(key)

0 commit comments

Comments
 (0)