openoakland/opendisclosure — pull request #99 by ted27 (2014-07-12 21:49:07+00:00)
Title: Asset minification and cleanup

First, this introduces Sprockets for asset compilation + minification. This means that the browser will load `application.js` and `application.css`, which are "manifests" that are a special syntax parsed by Sprockets, which sticks the other files in where the `//= require ` blocks are. This brings the number of OpenDisclosure JS/CSS requests down from ~30 to 2.

For development this means that:
* all your JS debugging will be in a single file, application-[...digest...].js
* to include a new JS file, you should put it as a `//= require` line in application.js.
* you cannot request any other JS files except application.js and application.css, because Sprockets won't know about them and therefore can't serve them. These filenames are specified in a configuration variable in app.rb

Second, this removes a number of old files, so I think only the currently-used files are still included.

Third, this adds some caching logic - so that everything is cached using a "Last Modified" time equal to the last time data was fetched, since nothing can change except by importing new data. This means you'll have to import the data again.