webvalve icon indicating copy to clipboard operation
webvalve copied to clipboard

use ActiveModel-style FALSE_VALUES approach for ENV variables

Open samandmoore opened this issue 6 years ago • 2 comments

comment from @smudge https://github.com/Betterment/webvalve/pull/34#discussion_r341378683

Got it -- so we say that SERVICE_ENABLED=something_invalid is neither explicitly enabled, nor explicitly disabled -- I buy it, but it doesn't feel like a super necessary distinction (like, as an end-developer I wouldn't be surprised if SERVICE_ENABLED=banana got cast to true) and my more general inclination would be to bool-cast ENV vars the same way everywhere and reduce the local complexity in basically any gem I write. (Like, normally I'd rely on ActiveModel's Boolean type, but that's not available in every lib. I wish Ruby had a built-in shorthand for boolean ENV vars.)

samandmoore avatar Nov 04 '19 22:11 samandmoore

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 04 '19 22:12 stale[bot]

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Dec 11 '19 23:12 stale[bot]