File tree 5 files changed +4
-15
lines changed
5 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,6 @@ RSpec/StubbedMock:
156
156
Exclude :
157
157
- ' spec/unit/lib/facter/docker_spec.rb'
158
158
159
- # Offense count: 4
160
- # This cop supports safe autocorrection (--autocorrect).
161
- # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
162
- # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
163
- Style/TernaryParentheses :
164
- Exclude :
165
- - ' lib/puppet/provider/docker_compose/ruby.rb'
166
- - ' lib/puppet/provider/docker_stack/ruby.rb'
167
- - ' spec/shared_examples/run.rb'
168
- - ' spec/shared_examples/services.rb'
169
-
170
159
# Offense count: 190
171
160
# This cop supports safe autocorrection (--autocorrect).
172
161
# Configuration parameters: EnforcedStyleForMultiline.
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def exists?
45
45
return false if compose_services . count != compose_containers . uniq . count
46
46
47
47
counts = Hash [ *compose_services . each . map { |key , array |
48
- image = ( array [ 'image' ] ) ? array [ 'image' ] : get_image ( key , compose_services )
48
+ image = array [ 'image' ] || get_image ( key , compose_services )
49
49
Puppet . info ( "Checking for compose service #{ key } #{ image } " )
50
50
[ key , compose_containers . count ( "'#{ key } -#{ image } '" ) ]
51
51
} . flatten ]
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def exists?
39
39
return false if stack_services . count != stack_containers . count
40
40
41
41
counts = Hash [ *stack_services . each . map { |key , array |
42
- image = ( array [ 'image' ] ) ? array [ 'image' ] : get_image ( key , stack_services )
42
+ image = array [ 'image' ] || get_image ( key , stack_services )
43
43
image = "#{ image } :latest" unless image . include? ( ':' )
44
44
Puppet . info ( "Checking for compose service #{ key } #{ image } " )
45
45
[ "#{ key } -#{ image } " , stack_containers . count ( "#{ key } -#{ image } " ) ]
Original file line number Diff line number Diff line change 451
451
'ports' => ports ,
452
452
'stop_wait_time' => stop_wait_time ,
453
453
'container_running' => running ,
454
- 'logfile_path' => facts [ :os ] [ 'family' ] == 'windows' ? facts [ 'docker_user_temp_path' ] : '/tmp' ,
454
+ 'logfile_path' => ( facts [ :os ] [ 'family' ] == 'windows' ) ? facts [ 'docker_user_temp_path' ] : '/tmp' ,
455
455
}
456
456
457
457
detect_changes = get_docker_params_changed ( docker_params_changed_args )
Original file line number Diff line number Diff line change 57
57
)
58
58
59
59
exec_create = "#{ docker_command } create --name #{ docker_service_create_flags } "
60
- unless_create = "docker service ps #{ service_name == :undef ? '' : service_name } "
60
+ unless_create = "docker service ps #{ ( service_name == :undef ) ? '' : service_name } "
61
61
62
62
it {
63
63
expect ( subject ) . to contain_exec ( "#{ title } docker service create" ) . with (
You can’t perform that action at this time.
0 commit comments