bernd/fpm-cookery — Issue #6: add SVN handler
Author: lusis
Created: 2011-10-26 20:11:25+00:00
State: open

I've got an MVP of an SVN handler here:

https://github.com/lusis/fpm-cookery/commit/28a8a54ac99c925fe32454698cbd77273bc4ed6f

- Since VCS urls can look like `https`, I decided to add a new attr to the block called `:handler`. It defaults to `:curl`.
- The handler factory needs to be reworked a bit more. Right now it's conditional based. `FPM::Cookery::SourceHandler::Template
` should probably have some sort of inheritance hook and drop the whole conditional aspect.
- I dithered on doing URI-based tricks for revision vs. dealing with yet another attr for specifying VCS revision. In the end, I went the URI route. It's ugly and fragile but it works for now.
- I created a new attr and query method on the `Template` to toggle the checksum process. I'm currently overriding it in `SVN` in the fetch method. This would PROBABLY work better as a constant?

I've tested it here with/without a revision query string and it works well. I've also validated that Curl-based fetches still work and checksum properly.

Before I go on and do a Git handler, I want to run this implementation up the flag pole and get opinions. It's not very testable in its current form so I'll have to refactor that as well. I think I also have some `puts` statements in there that I need to clean up.

Thoughts?