BBC-News/wraith — pull request #29 by reggieb (2013-08-19 12:07:01+00:00)
Title: Prepare for gem

Some suggested changes that I think you'll need before releasing Wraith as a gem.

* I've namespace the rake task, so that there is less likely to be task clashes between wraith tasks and a host app's rake tasks. I've left the default rake task in place so the new code is backwardly compatible. However, I suggest you remove that in the future.
* I've removed the YAML dependency from the Wraith class. This will allow you to use Wraith using a Hash config rather than via the YAML config file. That will allow the host app to generate the configuration on the fly. It will also allow the host app to define where and how the configuration data is stored.
* I've defined a WraithProcess module to manage the process (rather than relying on the rake task). At the moment there is only one 'process', but this now acts as a template for alternative process paths.
* I've added the facility to define the config file location via the rake task call. So you can now have multiple config files and choose which to use as you call rake.

So now, if you have russian.yaml, german.yaml and french.yaml, you can do this:

rake wraith:process_run[russian]

or

rake wraith:process_run[german]

or

rake wraith:process_run[french]

As well as using the default config.yaml

rake wraith:process_run