Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Base64 dependency warning #776

Closed
bkuhlmann opened this issue Jan 20, 2024 · 4 comments
Closed

Fix Base64 dependency warning #776

bkuhlmann opened this issue Jan 20, 2024 · 4 comments
Assignees

Comments

@bkuhlmann
Copy link

bkuhlmann commented Jan 20, 2024

Why

Hello. 👋 I'm seeing the following warnings when using this gem with Ruby 3.3.0:

warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of http-5.1.1 to add base64 into its gemspec.

How

Here's a quick script to reproduce:

#! /usr/bin/env ruby
# frozen_string_literal: true

# Save as `demo`, then `chmod 755 demo`, and run as `./demo`.

require "bundler/inline"

gemfile true do
  source "https://rubygems.org"
  gem "http"
end

Running the above will produce the warning mentioned above. The warning is due to this file (http-5.1.1/lib/http/chainable.rb:3) requiring base64.

Notes

The fix, add the following to the gemspec:

spec.add_dependency "base64", "~> 0.2"

Here's the environment I'm using:

  • macOS: macOS 13.6.3
  • Ruby: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +YJIT [arm64-darwin22.6.0]
  • HTTP: 5.1.1
@ixti ixti self-assigned this Jan 21, 2024
@ixti
Copy link
Member

ixti commented Jan 21, 2024

It was fixed some time ago in the main branch. I will cut a release today.

@bkuhlmann
Copy link
Author

Thanks, that'd be great!

@ixti
Copy link
Member

ixti commented Feb 5, 2024

Released as 5.2.0

@ixti ixti closed this as completed Feb 5, 2024
@ixti
Copy link
Member

ixti commented Feb 5, 2024

Please see 5.2.0 changelog for potentially breaking changes: https://github.com/httprb/http/blob/5-x-stable/CHANGELOG.md

@ixti ixti mentioned this issue Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants