wycats/rack-offline — pull request #29 by gabetax (2014-02-12 22:29:52+00:00)
Title: cache asset pipeline files in development mode

Previously, unless `configuration.assets.enabled`, which is false in development by default, rack-offline would fall back by to the Rails 2.x public/{javascripts,stylesheets} files. This behavior made the default configuration useless unless the developer continuously runs `rake assets:precompile` after each asset change.

The new behavior causes it to cache every file that _would be present_ in public/assets/ after running a `rake assets:precompile`. The logic is from:

https://github.com/sstephenson/sprockets/blob/master/lib/sprockets/manifest.rb#L115-L116

Additionally, it now checks the configured assets directory prefix, instead of using the hard-coded "assets".