Skip to content

use ActiveModel-style FALSE_VALUES approach for ENV variables #38

@samandmoore

Description

@samandmoore

comment from @smudge #34 (comment)

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    pinnedthis is probably a thing we should deal with

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions