tvaughan/middleman-deploy — pull request #42 by opsb (2013-10-22 18:18:45+00:00)
Title: Refector - extract strategies out of commands

Hey

I want to add support for multiple deployment profiles, something like:

activate :deploy do |deploy|
deploy.profiles.add("github") do |profile|
profile.method = :git
end
deploy.profiles.add("heroku") do |profile|
profile.method = :git
profile.remote = "heroku"
profile.branch = "master"
end
end

Having looked at the code it seemed like it would be easier to do if I extracted the deploy methods out first, this pull request is for that. I thought it would be good to get the structure nailed down before adding the multi-profile support.

NB: I've only got git repos to test against so I haven't tested ftp, sftp or rsync. I've tried to avoid changing the implementations as much as possible but someone with a project set up for the other methods should probably try them before merging :)