mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Fix CI failures
This commit is contained in:
parent
04134fa830
commit
e6a2420e32
2 changed files with 6 additions and 2 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
||||
ruby: [2.6, 2.7, '3.0', 3.1, 'jruby-9.3']
|
||||
ruby: [2.6, 2.7, '3.0', 'jruby-9.3']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ruby/setup-ruby@v1
|
||||
|
|
|
@ -124,7 +124,11 @@ module Sinatra
|
|||
raise UnsupportedConfigType unless ['.yml', '.yaml', '.erb'].include?(File.extname(file))
|
||||
logger.info "loading config file '#{file}'" if logging? && respond_to?(:logger)
|
||||
document = ERB.new(IO.read(file)).result
|
||||
yaml = YAML.load(document)
|
||||
yaml = begin
|
||||
YAML.load(document, aliases: true)
|
||||
rescue ArgumentError
|
||||
YAML.load(document)
|
||||
end
|
||||
config = config_for_env(yaml)
|
||||
config.each_pair { |key, value| set(key, value) }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue