File tree Expand file tree Collapse file tree 3 files changed +6
-25
lines changed Expand file tree Collapse file tree 3 files changed +6
-25
lines changed Original file line number Diff line number Diff line change 1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2023-04-28 15:04:49 UTC using RuboCop version 1.48.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
1
# Offense count: 22
10
2
# Configuration parameters: AllowKeywordBlockArguments.
11
3
Lint/UnderscorePrefixedVariableName :
@@ -164,13 +156,6 @@ RSpec/StubbedMock:
164
156
Exclude :
165
157
- ' spec/unit/lib/facter/docker_spec.rb'
166
158
167
- # Offense count: 2
168
- # This cop supports safe autocorrection (--autocorrect).
169
- Style/RedundantSelfAssignmentBranch :
170
- Exclude :
171
- - ' lib/puppet/functions/docker_params_changed.rb'
172
- - ' spec/helper/get_docker_params_changed.rb'
173
-
174
159
# Offense count: 3
175
160
# This cop supports safe autocorrection (--autocorrect).
176
161
Style/RedundantStringEscape :
Original file line number Diff line number Diff line change @@ -89,11 +89,9 @@ def detect_changes(opts)
89
89
param_changed = true if opts [ 'volumes' ] . is_a? ( String ) && opts [ 'volumes' ] . include? ( ':' ) && opts [ 'volumes' ] != inspect_hash [ 'Mounts' ] . to_a [ 0 ] && opts [ 'osfamily' ] != 'windows'
90
90
param_changed = true if opts [ 'volumes' ] . is_a? ( String ) && !opts [ 'volumes' ] . include? ( ':' ) && opts [ 'volumes' ] != inspect_hash [ 'Config' ] [ 'Volumes' ] . to_a [ 0 ] && opts [ 'osfamily' ] != 'windows'
91
91
param_changed = true if opts [ 'volumes' ] . is_a? ( String ) && opts [ 'volumes' ] . scan ( %r{(?=:)} ) . count == 2 && opts [ 'volumes' ] != inspect_hash [ 'Mounts' ] . to_a [ 0 ] && opts [ 'osfamily' ] == 'windows'
92
- param_changed = if opts [ 'volumes' ] . is_a? ( String ) && opts [ 'volumes' ] . scan ( %r{(?=:)} ) . count == 1 && opts [ 'volumes' ] != inspect_hash [ 'Config' ] [ 'Volumes' ] . to_a [ 0 ] && opts [ 'osfamily' ] == 'windows'
93
- true
94
- else
95
- param_changed
96
- end
92
+ if opts [ 'volumes' ] . is_a? ( String ) && opts [ 'volumes' ] . scan ( %r{(?=:)} ) . count == 1 && opts [ 'volumes' ] != inspect_hash [ 'Config' ] [ 'Volumes' ] . to_a [ 0 ] && opts [ 'osfamily' ] == 'windows'
93
+ param_changed = true
94
+ end
97
95
98
96
pp_paths = opts [ 'volumes' ] . reject { |item | item . include? ( ':' ) } if opts [ 'volumes' ] . is_a? ( Array ) && opts [ 'osfamily' ] != 'windows'
99
97
pp_mounts = opts [ 'volumes' ] . select { |item | item . include? ( ':' ) } if opts [ 'volumes' ] . is_a? ( Array ) && opts [ 'osfamily' ] != 'windows'
Original file line number Diff line number Diff line change @@ -18,11 +18,9 @@ def get_docker_params_changed(opts)
18
18
param_changed = true if opts [ 'volumes' ] . is_a? ( String ) && opts [ 'volumes' ] . include? ( ':' ) && opts [ 'volumes' ] != inspect_hash [ 'Mounts' ] . to_a [ 0 ] && opts [ 'osfamily' ] != 'windows'
19
19
param_changed = true if opts [ 'volumes' ] . is_a? ( String ) && !opts [ 'volumes' ] . include? ( ':' ) && opts [ 'volumes' ] != inspect_hash [ 'Config' ] [ 'Volumes' ] . to_a [ 0 ] && opts [ 'osfamily' ] != 'windows'
20
20
param_changed = true if opts [ 'volumes' ] . is_a? ( String ) && opts [ 'volumes' ] . scan ( %r{(?=:)} ) . count == 2 && opts [ 'volumes' ] != inspect_hash [ 'Mounts' ] . to_a [ 0 ] && opts [ 'osfamily' ] == 'windows'
21
- param_changed = if opts [ 'volumes' ] . is_a? ( String ) && opts [ 'volumes' ] . scan ( %r{(?=:)} ) . count == 1 && opts [ 'volumes' ] != inspect_hash [ 'Config' ] [ 'Volumes' ] . to_a [ 0 ] && opts [ 'osfamily' ] == 'windows'
22
- true
23
- else
24
- param_changed
25
- end
21
+ if opts [ 'volumes' ] . is_a? ( String ) && opts [ 'volumes' ] . scan ( %r{(?=:)} ) . count == 1 && opts [ 'volumes' ] != inspect_hash [ 'Config' ] [ 'Volumes' ] . to_a [ 0 ] && opts [ 'osfamily' ] == 'windows'
22
+ param_changed = true
23
+ end
26
24
27
25
pp_paths = opts [ 'volumes' ] . reject { |item | item . include? ( ':' ) } if opts [ 'volumes' ] . is_a? ( Array ) && opts [ 'osfamily' ] != 'windows'
28
26
pp_mounts = opts [ 'volumes' ] . select { |item | item . include? ( ':' ) } if opts [ 'volumes' ] . is_a? ( Array ) && opts [ 'osfamily' ] != 'windows'
You can’t perform that action at this time.
0 commit comments