public
Description: A plugin to duck-punch asset packager and provide middleware to work on Heroku with a ROFS.
Homepage:
Clone URL: git://github.com/amasses/heroku_asset_packager.git
Matthew Savage (author)
Sun Nov 08 20:01:26 -0800 2009
name age message
file MIT-LICENSE Wed Sep 30 08:14:48 -0700 2009 Initial commit after extraction from rails app [Matthew Savage]
file README Wed Sep 30 08:34:53 -0700 2009 Updated readme, removed unrequired install file [Matthew Savage]
file Rakefile Wed Sep 30 08:14:48 -0700 2009 Initial commit after extraction from rails app [Matthew Savage]
file init.rb Wed Sep 30 08:14:48 -0700 2009 Initial commit after extraction from rails app [Matthew Savage]
directory lib/ Wed Sep 30 08:45:28 -0700 2009 using ENV[] instead of rack env[] [Matthew Savage]
directory tasks/ Wed Sep 30 08:14:48 -0700 2009 Initial commit after extraction from rails app [Matthew Savage]
directory test/ Sun Nov 08 20:01:26 -0800 2009 Made tests work [Matthew Savage]
file uninstall.rb Wed Sep 30 08:14:48 -0700 2009 Initial commit after extraction from rails app [Matthew Savage]
README
Heroku Asset Packager
===================

Asset Packager is an awesome plugin which will roll up all the fancy CSS and JS files which seem to accumulate with a 
large web application
and then strip them down and roll them into a nice minified ball. How this works, to me, is magic - and they only need a 
config file. I thought
I was in heaven until I tried to deploy my app onto Heroku.

Heroku, due to its nature, runs your app in a Read Only File System - basically this means that Asset Packager balks 
when it tries to generate
the asset package files on the first run (unless you do it manually and commit to source control... that just feels 
wrong).

So, heroku_asset_packager kind of monkey patches asset_packager and adds in some Rack middleware to do two things:
1. it redirects the destination where asset_packager will dump out its files to tmp/asset_packager/
2. it grabs any requests with /(stylesheets|javascripts)/*_packages.* and reads out the file as required.

Why? Well because we can write to tmp/ Heroku doesn't complain and the world is good once again.

Example
=======

No configuration necessary aside from setting up asset_packager.
Install with: script/plugin install 
When deploying to Heroku please ensure you set the HEROKU config value with the following: `heroku config:add 
HEROKU=true`

Tests
=====

I'm so deeply sorry, this is kind of like my first real plugin, and its rack based, and has a dependency on another 
plugin - so I'm struggling a little
with the testing etc. But I promise its coming - please don't shun me! (any assistance will be welcomed!)

Copyright (c) 2009 Matthew Savage (Amasses Industries), released under the MIT license