Skip to content

Commit

Permalink
handle paths/urls with special characters (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
makeacode authored and pcfens committed Jan 27, 2017
1 parent 092d945 commit 3bdc414
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion manifests/ca.pp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
}
exec { "get_${resource_name}":
command =>
"wget ${verify_https} -O ${ca_cert} ${source} 2> /dev/null",
"wget ${verify_https} -O '${ca_cert}' '${source}' 2> /dev/null",
path => ['/usr/bin', '/bin'],
creates => $ca_cert,
notify => Exec['ca_cert_update'],
Expand Down
12 changes: 6 additions & 6 deletions spec/defines/ca_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
end
it { is_expected.to contain_exec("get_Globalsign_Org_Intermediate.crt").with(
'creates' => DEBIAN_CA_FILE,
'command' => "wget -O #{DEBIAN_CA_FILE} #{HTTP_URL} 2> /dev/null",
'command' => "wget -O '#{DEBIAN_CA_FILE}' '#{HTTP_URL}' 2> /dev/null",
)
}
it { is_expected.not_to contain_file(DEBIAN_CA_FILE) }
Expand Down Expand Up @@ -175,7 +175,7 @@

it { is_expected.to contain_exec("get_Globalsign_Org_Intermediate.crt").with(
'creates' => REDHAT_CA_FILE,
'command' => "wget -O #{REDHAT_CA_FILE} #{HTTP_URL} 2> /dev/null",
'command' => "wget -O '#{REDHAT_CA_FILE}' '#{HTTP_URL}' 2> /dev/null",
) }
it { is_expected.not_to contain_file(REDHAT_CA_FILE) }
end
Expand Down Expand Up @@ -211,7 +211,7 @@
end
it { is_expected.to contain_exec("get_Globalsign_Org_Intermediate.crt").with(
'creates' => DISTRUSTED_REDHAT_CA_FILE,
'command' => "wget -O #{DISTRUSTED_REDHAT_CA_FILE} #{HTTP_URL} 2> /dev/null",
'command' => "wget -O '#{DISTRUSTED_REDHAT_CA_FILE}' '#{HTTP_URL}' 2> /dev/null",
)}
end
end
Expand All @@ -236,7 +236,7 @@

it { is_expected.to contain_exec("get_Globalsign_Org_Intermediate.pem").with(
'creates' => SUSE_11_CA_FILE,
'command' => "wget -O #{SUSE_11_CA_FILE} #{SUSE_11_HTTP_URL} 2> /dev/null",
'command' => "wget -O '#{SUSE_11_CA_FILE}' '#{SUSE_11_HTTP_URL}' 2> /dev/null",
) }
it { is_expected.not_to contain_file(SUSE_11_CA_FILE) }
end
Expand Down Expand Up @@ -300,7 +300,7 @@

it { is_expected.to contain_exec("get_Globalsign_Org_Intermediate.crt").with(
'creates' => SUSE_12_CA_FILE,
'command' => "wget -O #{SUSE_12_CA_FILE} #{HTTP_URL} 2> /dev/null",
'command' => "wget -O '#{SUSE_12_CA_FILE}' '#{HTTP_URL}' 2> /dev/null",
) }
it { is_expected.not_to contain_file(SUSE_12_CA_FILE) }
end
Expand Down Expand Up @@ -338,7 +338,7 @@
end
it { is_expected.to contain_exec("get_Globalsign_Org_Intermediate.crt").with(
'creates' => DISTRUSTED_SUSE_12_CA_FILE,
'command' => "wget -O #{DISTRUSTED_SUSE_12_CA_FILE} #{HTTP_URL} 2> /dev/null",
'command' => "wget -O '#{DISTRUSTED_SUSE_12_CA_FILE}' '#{HTTP_URL}' 2> /dev/null",
)}
end
end
Expand Down

0 comments on commit 3bdc414

Please sign in to comment.