mirror of
https://github.com/cmur2/openvpn-status-web.git
synced 2024-11-17 06:56:13 +01:00
gem: make intention of ENV.fetch clear with explicit default value
This commit is contained in:
parent
e3a06fdf6c
commit
057d243db8
@ -9,7 +9,7 @@ require 'yaml'
|
||||
require 'rack'
|
||||
require 'erb'
|
||||
require 'metriks'
|
||||
require 'better_errors' if ENV['RACK_ENV'] == 'development'
|
||||
require 'better_errors' if ENV.fetch('RACK_ENV', nil) == 'development'
|
||||
|
||||
require 'openvpn-status-web/status'
|
||||
require 'openvpn-status-web/parser/v1'
|
||||
@ -128,7 +128,7 @@ module OpenVPNStatusWeb
|
||||
|
||||
# configure rack
|
||||
app = Daemon.new(config['vpns'])
|
||||
if ENV['RACK_ENV'] == 'development'
|
||||
if ENV.fetch('RACK_ENV', nil) == 'development'
|
||||
app = BetterErrors::Middleware.new(app)
|
||||
BetterErrors.application_root = File.expand_path(__dir__)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user