summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2025-08-18[rubygems/rubygems] Fix `bundle update foo` not upgrading foo to latest in a ↵David Rodríguez
specific case If upgrading `foo` needs an indirect dependency to be downgraded, Bundler would not be able to upgrade foo. This is because when calculating the latest resolvable version of foo, Bundler was still adding lower bound requirements on the locked versions of all dependencies to avoid downgrades, effectively pinning foo to a version older than the latest. To fix this, instead of creating a second "unlocked" definition to figure out the latest resolvable version, create a second unlocked resolver, and DO NOT add lower bound requirements to it. https://github.com/rubygems/rubygems/commit/00cc0ecc69
2025-08-18[rubygems/rubygems] Introduce `bundle list --format=json`Schneems
The `bundle list` command is a convenient way for human to know what gems and versions are available. By introducing a `--format=json` option, we can provide the same information to machines in a stable format that is robust to UI additions or modifications. It indirectly supports `Gemfile.lock` modifications by discouraging external tools from attempting to parse that format. This addition allows for the scripting of installation tools, such as buildpacks, that wish to branch logic based on gem versions. For example: ```ruby require "json" command = "bundle list --format=json" output = `#{command}` raise "Command `#{command}` errored: #{output}" unless $?.success? railties = JSON.parse(output).find {|gem| gem["name"] == railties } if railties && Gem::Version.new(railties["version"]) >= Gem::Version.new("7") puts "Using Rails greater than 7!" end ``` The top level is an object with a single key, "gems", this structure allows us to add other information in the future (should we desire) without having to change the json schema. https://github.com/rubygems/rubygems/commit/9e081b0689
2025-08-18[rubygems/rubygems] Fix Bundler printing more flags than actually passed in ↵David Rodríguez
verbose mode This reverts commit https://github.com/rubygems/rubygems/commit/bea87eab0b17 and adds a regression spec for it. https://github.com/rubygems/rubygems/commit/ac98107864
2025-08-18[rubygems/rubygems] Fix `bundle cache --no-all` not printing a deprecation ↵David Rodríguez
warning Like others, it's a remembered option which we are deprecating in favor of configuration. https://github.com/rubygems/rubygems/commit/9ea55e0df2
2025-08-18[rubygems/rubygems] Don't worry about missing Makefile.Samuel Williams
https://github.com/rubygems/rubygems/commit/0e92346d88
2025-08-18[rubygems/rubygems] Removed to workaround for Bundler 2.2.Hiroshi SHIBATA
The current oldest support Ruby version is 3.2. And Ruby 3.2 bundled Bundler 2.5. It means RG 4.0 can drop to support Bundler 2.2. https://github.com/rubygems/rubygems/commit/592ac09b5c
2025-08-14[ruby/prism] Be more defensive in the parser translator lexerEarlopain
Generally I have been good about safely accessing the tokens but failed to properly guard against no tokens in places where it could theoretically happen through invalid syntax. I added a test case for one occurance, other changes are theoretical only. https://github.com/ruby/prism/commit/4a3866af19
2025-08-14[ruby/resolv] Require rbconfig in resolv.rbRyan Davis
Uses ::RbConfig::CONFIG['host_os'] Found with ruby --disable-gems -e '...' https://github.com/ruby/resolv/commit/5a5a81ce98
2025-08-08[ruby/optparse] Use `~/.config` only if `$XDG_CONFIG_HOME` is unset or emptyNobuyoshi Nakada
https://github.com/ruby/optparse/commit/2f9c7500a3
2025-08-06[rubygems/rubygems] implement fallbackpjsk
https://github.com/rubygems/rubygems/commit/e09a6ec815
2025-08-06[rubygems/rubygems] make things a bit more testablepjsk
https://github.com/rubygems/rubygems/commit/29c085f5f5
2025-08-06[rubygems/rubygems] Use IMDSv2 for S3 instance credentialsFrank Olbricht
https://github.com/rubygems/rubygems/commit/fa1c51ef59
2025-08-06[rubygems/rubygems] Allow to use Gem::Deprecate#rubygems_deprecate and ↵Hiroshi SHIBATA
rubygems_deprecate_command without rubygems.rb https://github.com/rubygems/rubygems/commit/4925403686
2025-08-06[rubygems/rubygems] Deprecate Gem::Specification#datadir and will remove it ↵Hiroshi SHIBATA
at RG 4.1 https://github.com/rubygems/rubygems/commit/e99cdab171
2025-08-06[rubygems/rubygems] Added ability for changing deprecated version from only ↵Hiroshi SHIBATA
next major https://github.com/rubygems/rubygems/commit/15177de84e
2025-08-06[rubygems/rubygems] Removed compatibility.rb that file is for Ruby 1.9.Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/120c174e7f
2025-08-04When reading from stdin, put a wrapper around the IO objectAaron Patterson
The purpose of this commit is to fix Bug #21188. We need to detect when stdin has run in to an EOF case. Unfortunately we can't _call_ the eof function on IO because it will block. Here is a short script to demonstrate the issue: ```ruby x = STDIN.gets puts x puts x.eof? ``` If you run the script, then type some characters (but _NOT_ a newline), then hit Ctrl-D twice, it will print the input string. Unfortunately, calling `eof?` will try to read from STDIN again causing us to need a 3rd Ctrl-D to exit the program. Before introducing the EOF callback to Prism, the input loop looked kind of like this: ```ruby loop do str = STDIN.gets process(str) if str.nil? p :DONE end end ``` Which required 3 Ctrl-D to exit. If we naively changed it to something like this: ```ruby loop do str = STDIN.gets process(str) if STDIN.eof? p :DONE end end ``` It would still require 3 Ctrl-D because `eof?` would block. In this patch, we're wrapping the IO object, checking the buffer for a newline and length, and then using that to simulate a non-blocking eof? method. This commit wraps STDIN and emulates a non-blocking `eof` function. [Bug #21188]
2025-08-03[ruby/optparse] Expand literal home paths onlyNobuyoshi Nakada
Paths in environment variables should already be expanded. The base name of the program is also not subject to expansion. https://github.com/ruby/optparse/commit/181752391c
2025-08-01[ruby/prism] Match RubyParser behavior for -> lambda argsJustin Collins
https://github.com/ruby/prism/commit/9f55551b09
2025-08-01[ruby/prism] RubyParser translation for stabby lambdas with `it`Justin Collins
https://github.com/ruby/prism/commit/c2e372a8d8
2025-07-31Suppress maybe-uninitialized warningsNobuyoshi Nakada
2025-07-30[rubygems/rubygems] Remove unnecessary endless loop detectionDavid Rodríguez
Fixes a TODO now that no reports have been reported in a while. https://github.com/rubygems/rubygems/commit/f10dc84e7b
2025-07-30[rubygems/rubygems] Bump vendored thor to 1.4.0David Rodríguez
https://github.com/rubygems/rubygems/commit/8078a747b3
2025-07-30[rubygems/rubygems] Fix truffleruby failing to install sorbet-static when ↵David Rodríguez
there's no lockfile The generic Ruby platform was getting unconditionally added in truffleruby, preventing resolution in situations where there's no generic ruby version (sorbet-static). Instead, the generic platform should be considered per dependency, not globally. https://github.com/rubygems/rubygems/commit/a96afc5351
2025-07-30[rubygems/rubygems] Remove JRuby workaroundDavid Rodríguez
Original issue was fixed in JRuby 9.3.0.0, which seems old enough for us to remove the workaround. https://github.com/rubygems/rubygems/commit/d285148d39
2025-07-30[rubygems/rubygems] Remove out of date TODODavid Rodríguez
After digging into git history a bit, I figure this was about unifying `bundle cache` and `bundle package`, which already happened a while ago. So remove this TODO since it's now misleading. https://github.com/rubygems/rubygems/commit/5a0b06b84d
2025-07-29[ruby/prism] Do not use `0` to indicate the latest ruby version to parseEarlopain
This makes it hard to do version checks against this value. The current version checks work because there are so few possible values at the moment. As an example, PR 3337 introduces new syntax for ruby 3.5 and uses `PM_OPTIONS_VERSION_LATEST` as its version guard. Because what is considered the latest changes every year, it must later be changed to `parser->version == parser->version == PM_OPTIONS_VERSION_CRUBY_3_5 || parser->version == PM_OPTIONS_VERSION_LATEST`, with one extra version each year. With this change, the PR can instead write `parser->version >= PM_OPTIONS_VERSION_CRUBY_3_5` which is self-explanatory and works for future versions. https://github.com/ruby/prism/commit/8318a113ca
2025-07-28[ruby/tsort] Add `changelog_uri` to gemspec metadataJason Garber
Adds a link to the GitHub Releases page for this gem consistent with other gems in the Ruby organization. Existing examples include: - [json](https://github.com/ruby/json/blob/master/json.gemspec) - [ostruct](https://github.com/ruby/ostruct/blob/master/ostruct.gemspec) https://github.com/ruby/tsort/commit/8086bb33bc
2025-07-28[ruby/shellwords] shellwords.gemspec: Avoid configuring exe/ directoryOlle Jonsson
This gem does not ship any executables. https://github.com/ruby/shellwords/commit/7da06b91ff
2025-07-28(Temporarily?) delay path changes and global cache changesDavid Rodríguez
There are several issues with these which I'm not sure I'll have time to address properly. I prefer to keep our default branch in a releasable state just in case. Once they are fixed, this can be reverted.
2025-07-27[ruby/English] Exclude unused files from gemNobuyoshi Nakada
https://github.com/ruby/English/commit/6bea25038b
2025-07-25[rubygems/rubygems] Document missing options from man pages:Edouard CHIN
- The `bundle plugin uninstall --all` was missing. - The `bundle plugin install --local-git` was missing due to being deprecated. We decided to reintroduce the doc for more clarity. https://github.com/rubygems/rubygems/commit/4da252945c
2025-07-25[rubygems/rubygems] Fix spacing in bundle gem newgem.gemspec.ttMartin Emde
The changelog line was generating indented more than it should. https://github.com/rubygems/rubygems/commit/da6109ef5b
2025-07-22[rubygems/rubygems] Workaround RVM issue when using Bundler <= 2.5.22David Rodríguez
Old versions of BUndler need a workaround to support nested `bundle exec` invocations by overriding `Gem.activate_bin_path`. However, RubyGems now uses this new `Gem.activate_and_load_bin_path` helper in binstubs, which is of course not overridden in those Bundler versions since it didn't exist at the time. So, include the override here to workaround that. https://github.com/rubygems/rubygems/commit/e5ed95e242
2025-07-19[ruby/fileutils] Make `ln_s` forward `target_directory` to `ln_sr`Nobuyoshi Nakada
https://github.com/ruby/fileutils/commit/b487f09eed
2025-07-19[ruby/fileutils] A workaround for RBSNobuyoshi Nakada
https://github.com/ruby/fileutils/commit/c3abf39e7a
2025-07-19[ruby/fileutils] A workaround for RBSNobuyoshi Nakada
https://github.com/ruby/fileutils/commit/fde0f0713a
2025-07-19[ruby/fileutils] Just the parent path of the destination symlink should existNobuyoshi Nakada
https://github.com/ruby/fileutils/commit/71225b1b46
2025-07-19[ruby/fileutils] FileUtils.remove_dir checks directoryErik Berlin
https://github.com/ruby/fileutils/commit/f0d7fc817b
2025-07-19[ruby/fileutils] Use shorter symlink by real pathsNobuyoshi Nakada
https://github.com/ruby/fileutils/commit/277f7f2ff8
2025-07-19[ruby/fileutils] Fix up `FileUtils#ln_sr`Nobuyoshi Nakada
https://github.com/ruby/fileutils/commit/2836a164ed
2025-07-18[ruby/fileutils] If `noop`, return before checking the argumentNobuyoshi Nakada
Get rid of failure in rbs. https://github.com/ruby/fileutils/commit/e44b7b366c
2025-07-18[ruby/fileutils] [DOC] Fix optional argument descriptionsAkihiko Odaki
Several optional positional arguments were incorrectly denoted as keyword arguments so correct them. https://github.com/ruby/fileutils/commit/c25f069f96
2025-07-18[ruby/fileutils] Fix `ln_sf` with multiple sources and `target_directory: false`Nobuyoshi Nakada
In this case, an ArgumentError is now raised rather than ignoring the option, just as GNU coreutils' `ln` would error on the command line. Fixes https://github.com/ruby/fileutils/pull/128 as well. https://github.com/ruby/fileutils/commit/4fc578a75f
2025-07-17Set development version to Bundler 2.8.0.dev and RubyGems 3.8.0.devDavid Rodríguez
Next version for both will be 4.0.0, however, extra work is necessary to get CI passing against the new major. So for now, I'm bumping just the minor version.
2025-07-17Cancel `--force` deprecation in favor of `--redownload`David Rodríguez
I realized `--redownload` is not a good name, because it does not necessarily redownloads gems. It only forces reinstallation even if gem is already installed. So I believe `--force` is actually a better name and the introduction of `--force` was a misunderstanding of what the `--force` flag did at the time. Let's cancel the deprecation of `--force`. For now the `--redownload` alias is left around until we decide what to do with it.
2025-07-17[rubygems/rubygems] Restore treating "--" as an unknown platformDavid Rodríguez
Rather than crashing when parsing it. https://github.com/rubygems/rubygems/commit/aa0064e4c7
2025-07-17[rubygems/rubygems] Fix `bundle binstub --path=foo` not printing a ↵David Rodríguez
deprecation warning Like others, it's a remembered option which we are deprecating in favor of configuration. https://github.com/rubygems/rubygems/commit/801d5dd943
2025-07-17[rubygems/rubygems] Fix `bundle cache path=foo` not printing a deprecation ↵David Rodríguez
message https://github.com/rubygems/rubygems/commit/0af03eea5d
2025-07-17[rubygems/rubygems] Remove unnecessary `flag_deprecation` methodDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d1f8e1c4ac