Skip to content

Commit 19666de

Browse files
committed
Add all safe auto corrects
1 parent a3c32a1 commit 19666de

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: lib/facter/docker.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def interfaces
102102
Facter.add(:docker) do
103103
setcode do
104104
docker_version = Facter.value(:docker_client_version)
105-
if docker_version !~ %r{1[.][0-9][0-2]?[.]\w+}
105+
unless %r{1[.][0-9][0-2]?[.]\w+}.match?(docker_version)
106106
if Facter::Util::Resolution.which('docker')
107107
docker_json_str = Facter::Util::Resolution.exec(
108108
"#{docker_command} info --format '{{json .}}'",
@@ -122,7 +122,7 @@ def interfaces
122122
docker['network'][network] = inspect[0]
123123
network_id = docker['network'][network]['Id'][0..11]
124124
interfaces.each do |iface|
125-
docker['network']['managed_interfaces'][iface] = network if iface =~ %r{#{network_id}}
125+
docker['network']['managed_interfaces'][iface] = network if %r{#{network_id}}.match?(iface)
126126
end
127127
end
128128
docker

Diff for: lib/puppet/parser/functions/docker_service_flags.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ module Puppet::Parser::Functions
8080
opts['registry_mirror'].each do |param|
8181
flags << "--registry-mirror='#{param}'"
8282
end
83-
else
84-
if opts['registry_mirror'] && opts['registry_mirror'].to_s != 'undef'
85-
flags << "--registry-mirror='#{opts['registry_mirror']}'"
86-
end
83+
elsif opts['registry_mirror'] && opts['registry_mirror'].to_s != 'undef'
84+
flags << "--registry-mirror='#{opts['registry_mirror']}'"
8785
end
8886

8987
if opts['image'] && opts['image'].to_s != 'undef'

0 commit comments

Comments
 (0)