mdsol / dice_bag

DiceBag is a library of rake tasks for configuring web apps in the style of The Twelve-Factor App.
MIT License
19 stars 4 forks source link

Make committed templates the norm #44

Closed asmith-mdsol closed 11 years ago

asmith-mdsol commented 11 years ago

After a long discussion with @fosdev I came the realization that the automagical creation of configuration templates are runtime was a misfeature, which added unnecessary complexity and confusion and that @jcarres-mdsol was correct all along. This pull request is a first step in backing out the old behaviour.

The primary changes here are to make .dice the only file extension for configuration templates and stop the config:all rake task call the config:generate_all task. The documentation is changed in line and now implyies the need to commit configuration templates. The old behaviour is maintained for now as I need to give time to people currently using DiceBag like @HonoreDB and @dhoizner-mdsol to adapt.

harryw commented 11 years ago

I like this.

fosdev commented 11 years ago

@asmith-mdsol Will this pick up templates in libraries already? Do they all default to config/ folder or how can that be specified?

asmith-mdsol commented 11 years ago

@fosdev Not sure I understand your question. We're entirely separating config template generation from config template processing (leading to an instantiated config file). Libraries can provide templates for generation as before, with any of the supported file extensions, although .dice being correct from this point forward. If your question was "can libraries already provide templates?" then the answers is "yes", as described in the "templates.md" file in the root. I believe they currently default to the "config" directory although it's been a while since I've walked through that code and its getting late here and my brain's going to sleep. It's entirely possible this is borked right now and we badly need some test coverage. :worried:

fosdev commented 11 years ago

Thanks. That does answer the question.

On Tue, Feb 19, 2013 at 12:45 PM, Andrew Smith notifications@github.comwrote:

@fosdev https://github.com/fosdev Not sure I understand your question. We're entirely separating config template generation from config template processing (leading to an instantiated config file). Libraries can provide templates for generation as before, with any of the supported file extensions, although .dice being correct from this point forward. If your question was "can libraries already provide templates?" then the answers is "yes", as described in the "templates.md" file in the root. I believe they currently default to the "config" directory although it's been a while since I've walked through that code and its getting late here and my brain's going to sleep. It's entirely possible this is borked right now and we badly need some test coverage. [image: :worried:] **

— Reply to this email directly or view it on GitHubhttps://github.com/mdsol/dice_bag/pull/44#issuecomment-13798021.

jcarres-mdsol commented 11 years ago

Good.