If you don't want to use dotenv files, we don't ignore them.
This commit is contained in:
parent
4fb66fca72
commit
ff2c381f2a
1 changed files with 8 additions and 4 deletions
|
@ -4,13 +4,17 @@ require File.expand_path('../application', __FILE__)
|
|||
|
||||
Encoding.default_external = Encoding::UTF_8
|
||||
Encoding.default_internal = Encoding::UTF_8
|
||||
|
||||
@ignore_dotenv = ENV['IGNORE_DOTENV']
|
||||
unless (@ignore_dotenv)
|
||||
require 'dotenv'
|
||||
Dotenv.load ".env"
|
||||
end
|
||||
@env = Rails.env || 'development'
|
||||
@org_name = ENV['ORG_NAME'] || 'default_organization'
|
||||
puts "config files .env .env.#{@env} ./config/settings.#{@env}.yml#{ @env != 'test' ? " ./config/#{@org_name}.yml": " "} #{ @env != 'test' ? " ./config/#{@org_name}.#{@env}.yml": " "} #{ @env == 'test' ? "./config/settings.test.yml" : ""}"
|
||||
unless @ignore_dotenv
|
||||
Dotenv.load ".env.#{@env}" if File.file?(".env.#{@env}")
|
||||
end
|
||||
if Rails.env == 'test'
|
||||
Settings.add_source!("./config/settings.test.yml")
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue