documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

Add support for environment specific configuration #143

Closed christoffer closed 13 years ago

christoffer commented 13 years ago

Adds the ability to opt-in environment specific configuration.

Configuration sections that share the same name as the environment are merged with the configuration at the root level.

For example:

package_assets: always
compress_assets: on

development:
  compress_assets: off

Would turn result in this configuration in production:

package_assets: always
compress_assets: on

and this configuration in development:

package_assets: always
compress_assets: off

This can already be achieved using ERB, but we found it nicer to do it this way so I'd share the changes if anyone else is interested.

jashkenas commented 13 years ago

Thanks for the patch -- it looks great. I've merged it in to master here: d70a1c9b09857a992537c4b362e071796228016b.

It'll go out with the next release.

christoffer commented 13 years ago

Wow, super! Thanks.

And thanks for an amazing lib ;)