Commit graph

14659 commits

Author SHA1 Message Date
Hiroshi SHIBATA
65a0f46880 Warn to use tsort for Ruby 3.6 that will be released at 2026 2025-07-10 16:48:16 +09:00
Hiroshi SHIBATA
8cc109a86f [rubygems/rubygems] Update vendored resolv to 0.6.2
afbbc02763
2025-07-10 15:40:07 +09:00
Sweta Sanghavi
4ed2757543 [rubygems/rubygems] Update gemspec based on provided github username when exists
* Conditionally set changelog_url if gh username passed
and enabled
* conditionally set homepage, source code uri, homepage uri when gh
  username passed in
* update documentation to say username will also be used for gemspec file

1c1ada593b
2025-07-09 13:48:37 +09:00
Peteris Rudzusiks
3feba181ed [rubygems/rubygems] Let s3_uri_signer accept the HTTP method
35fc7f9547
2025-07-09 13:48:37 +09:00
Peteris Rudzusiks
5d880b75ef [rubygems/rubygems] Correctly sign S3 HEAD requests
We sometimes send HEAD requests. The s3_uri_signer.rb code allways assumed GETs.
This lead to consistently getting 403 responses back from S3. Recently, S3
attempted to change the behaviour of how 403s are handled when TCP connections
are reused,  which escalated this bug from "just noise" to "breaks gem installs".
They've reverted that behaviour, so the severity of this problem is back to
"just noise". Either way, it's a bug in rubygems and warrants a fix it.

c38f502b73
2025-07-09 13:48:36 +09:00
Peteris Rudzusiks
af6012b942 [rubygems/rubygems] Fix date format in S3 URI signer
%M is minute of the hour.
%m is month of year.
We want the former, not the latter.

d7ca3fa279
2025-07-09 13:48:35 +09:00
David Rodríguez
c6da019770 [rubygems/rubygems] Add blank line after every question
To try make output a bit less messy.

92c8bc6769
2025-07-09 13:48:34 +09:00
David Rodríguez
9942ff7c6a [rubygems/rubygems] Use shorter questions as prompts in bundle gem
If we use long explanations as prompts, sometimes the prompt gets
printed twice due to a (I think) reline/readline bug.

987e0dfa90
2025-07-09 13:48:33 +09:00
David Rodríguez
9b0f9f8139 [rubygems/rubygems] Reword MIT explanation to make sense after reordering
Previous wording assumed explanation was displayed after the question,
not before.

04eb3430ba
2025-07-09 13:48:32 +09:00
Hiroshi SHIBATA
b9782ab893 [ruby/resolv] v0.6.2
a28aaed4cb
2025-07-08 07:25:26 +00:00
Yusuke Endoh
9aa0300db2 [ruby/resolv] Limit decompressed name length
RFC 1035 specifies the 255-octet maximum name length. This change set
checks the limit.

4c2f71b5e8
2025-07-08 07:25:26 +00:00
Nobuyoshi Nakada
680383c642 [ruby/tsort] Exclude gemspec and git-related files
bf2e3a8695
2025-07-08 06:36:18 +00:00
Nobuyoshi Nakada
51de7c75e5 [ruby/tsort] Use git magic signatures to exclude files
ab55dcb7f3
2025-07-08 06:36:17 +00:00
Nobuyoshi Nakada
7578655767 [ruby/tsort] [DOC] Document constants
1d1711ad23
2025-07-08 06:11:04 +00:00
License Update
e1d09ffe5d [rubygems/rubygems] Update SPDX license list as of 2025-07-01
56b55a198a
2025-07-07 11:53:15 +09:00
David Rodríguez
3c552881d4 [rubygems/rubygems] Document that global_gem_cache also caches compiled extensions
265f718be7
2025-07-07 11:53:14 +09:00
David Rodríguez
3eeffea28d [rubygems/rubygems] Improve sentence
"locally to the installing Ruby installation" felt a bit confusing.

c950720719
2025-07-07 11:53:13 +09:00
David Rodríguez
6a5808965b [rubygems/rubygems] Stop allowing calling #gem on random objects
4b8570ae15
2025-07-07 11:53:12 +09:00
David Rodríguez
845e878f88 [rubygems/rubygems] Add default_cli_command documentation
I suspect most experienced users won't like the change in defaults, so
document the setting to toggle back the current default.

93e2e2bef9
2025-07-07 11:53:12 +09:00
David Rodríguez
cd3389e5c2 [rubygems/rubygems] Cancel path_relative_to_cwd change
It only affected the `--path` flag which is actually getting removed, so
I don't think it makes sense to make such change. The current behavior
is reasonable and I tried to codify it with a few more specs.

6f520eb146
2025-07-07 11:53:11 +09:00
David Rodríguez
9918ca1671 [rubygems/rubygems] Remove default_install_uses_path setting
The previous default can already be configured with `bundle config
path.system true`.

cb483b79db
2025-07-07 11:53:00 +09:00
David Rodríguez
fef0051926 [rubygems/rubygems] Remove auto_clean_without_path setting
There already different ways of toggling off this behavior, like setting
`bundle config clean false`, or configuring Bundler to install to system
gems with `bundle config path.system true`.

6daa09f60a
2025-07-07 11:52:58 +09:00
David Rodríguez
81da38b308 Sync RubyGems 2025-07-03 13:43:00 +09:00
Joshua Young
8bf13f2605 Reduce allocations in Gem::BUNDLED_GEMS.warning? 2025-07-02 11:28:23 +09:00
David Rodríguez
d5b4b59500
[rubygems/rubygems] Add Errno::ENETDOWN and Errno::EHOSTUNREACH to non retryable errors
Connection errors as well, so useless to retry.

d2d211651a
2025-07-02 10:34:19 +09:00
David Rodríguez
35dd2b2994
[rubygems/rubygems] Split HTTP_ERRORS into retryable and non retryable
c241a640fc
2025-07-02 10:34:19 +09:00
David Rodríguez
c4c646d1bb
[rubygems/rubygems] Handle connection refused and Errno::EADDRNOTAVAIL as non-retryable
cd529776d5
2025-07-02 10:34:19 +09:00
David Rodríguez
b671133c06
[rubygems/rubygems] Move Bundler::Fetcher::HTTP_ERRORS to Bundler::Fetcher::DOWNLOADER
And deprecate the old constant.

It's only used in this class, and in Bundler::Fetcher there's already
FAIL_ERRORS, very similar to it. So this makes things less confusing.

d32ed63d6f
2025-07-02 10:34:19 +09:00
David Rodríguez
d2204044f4
[rubygems/rubygems] Add back and deprecate Bundler::Fetcher::NET_ERRORS
4a4e5828db
2025-07-02 10:34:19 +09:00
David Rodríguez
7f057e13e0
[rubygems/rubygems] Add a verbose setting to enable verbose output for all commands
0aa1be946f
2025-07-02 10:34:19 +09:00
David Rodríguez
29ceefe595
[rubygems/rubygems] Consistently access CLI flags with symbols
1497d3f146
2025-07-02 10:34:19 +09:00
Earlopain
560edfc8f7
[rubygems/rubygems] Fix bundle console printing bug report template on NameError during require
Followup to https://github.com/rubygems/rubygems/pull/8436

It fixed showing the template when requiring a non-existant file but
user code can do much more than just trying to require other code.

I encountered this particular case because of load order issues, where a library wasn't able
to properly require itself when loaded before some other library.

1c910e5afe
2025-07-02 10:34:19 +09:00
Edouard CHIN
098b0cd7be
[rubygems/rubygems] Update man pages for the bundle doctor ssl subcommand:
- ### Problem

  The man pages for `bundle doctor` which shows up when running
  `bundle doctor --help` are no longer in sync with the CLI.

  ### Context

  In #8624, we introduced a change that modifies the structure of
  the `bundle doctor` command.
  The change added a new subcommand as well a new flag option
  `bundle doctor --ssl`

  Bundler uses man pages to display help of Thor commands, those man
  pages are indepedent from Thor options and need to be kept in sync.

  ### Solution

  Updated the man page for `bundle doctor`. Now that this command is
  a subcommand composed of `bundle doctor diagnose` (the default) ,
  and `bundle doctor ssl`, I modified the man page to follow
  the same markdown structure as other subcommands such as
  [bundle plugin](a902381660/bundler/lib/bundler/man/bundle-plugin.1.ronn)

de047f1458
2025-07-02 10:34:19 +09:00
David Rodríguez
82692b32c1
[rubygems/rubygems] Log when simulate_version is enabled
Tweak version output and verbose mode to be transparent about Bundler
simulating a different version than the real one.

179354d153
2025-07-02 10:34:18 +09:00
David Rodríguez
0e1ca4962f
[rubygems/rubygems] None of the global options have default so this seems unnecessary
bea87eab0b
2025-07-02 10:34:18 +09:00
David Rodríguez
efd8b6d201
[rubygems/rubygems] Use explicit receiver when accessing settings
We have a quality spec that parses all code for explicit usages of
`Bundler.settings[<something>`, to detect undocumented settings. So
using `Bundler.settings` consistently will help catching these things.

ce01bb7cc5
2025-07-02 10:34:18 +09:00
David Rodríguez
cac7644bdb
[rubygems/rubygems] Document the simulate_version setting
1ffd83f6c2
2025-07-02 10:34:18 +09:00
David Rodríguez
daedebd64a
[rubygems/rubygems] Remove print_only_version_number setting
I don't think it makes sense to make this tiny behavior change
configurable. If someone wants to parse version output, and we have a
public setting, they are going to need to accommodate their regexps to
both values of the setting.

In addition to this, I plan to enhance version output with a note about
"simulated version", and in that case, "print_only_version_number" would
no longer hold, since what we print will be more than that anyways.

So, I'd like to remove the setting and change the output in Bundler 4
with no way to opt out.

d84e9dcf09
2025-07-02 10:34:18 +09:00
Hiroshi SHIBATA
9dc60de4fc Fixed inconsistency gemspec location
foo.gemspec should be located under the `lib/foo` directory.
2025-07-01 14:51:09 +09:00
Hiroshi SHIBATA
c3bdf7043c Use git ls-files instead of Dir.glob because optparse has optionparser.rb that is outside of lib/optparse directory
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2025-07-01 11:50:11 +09:00
Hiroshi SHIBATA
05443bb7e9 [ruby/optparse] Use Dir.glob and base keyword arg for the installer of Ruby package
24374b42d3
2025-07-01 01:02:52 +00:00
Earlopain
3071c5d04c [ruby/prism] Fix parser translator with trailing backslash in %W /%I array
https://docs.ruby-lang.org/en/master/syntax/literals_rdoc.html#label-25w+and+-25W-3A+String-Array+Literals
> %W allow escape sequences described in Escape Sequences. However the continuation line <newline> is not usable because it is interpreted as the escaped newline described above.

f5c7460ad5
2025-06-30 12:32:31 +00:00
David Rodríguez
d6bfb73fb6 [rubygems/rubygems] Update some reference to Bundler 3 to Bundler 4
53174e0aa6
2025-06-30 12:56:50 +09:00
Hiroshi SHIBATA
949f125f0f [rubygems/rubygems] Use Bundler.settings[gem.bundle]
b16511598e
2025-06-30 12:56:50 +09:00
Hiroshi SHIBATA
59585b2f43 [rubygems/rubygems] Added manpages
f2826dafce
2025-06-30 12:56:50 +09:00
Hiroshi SHIBATA
5798eeb7c7 [rubygems/rubygems] Added bundle option to method_option
1413086e92
2025-06-30 12:56:50 +09:00
Hiroshi SHIBATA
1cb1b15f77 [rubygems/rubygems] Added --bundle option for triggering bundle install automatically after bundle gem
59ac0db26b
2025-06-30 12:56:50 +09:00
David Rodríguez
9e566141cd [rubygems/rubygems] Remove "double CI" for testing Bundler 4 mode
Since now every functionality that changes in Bundler 4 is under a
setting, we can enable that setting to test the new functionality,
without having to run our full CI twice.

This can actually be seen as increasing coverage, because Bundler 4
functionality will now be tested on Windows, MacOS, or any other
environment where previously "Bundler 4 mode" was not running.

1cb3e009fc
2025-06-30 12:56:50 +09:00
Hiroshi SHIBATA
0761af2399 [rubygems/rubygems] Added push_rubygem to default scope at gem signin command
9b9ba0bf1e
2025-06-30 12:56:50 +09:00
Nobuyoshi Nakada
9598ed9d1c [ruby/optparse] JRuby does not have EXECUTABLE_EXTS in RbConfg::CONFIG
15b2f00b6b
2025-06-29 07:52:46 +00:00