everzet/capifony — pull request #341 by la5942 (2013-02-15 16:39:53+00:00)
Title: [WIP] Install/Update Vendors via Copy

Description: Override copy strategy to allow vendors to be installed locally before the code is zipped and pushed to remote server. This reduces the dependencies required on the remote server and solves the issue with private [repository access] (https://github.com/everzet/capifony/pull/340/commits).

I am not a ruby developer, this is my first attempt at anything like this. Please comment, offer improvements, tell me if I am doing it wrong! This is a work in progress PR to hopefully get this feature off the ground.

Bug fix: no
Feature addition: yes
Fixture addition: no
Backwards compatibility break: probably
Tests: not run
Fixes the following tickets: #241

Todo:

- [ ] Ideally I would like to extend the capistrano copy strategy with a capistrano copy strategy. I couldn't figure out how to do this nicely so I have overloaded the copy strategy deploy method for now.
- [ ] Not entirely sure where this should belong in terms of folder structure, should I mirror the capistrano directory structure for strategies.
- [ ] You must set ```set :use_composer, false``` in your deploy.rb to stop composer from trying to install. I was thinking that there should be a ```use_composer_locally``` parameter.
- [ ] test the ```composer_install``` and associated methods in ```symfony2/strategy/copy_local``` -- I have tested this with a basic implementation.

You will need to put the following in your deploy.rb file to overload the capistrano copy strategy, and of course set ```set :deploy_via, :copy```

```ruby
load 'symfony2/strategy/copy_local'
```