sstephenson/sprockets — pull request #341 by joshnuss (2012-07-12 07:41:08+00:00)
Title: Refactor duplicate patterns in Sprockets::Processing module

Some refactorings to the Processing module: the logic for preprocessors, postprocessors and bundle_processors were all similar and duplicated. Common functionality was extracted into methods, which are shared between preprocessors, postprocessors and bundle_processors.

It could be cleaned up further by moving common methods into its own class, i.e. a `ProcessorList` class with a `#register`, `#unregister` and an `[]` indexer. but you wouldnt want to change the public api (i.e. environment.postprocessors.unregister(...)) cause it would break the public api, but it may still clean up the class's internals. let me know if you guys want it, and I can add it to this pull request.