nanliu/puppet-staging — pull request #15 by ojacobson (2013-12-06 02:58:18+00:00)
Title: Handle URLs with parameters more sensibly.

Shellquote is the closest thing to array-of-arguments exec calls puppet supports. As far as I've ever been able to test, it correctly handles quoting for the shells Puppet uses for `exec{}` resources. Using it to construct `curl`/`wget` commands means that they correctly download, for example, Jetty:

http://eclipse.org/downloads/download.php?file=/jetty/stable-8/dist/jetty-distribution-8.1.14.v20131031.tar.gz&r=1

Without shellquote, the `exec` resources see the embedded `&` near the end and generate two shell commands (the second of which is `r=1`). With shellquote, the URL is kept as a single argument.

I had a look at retrofitting the command lines in the `extract.pp` manifest, but it's not so worth it there, I think.

**This signifigantly changes the interpretation of the curl_option and wget_option arguments!**