Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Dev workflow with Guard + Rake #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lynxbat
Copy link
Contributor

@lynxbat lynxbat commented Jul 15, 2012

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.

lynxbat added 3 commits July 15, 2012 00:02
…ctory to master.

This requires the local source to be under 'src/Razor' currently.

You can use Guard, Listen, or other gems to run the rake tasks to trigger the sync.
@benburkert
Copy link
Owner

This is really cool. I think it will drop the barrier to entry for developers who want to hack on Razor, myself included. But I'd like to keep this repo as demo/tutorial for Razor. Maybe it's time to fork this and restructure it as developer sandbox for Razor. Thoughts?

Also, I'm gonna cherry pick in the Scientific Linux fix.

@lynxbat
Copy link
Contributor Author

lynxbat commented Jul 16, 2012

Yeah. How do you want to fork or clone?

Want me to host? Would make sense to rename which would be a clone to new repo name?

@benburkert
Copy link
Owner

Yeah, i think it makes sense for you to own the fork. I wouldn't worry about keeping them compatible, i'll follow along and cherry pick anything worth bringing over into this project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants