BBC-News/wraith — pull request #90 by meza (2014-01-27 16:04:55+00:00)
Title: Gemifying, tying loose ends, etc

I've done work on many different things. The main motivation was to be able to use wraith as a gem and put a sinatra wrapper around it, so that a CI server could hit an endpoint and kick off something interesting.
More info here: http://github.com/meza/wraithDaemon

So what I've done is:

* Extracted the gallery building logic to a class, so it could be called from within ruby without exec-ing a riby script from within ruby.. The galler.rb still works, it uses the new abstraction
* Extracted all command line invocations for the image tools. I tried to find a suitable library to do the job, but RMagick and ChunkyPNG failed miserably.
* Fixed some paths, so when included as a gem, they'll now point to the right place
* When creating the gallery, location was set to be the domain, so I removed the domain thing from the process and am using location everywhere. If my thinking is incorrect, let me know.
* Added OS dependent logic to the command line tools, so it should work on unix and windows without a glitch
* Updated the readme to explain how to use wraith as a gem, although it will need some modifications after a merge

There are many things I've seen along the way I'd love to correct, but time's not my friend on this one.