palkan / anyway_config

Configuration library for Ruby gems and applications
MIT License
778 stars 52 forks source link

Local files stoped working after upgrading from 2.0.0.pre2 to 2.0.0.rc1 #54

Closed storkvist closed 4 years ago

storkvist commented 4 years ago

What did you do?

Upgraded gem from 2.0.0.pre2 to 2.0.0.rc1.

What did you expect to happen?

Everything will work as expected.

What actually happened?

Local files stopped working.

Additional context

# config/development.rb
# ...
Anyway::Settings.use_local_files = true

Environment

Ruby Version:

2.7.0-p0

Framework Version (Rails, whatever):

Rails 6.0.2.2

Anyway Config Version:

2.0.0.rc1

palkan commented 4 years ago

Thanks for the report!

Could you please tell a bit more about your setup:

storkvist commented 4 years ago

Yes, sure. I created a separate repository to show off this bug: https://github.com/storkvist/anyway_config_issue54.

It has 2 config files: dummy.yml and dummy.local.yml.

If I use 2.0.0.pre2 than I get:

anyway_config_issue54 master % be rails c
Running via Spring preloader in process 18975
Loading development environment (Rails 6.0.2.2)
>> AnywayConfigIssue54.config
=> {"some_config"=>"some_value", "db"=>{"port"=>5433}}

With 2.0.0.rc1 I get:

anyway_config_issue54 master % be rails c
Running via Spring preloader in process 18531
Loading development environment (Rails 6.0.2.2)
>> AnywayConfigIssue54.config
=> {"some_config"=>"some_value"}

Update: The configuration is loaded in application.rb.

palkan commented 4 years ago

Thanks for the reproduction!

Should be fixed in master.