rubber/rubber — pull request #285 by johnnyshields (2013-02-17 14:53:28+00:00)
Title: Support for deploying from a local Windows machine

I've added the ability to run Rubber from a local Windows machine.

This is acheived by the following modifications:

1. Rubber Code (local): Adding function to `BoundEnv` to detect local OS
2. Rubber Code (local): Modification of local hosts file writing/cleanup routines
3. Adding `local_windows` vulcanizer which does 3 things:
* Includes package 'dos2unix' (all roles)
* Adds copying exclusion of Gemfile.lock to remote (due to cross-platform limitation in Bundler)
* Runs on remote 'dos2unix' after copying code to remote (if remote is not Windows)
4. Rubber Code (remote config): Added `dos2unix` call during config step.

**Known Issues:**

Currently I'm ALWAYS running dos2unix on remote configure step, since I can't (easily) figure out a way to tell the remote that I'm running Windows locally. I believe this will harmlessly fail and be skipped if dos2unix isn't installed. **PLEASE VERIFY**

One possibly better implementation might be to locally run an equivalent of dos2unix on the payloads (code and config files) BEFORE the transfer to the remote. I didn't do this. Arguably this should be a feature of Capistrano.

**Future enhancements:**

* When doing any `vulcanize` calls, Rubber should check if the local env is Windows, and if so prompt user to run the Windows vulcanizer automatically.

I also have a Wiki section on Windows if/when you accept this pull request