dotenv: enable overriding danbooru_local_config.rb with env vars.

This commit is contained in:
evazion
2017-01-21 07:15:11 +00:00
parent a72df4133e
commit f33108416e
2 changed files with 13 additions and 1 deletions

View File

@@ -502,4 +502,16 @@ module Danbooru
def aws_sqs_archives_url
end
end
class EnvironmentConfiguration
def method_missing(method, *args)
var = ENV["DANBOORU_#{method.to_s.upcase}"]
if var.present?
var
else
CustomConfiguration.new.send(method, *args)
end
end
end
end