benburkert/razor-vagrant-demo — pull request #7 by lynxbat (2012-07-15 23:27:25+00:00)
Title: Dev workflow with Guard + Rake

Trying to switch my main workflow to use this possibly.

Added Rake tasks for syncing local Razor src (On my Mac in my case) into the [gold] VM and then into /opt/Razor.

Added Guardfile with watchers for watching src under src/Razor locally.

End result is as files are updated in local editor (RubyMine in my case) they are automatically synced into the [gold] VM so I can run tests immediately.

Couple things around why I did this a certain way:
1. I sync into /tmp/src_sync and then 'sudo mv' into /opt/Razor. This is because the vagrant-sync gem doesn't have a way to easily use the root account or sudo. And changing the Razor permissions inside the [gold] VM is nasty. So instead I sync using 'vagrant' user with vagrant-sync. And then use the ssh method to run the 'sudo cp -r' to overwrite updated files.
2. I broke up each subfolder into separate sync tasks and watchers to save CPU and unnecessary copying.
3. You have to have your Razor source git repo in src/Razor. I tried to make this work well with another path. but getting Guard to follow symlinks reliably or modifying Listen gem to monitor a different path felt wonky.

Also, added correct link to Scientific Linux as it was an MK ISO link before.

LMK what you think.