glossier / solidus_retail

Solidus Extension to Support Retail Operations
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

Should the extension depend on environment variables? #39

Closed DanielWright closed 7 years ago

DanielWright commented 7 years ago

My take is it should not. We can use environment variables to configure the extension, but I think a degree of indirection is important.

thisiscab commented 7 years ago

I would agree that they should not depend on environment variables 100%.

I would like to have a configuration setting that where you would create an initializer in your main app that would specific the settings of the retail gem. I just didn't take the time to do it 💃

That would be a good feature to add in a PR.

braidn commented 7 years ago

Won't the initializer's values be set by environment variables?

thisiscab commented 7 years ago

Yes, but at least it will be from the point of view of the main_app instead of the gem itself. Right now it's invisible to the user what's happening in the gem, having an initializer in the main app would let the configuration be surfaced easily.

DanielWright commented 7 years ago

Maybe the initializer should be converted to a generator and rails g solidus_retail:install'd into the host app?