owahab/paperclip-ffmpeg — pull request #37 by chip-miller (2013-10-27 05:31:57+00:00)
Title: Replacing IO.popen with Cocaine::CommandLine

Hey,
Great work on this gem! I really enjoy working with it, with the exception of this [one](https://github.com/owahab/paperclip-ffmpeg/blob/master/lib/paperclip_processors/ffmpeg.rb#L170) line. The ``IO.popen`` method is difficult to stub, and the call is chewing up system resources during tests. Paperclip deals with this by wrapping IO calls in [Cocaine::Runners](https://github.com/thoughtbot/cocaine/tree/master/lib/cocaine/command_line/runners) which (among other things) makes it easy to switch on/off with [``Cocaine::CommandLine.fake!``](https://github.com/thoughtbot/cocaine/blob/master/spec/cocaine/command_line/runners/fake_runner_spec.rb).

Checkout the update below:
- Consisten Testing: ``Cocaine::CommandLine.fake!`` now stubs both paperclip and paperclip-ffmpeg
- Error Handling: the old command actually throws an error. It has been replaced with ``ffprobe``.

Cheers,
Chip