bugsnag / bugsnag-ruby

BugSnag error monitoring & reporting software for rails, sinatra, rack and ruby
https://docs.bugsnag.com/platforms/ruby
MIT License
249 stars 174 forks source link

Replace `Bundler.with_clean_env` with `Bundler.with_unbundled_env` #773

Closed sato11 closed 1 year ago

sato11 commented 1 year ago

Running spec outputs the following deprecation message:

[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /[abridged]/spec/integrations/logger_spec.rb:88)

This commit switches them accordingly and make the test suite free of bundler warnings.

Design

The message says we have another option, Bundler.with_original_env, which I did not opt for as simply replacing with with_unbundled_env seems alright for tests to pass.

Testing

The CI workflow will let us know that bin/rake passes.

johnkiely1 commented 1 year ago

Thanks for the PR, we will review as soon as priorities allow.

imjoehaines commented 1 year ago

Hey @sato11, thanks for the PR

Unfortunately this isn't mergeable as with_unbundled_env doesn't exist in the old Bundler versions that we have to use when testing against Ruby 1.9

These tests are on my list to rewrite as they're quite slow and can break easily, so hopefully this deprecation notice won't be around that much longer anyway

sato11 commented 1 year ago

That's a good point. Thanks for maintaining 👍