A plugin to duck-punch asset packager and provide middleware to work on Heroku with a ROFS.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


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.


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`


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