Closed superchilled closed 10 months ago
Merging #290 (6a70b8e) into main (b3122cb) will increase coverage by
0.00%
. The diff coverage is100.00%
.:exclamation: Current head 6a70b8e differs from pull request most recent head d4c1a06. Consider uploading reports for the commit d4c1a06 to get more accurate results
@@ Coverage Diff @@
## main #290 +/- ##
=======================================
Coverage 97.93% 97.94%
=======================================
Files 108 108
Lines 1988 1991 +3
=======================================
+ Hits 1947 1950 +3
Misses 41 41
Files | Coverage Δ | |
---|---|---|
lib/vonage/config.rb | 97.93% <100.00%> (+0.04%) |
:arrow_up: |
lib/vonage/logger.rb | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This PR updates some Sorbet type signatures for
Logger
creation and assignment. The motivation for this change is that in Rails7.1.0
a change has been made toRails.logger
so that it no longer inherits from Ruby's std libLogger
class. This means thatRails.logger
in7.1.0
is invalid according to the type signatures in the Vonage Ruby SDK. See this issue for more detail.The specific fix is to update the type signatures for logger creation and assignment to conditionally allow Rails 7.1's
ActiveSupport::BroadcastLogger
as a type if it is defined. The signatures updated are:Vonage::Config#logger=
Vonage::Logger#initialize
Thanks to @ohbarye for the detailed bug report and proposed fix.