jakeboxer/hyperloop — pull request #15 by jakeboxer (2013-11-27 10:12:08+00:00)
Title: Add live reload in development/test

This branch adds live reloading when `RACK_ENV != "production"`, as requested in #14.

The bulk of this pull involves tweaking the fixture setup. Instead of reading a fixture directly from `spec/fixtures/:name`, the fixture is copied to `tmp/spec/fixtures/:name`, where it can then be freely modified without fucking up the original fixture. This way, we can do tests where we change the fixture and make sure live-reloading works as expected.

Note: there's a weird intermittent bug in the tests. Something like 10% of the time, live reloading will work for assets when in production, even though it shouldn't. I gotta talk to someone who knows more about Sprockets; I'm pretty sure Sprockets is doing its own live-reloading in production, and I need to figure out how to turn it off. That can be done in a separate PR though.

/cc @fabianperez @jessicard