dry-rb/dry-web

Allow enforcing environment

Open

#43 opened on Apr 26, 2017

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Ruby (18 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (211 stars)
PR merge metrics
 (PR metrics pending)

Description

Currently config.env is set based on ENV["RACK_ENV"] which is unfortunate as configuring a container can happen only once and we can't override it safely with predictable behavior. This means we need to treat env setting separately from the main config and expose an API for setting it ie:

MyApp::Container.env!(:test)

@timriley thoughts?

Contributor guide