holman/boom — pull request #57 by vhata (2012-01-06 14:57:30+00:00)
Title: Fix some issues with escaping apostrophes when shelling out

- Use IO.popen instead of system(printf |)
- Remove unnecessary test for %%
- Leaning Toothpick Stew to get the necessary 'xx'\''xx' in the open
command

It broke on the following examples:

$ boom test tstapostrophe "say 'yo', yo"
Boom! tstapostrophe in test is say 'yo', yo. Got it.

$ boom tstapostrophe
Boom! We just copied say 'yo', yo to your clipboard.

$ pbpaste
say yo', yoyo, yo, yo

and:

$ boom urls apo "http://github.com/vhata's account"
Boom! apo in urls is http://github.com/vhata's account. Got it.

$ boom open apo
Boom! We just opened http://github.com/vhata's account for you.

The browser actually opened https://github.com/vhatass - appropriate, but incorrect. (The url method of Item may have something to say about what is actually correct, but this is definitely not.)