thoughtbot / cocaine

A small library for doing (command) lines.
https://robots.thoughtbot.com
Other
785 stars 55 forks source link

Allow blank command line arguments #9

Closed viseztrance closed 12 years ago

viseztrance commented 12 years ago

Hi,

I was trying to pass an empty argument and noticed that Cocaine would ignore it.

I'm uncertain if this is by design or not, but you should be able to do so. For example the following would not be valid without it (nor without the --data parameter for that matter):

curl -X POST --data '' 'http://localhost:9900'

The following patch addresses this issue (nil arguments are ignored as before).

Thanks, Daniel

jyurek commented 12 years ago

That's a very good point. Thanks for the patch. I've pulled it in, and it'll be in the next release.

viseztrance commented 12 years ago

Understood, thanks!