Changelog¶ ↑
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶ ↑
3.0.0 - 2026-09-26¶ ↑
See UPGRADING.md for the changes code written for 2.x needs, and the README for how each feature behaves.
Added¶ ↑
-
Add
autocomplete,contents,attestations,timeframe_versions,reverse_dependency_versions,profile,me,webauthn_verification, andwebauthn_verification_statusfor endpoints 2.x had no method for -
Add
create_api_keyandupdate_api_key, which take the scopes to grant asscopes: %i[push_rubygem]and check them againstGems::APIKey::SCOPES -
Add trusted publishing: an
id_tokenoption,exchange_trusted_publisher_token, andtrusted_publishers,trusted_publisher,add_trusted_publisher, andremove_trusted_publisher -
Add
api_key_roles,api_key_role,assume_api_key_role,oidc_providers,oidc_provider,oidc_id_tokens, andoidc_id_tokenfor OIDC API key roles -
Add an
otpoption for multi-factor authentication, which falls back toGEM_HOST_OTP_CODEasgem pushdoes -
Add a
pageoption toautocomplete, aplatformoption toversion,contents,attestations, anddownloads, aruby_abioption toversion,contents, andyank, and aroleoption toadd_ownerandupdate_owner -
Add
search_eachandtimeframe_versions_each, which walk the pages of those endpoints lazily -
Wrap responses in
Gem,Version,Dependency,Owner,Profile,WebHook,Downloads,APIKey,APIKeyRole,OIDCProvider,OIDCIDToken,TrustedPublisher,WebAuthnVerification, andWebAuthnVerificationStatusobjects, which are immutable, compare by identity, matchcase/inpatterns, inspect as short summaries, and keep[]andto_hfor the raw response -
Order gems and versions with
<=>as RubyGems orders version numbers, so"7.0.10"sorts after"7.0.9" -
Compare and order gems and versions by the platform and Ruby ABI of their build, and show both in
inspectwhere they tell one build from another -
Accept those objects wherever a gem name, version, owner, web hook URL, or API key is expected; a gem or version given as the gem acts on the version and build it names
-
Add
open_timeout,read_timeout,write_timeout,keep_alive_timeout,debug_output,proxy_url, andmax_redirectsoptions, set globally or per client -
Add
max_retriesandmax_retry_delayoptions: a 429, 502, 503, or 504, or a request the network lost, is sent again twice by default, honoringRetry-After, for the requests it is safe to send again -
Add
ca_file,ca_path,cert_store,client_cert, andclient_keyoptions, for hosts with certificates of their own and for mutual TLS -
Reuse connections across requests to the same host;
Client#closecloses them, and a client built with a block closes them when the block returns -
Add a
headersoption to the client’s raw request methods -
Add
key_configured?,otp_configured?,default_host, anddefault_otp, and a host argument todefault_key -
Add
HTTPErrorsubclasses, such asNotFoundandTooManyRequests, withClientErrorandServerErrorfor the other statuses, which exposeresponse,code, andretry_after -
Add
NetworkError,InvalidResponse,TooManyRedirects, andNoLatestVersion, raised in place of the standard library errors 2.x let through -
Add RBS signatures, with a manifest naming the standard libraries they refer to
Changed¶ ↑
-
Collapse
Gems::V1andGems::V2into oneGems::Client -
Take keyword arguments in
Gems::Client.new,Gems.new, the raw request methods,search,yank,reverse_dependencies, andpush; unknown options raiseArgumentError -
Rename
infotorubygem,Gems::V2.infotoversion,gemstoowned_gems, andGemErrortoError -
Raise
ArgumentErrorfromyankwhen no version is given, rather than yanking the latest version -
Split
total_downloadsintototal_downloads(all gems) anddownloads(one gem) -
Return a version string from
latest_versionand a flat list ofWebHookobjects fromweb_hooks -
Delegate only the API methods from the
Gemsmodule, to one client,Gems.client, which also has the raw request methods -
Send the API key rather than the username and password to every endpoint but
create_api_key,update_api_key, andme, which take only the username and password -
Resolve the default API key as
gem pushdoes, for the host each request is sent to, and read it andRUBYGEMS_HOSTwhen they are needed rather than when the library is required -
Return
nilfromdefault_key, rather than exiting the process, when~/.gem/credentialshas the wrong permissions -
Push to the client’s host by default, streaming the gem rather than reading it into memory
-
Follow 301, 302, and 303 redirects with GET, and follow a redirect to another host without the credentials or headers of the request
-
Raise
ArgumentErrorwhere an invalid host, proxy URL, certificate path, timeout, role, or dependency type is given, rather than when a request is made or the server ignores it -
Name the library and the Ruby it runs on in the default
User-Agent -
Define
Gems::VERSIONingems/library_version, so the gemspec reads it without loading the library
Deprecated¶ ↑
-
Deprecate
GemError, kept as an alias ofError
Removed¶ ↑
-
Require Ruby 3.4 or later
-
Remove
dependencies,api_key, andunyank, whose endpoints RubyGems.org has retired;create_api_keyreplacesapi_key -
Remove the
pageoption oflatestandjust_updated, whose endpoints answer with the same 50 gems for every page -
Remove
Gems::Version::MAJOR,MINOR,PATCH, andPRE;Gems::Versionis now a response object -
Remove
Gems::AbstractClient,Gems::Request,Gems::BaseClient,Gems.options,Gems::Configuration::VALID_OPTIONS_KEYS, andGems::Configuration::DEFAULT_KEY
Security¶ ↑
-
Verify TLS certificates, which 2.x did not; there is no option to turn verification off
-
Send the RubyGems.org API key to RubyGems.org alone, and no key to a host nothing is stored for
-
Redact credentials from
debug_output, including the API keys responses carry -
Escape the values interpolated into request paths, and refuse a path that leaves the client’s host
-
Send the name of a pushed gem file rather than its path
-
Keep credentials out of the
inspectoutput of clients and out of error messages