Closed kylerippey closed 1 month ago
Hi @kylerippey, thanks for the PR! Pushed a fix in the commit above that I think preserves backwards compatibility slightly better.
Pushed a fix in the commit above that I think preserves backwards compatibility slightly better.
Nice fix! Looks like this fixes our deprecation warning as expected. Thank you!
Great, just pushed a new release.
We receive the following deprecation warning in our Rails 7.1 app because we use an environment variable to set up
secret_key_base
:In this PR I've attempted to address this by first checking if
Rails.application
responds tosecret_key_base
and it contains a truthy value before falling back to other mechanisms.I don't love the big
if/else
block here, but since all of this is inside of abegin/end
it prevented me from doing an early return.I'd love to hear if you think this is a reasonably safe fix to address these deprecation warnings until 3.0 is released. I also looked into adding some tests, but I didn't see many that were already exercising this behavior so wasn't sure if I should add some or not. I'm happy to do so if you like!
Thanks for your consideration!