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

Dice Bag ignores directories beginning with '.' #69

Closed harryw closed 6 years ago

harryw commented 10 years ago

Raising this just because I am not sure if it's intentional.

Dice Bag does not generate config files from *.dice files under a dot-prefixed directory. The root of this appears to be Project#templates_to_generate:

    def self.templates_to_generate
      Dir['**/*.dice']
    end

I believe this is omitting dot-prefixed directories.

Is this desired behaviour?

mjobin-mdsol commented 10 years ago

I'd hope no ones wants templates under dot-prefixed directories, but that's only my opinion...

asmith-mdsol commented 10 years ago

It's not an intentional omission but perhaps we should be careful of directories like .git if only for performance reasons. Did you have a use case in mind?

harryw commented 10 years ago

I was testing vendored gems under a dot-prefixed directory and discovered this behaviour.

I'm not really lobbying for or against the behaviour, but I don't think it's implicit that this is a feature.

If this is how Dice Bag is expected to work, it should probably be documented and perhaps tested. But it's not that big a deal. I might add a test in the course of making another change.

asmith-mdsol commented 10 years ago

Interesting! I've done similar things with bundler installing to ./.bundle myself in the past. I think at the very least it should be documented. I'm inclined to leave the behaviour as it is because I feel there's an expectation that dot-directories are for private use.

johngluckmdsol commented 6 years ago

Why is this still open?

jfeltesse-mdsol commented 6 years ago

That issue from 4 years ago has been resolved by the referenced PR also from 4 years ago, it's still open because obviously they forgot to close, nothing else.