devise-two-factor icon indicating copy to clipboard operation
devise-two-factor copied to clipboard

ENV variable should fetch instead of []

Open lancecarlson opened this issue 7 years ago • 2 comments

If this variable isn't set, it should raise an exception when trying to load your app. Also, maybe this config would be a better candidate for getting set in an initializer?

lancecarlson avatar May 03 '18 22:05 lancecarlson

Where is this in the devise-two-factor code? Setting the ENV variable is done at the app level.

FanaHOVA avatar Dec 04 '18 14:12 FanaHOVA

It's been a long time since I made this ticket so I'm a bit fuzzy as at where exactly I was referring to. After a review of the code (git grep ENV), it does look like the library itself doesn't depend on an ENV variable explicitly (which is good), but that all its examples are using ENV[] and not ENV.fetch. Perhaps it still makes sense to migrate most of the ENV[] calls to ENV.fetch? In every example I saw (mostly in the demo application), I would want the application to fail fast if that environment variable was not set.

lancecarlson avatar Dec 12 '18 16:12 lancecarlson