Commit graph

247 commits

Author SHA1 Message Date
David Rodríguez
a0b501effe [rubygems/rubygems] Remove out of date TODO
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.

5a0b06b84d
2025-07-30 11:19:23 +09:00
David Rodríguez
95fdaa5c3b
(Temporarily?) delay path changes and global cache changes
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-28 10:01:58 +09:00
David Rodríguez
60fca1defc
Cancel --force deprecation in favor of --redownload
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 11:10:46 +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
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
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
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
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
441f18df52
Skip to Bundler 4 directly 2025-06-19 10:23:36 +09:00
David Rodríguez
382b8eadae
[rubygems/rubygems] Fix grammar in bundle config deprecation message
d23b3d61ac
2025-06-19 10:23:36 +09:00
Randy Stauner
b5beb19825 [rubygems/rubygems] Validate dependencies when doing bundle install
b0983f392f
2025-06-11 08:48:55 +09:00
Samuel Giddins
c0a1e877b3
Move most of Bundler::GemHelpers to Gem::Platform
This will help centralize wheel platform selection logic eventually

Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
2025-06-06 10:22:18 +09:00
TangRufus
204e3c58e1 [rubygems/rubygems] Only ignore .gitignore when generating gems with git
aec5a7887d
2025-06-03 08:06:39 +09:00
TangRufus
9024caa1d6 [rubygems/rubygems] Ignore Gemfile, gems.rb & gems.locked according to init_gems_rb preference
88aeb66f41
2025-06-03 08:06:31 +09:00
TangRufus
2667df27e9 [rubygems/rubygems] Remove .git from spec.files default ignore list
4f96e12ff3
2025-06-03 08:06:13 +09:00
TangRufus
ab63fb0e3b [rubygems/rubygems] Rename ignore_files to ignore_paths
c07e3a88aa
2025-06-03 08:06:05 +09:00
TangRufus
636ff31c4e [rubygems/rubygems] Add .gitignore, gems.rb & gems.locked into spec.files default ignore list
6390ed7a2b
2025-06-03 08:05:49 +09:00
TangRufus
63ae1d289a [rubygems/rubygems] Remove features/ from spec.files default ignore list
77ba4192a7
2025-06-03 08:05:39 +09:00
TangRufus
68345e2930 [rubygems/rubygems] Only ignore test/ when generating gems with minitest or test-unit
c464f2036a
2025-06-03 08:05:31 +09:00
TangRufus
959bde8643 [rubygems/rubygems] Suffix .circleci with / in spec.files in the .gemspec template
e48c6beaf6
2025-06-03 08:05:07 +09:00
TangRufus
3691c5409d [rubygems/rubygems] Suffix .github with / in spec.files in the .gemspec template
edf13f7e60
2025-06-03 08:04:59 +09:00
TangRufus
68d64f464a [rubygems/rubygems] Exclude spec from spec.files in the .gemspec template only when using RSpec
a42387b8be
2025-06-03 08:04:49 +09:00
TangRufus
6b2088cf90 [rubygems/rubygems] Exclude .rspec from spec.files in the .gemspec template
331901941d
2025-06-03 08:04:39 +09:00
TangRufus
a7be563d0b [rubygems/rubygems] Exclude .rubocop.yml and .standard.yml from spec.files in the .gemspec template
9d937d4f7f
2025-06-03 08:04:32 +09:00
TangRufus
4802571729 [rubygems/rubygems] Remove appveyor from spec.files default ignore list
2f2046c97b
2025-06-03 08:04:18 +09:00
TangRufus
04a396409d [rubygems/rubygems] Refactor spec.files ignore list generation
c11539f325
2025-06-03 08:04:04 +09:00
Samuel Giddins
af27688697
[rubygems/rubygems] Remove reference to validate_rust_builder_rubygems_version
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

f8baf13ab0
2025-05-26 11:46:12 +09:00
Samuel Giddins
c9ba3d0bac
[rubygems/rubygems] Bump required_ruby_version to 3.2
Ruby 3.1 was EOL March 2025

Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

29c21b1e78
2025-05-26 11:46:12 +09:00
Randy Stauner
4464cbe5cd [rubygems/rubygems] Fix doctor command parsing of otool output
I have several gem dylibs that have a line matching "(compatibility "
with no file path preceding it.

de9dc2bdc4
2025-05-12 11:09:22 +09:00
Edouard CHIN
56c1a15eb7
[rubygems/rubygems] Warn if TLS 1.2 is not supported
e4f70a3e4f
2025-04-22 11:27:24 +09:00
Edouard CHIN
ff2e0e4173
[rubygems/rubygems] Summarize the diagnostic
40cf54d256
2025-04-22 11:27:24 +09:00
Edouard CHIN
19477ef287
[rubygems/rubygems] Diagnose the bare net/http connection
38a0bdc123
2025-04-22 11:27:23 +09:00
Edouard CHIN
7a10ce8c95
[rubygems/rubygems] Diagnose the RubyGems connection
bf63859e1e
2025-04-22 11:27:23 +09:00
Edouard CHIN
cba7408017
[rubygems/rubygems] Diagnose the bundler connection
0aae094c89
2025-04-22 11:27:23 +09:00
Edouard CHIN
ae308ae523
[rubygems/rubygems] Diagnose when OpenSSL can't be loaded.
e6aa8aabcd
2025-04-22 11:27:23 +09:00
Edouard CHIN
cda29294a9
[rubygems/rubygems] Add the bundle doctor subcommand skeleton:
- The command can either be run using:

  1. `bundle doctor --ssl`
  2. `bundle doctor ssl`

  The later is most useful when you need to specify
  custom ssl options (such as the verify mode or the
  TLS version when running the diagnostic).

  The implementation will follow in the next commits.

993d12874c
2025-04-22 11:27:23 +09:00
Edouard CHIN
c2e58a9043
[rubygems/rubygems] Define bundler doctor as a subcommand
- See explanation in previous commit 170890befb

8f1b5a4479
2025-04-22 11:27:23 +09:00
Edouard CHIN
89d1af9af3
Move the doctor command into a subfolder:
- Adding a new `ssl` option to bundle doctor will make the `Doctor`
  command quite bloated. The "diagnose ssl" option will also have
  children option to allow passing which host or which tls version
  you want to diagnose and I feel these options don't belong in the
  doctor command.
  So my intention in this commit is to prepare to have a new `Doctor`
  subcommand and allow for better organisation of the code:

  The command will be:

  `bundle doctor` -> Run exactly the same as before.
  `bundle doctor --ssl` -> Run the doctor command and diagnose SSL
  with default options (rubygems.org as the host and verify peer as
  the verify mode)
  `bundle doctor ssl --host github.com` -> Run the ssl subcommand and
  pass a specific host.

  This commit just renames a file in order to avoid big diff chunks.
2025-04-22 11:27:23 +09:00
Sean Collins
71e340881f [rubygems/rubygems] Switch inject to use shorthand hash syntax
ba5a62fd04
2025-03-10 12:43:36 +09:00
David Rodríguez
5284719273 [rubygems/rubygems] Refactor handling platform removals
And make it consistent with platform additions.

64342ae404
2025-02-25 15:36:46 +09:00
Edouard CHIN
71f0c37473 [rubygems/rubygems] Modify bundle doctor to not report issue when files aren't writable:
- ### Problem

  Running `bundle doctor` warn about files that aren't writable.
  This makes the output of `bundle doctor` very verbose for something
  I believe isn't really an issue.

  ### Context

  Rubygems keeps the files original permission at the time the gem
  is packaged.
  Many gem maintainers have decided that the permissions of the files
  in their bundled would be 0444, this includes amongst others:
  minitest, selenium, brakeman...

  Any git gems that had a 0444 permissions at some point in its git
  history would also be reported (as bundle doctor look in the
  `cache/bundler/git/<gem>/object` path).

  While it completely make sense to report when files aren't readable,
  maybe it's worth questioning the usefulness of reporting files
  that can't be written and what problem this causes to the user
  (if any).

  ### Solution

  Removed the check for unwritable file.

  ### Side note

  I also tweaked the "No issues ..." message logic as it was doing
  the opposite (reporting an issue when there is none and vice versa).
  This wasn't caught in tests because as a stub on `Bundler.ui.info`
  was missing.

9a426b9495
2025-02-25 15:36:46 +09:00
David Rodríguez
78ef59acf7 [rubygems/rubygems] Refine messages about gem installations being missing
The previous wording was too specific, there may be situations when the
gem has actually never installed (so never deleted either).

e4a0d71fbe
2025-02-06 15:57:59 +09:00
Hiroshi SHIBATA
470784cbd9 Expand stub-out scope of Fiddle.dlopen 2025-02-05 07:36:59 +09:00
David Rodríguez
56e2ef2468 [rubygems/rubygems] Fix bundle console unnecessarily trying to load IRB twice
f9bf58573f
2025-01-31 14:34:29 +09:00
David Rodríguez
3cff46c521 [rubygems/rubygems] Remove unnecessary error handling
These gems always define their main namespace and I don't think that
will ever change.

6663cbed53
2025-01-31 14:34:28 +09:00
David Rodríguez
1c8fc25b88 [rubygems/rubygems] Fix broken link in bundle issue output
0909f07f30
2025-01-20 13:50:29 +09:00
David Rodríguez
11c9e4f1ce [rubygems/rubygems] Fix bundle outdated <GEM> failing if gems not installed
694d5f444e
2024-12-26 18:09:15 +00:00
sodacris
e18fb1281a [rubygems/rubygems] add relative path support for bundle exec
c982085f86
2024-12-04 08:34:57 +00:00