Commit e25e95e
committed
Removed base64 and added logger as an explicit add_dependency
Starting with Ruby 3.4, base64 is no longer a bundled gem, and now Thrift does not load in modern Ruby versions:
An error occurred while loading ./spec/types_spec.rb.
Failure/Error: require 'base64'
LoadError:
cannot load such file -- base64
# ./lib/thrift/protocol/json_protocol.rb:21:in '<top (required)>'
# ./lib/thrift.rb:45:in '<top (required)>'
# ./spec/spec_helper.rb:30:in '<top (required)>'
# ./spec/types_spec.rb:20:in '<top (required)>'
Ruby already has ability to serialize and deserialize base64 without requiring the base64 gem,
which is a thin wrapper for syntactic sugar.
Additionally, the code throws a warning at the moment, which will become an error in Ruby 3.5:
/code/lib/thrift/processor.rb:20: warning: logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add logger to your Gemfile or gemspec to silence this warning.
Added logger as an explicit dependency to avoid this warning.1 parent 10d5a65 commit e25e95e
2 files changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
311 | 309 | | |
312 | 310 | | |
313 | 311 | | |
314 | | - | |
| 312 | + | |
315 | 313 | | |
316 | 314 | | |
317 | 315 | | |
| |||
555 | 553 | | |
556 | 554 | | |
557 | 555 | | |
558 | | - | |
| 556 | + | |
559 | 557 | | |
560 | 558 | | |
561 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
| |||
0 commit comments