Commit graph

14675 commits

Author SHA1 Message Date
Mike Dalessio
2923f42ed7 [ruby/rdoc] fix: C variables should never show up in Ancestors tree
(https://github.com/ruby/rdoc/pull/1217)

If a NormalClass's superclass is a C enclosure, then update the
superclass to point to the RDoc::NormalClass.

This is done in a single pass after all files have been parsed.

Fixes https://github.com/ruby/rdoc/pull/1205.

1ecd9581b1
2024-11-30 12:31:42 +00:00
tomoya ishida
7e02410bf8 [ruby/reline] Don't skip start_with check on encoding-incompatible
candidates
(https://github.com/ruby/reline/pull/787)

8588be652f
2024-11-29 19:07:35 +00:00
Mari Imaizumi
c06dcba964 [ruby/reline] Fix RELINE_TEST_ENCODING
(https://github.com/ruby/reline/pull/743)

* Fix RELINE_TEST_ENCODING

It was not working because it was not environment variable.

* Fix Encoding::CompatibilityError: Shift_JIS is not compatible with UTF-8

Error: test_completion_append_character(Reline::KeyActor::EmacsTest): Encoding::CompatibilityError: Shift_JIS is not compatible with UTF-8
/home/runner/work/reline/reline/lib/reline/line_editor.rb:814:in 'block in Reline::LineEditor#filter_normalize_candidates'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:808:in 'Array#select'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:808:in 'Reline::LineEditor#filter_normalize_candidates'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:831:in 'Reline::LineEditor#perform_completion'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1434:in 'Reline::LineEditor#complete'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:961:in 'Method#call'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:961:in 'Reline::LineEditor#wrap_method_call'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1029:in 'block in Reline::LineEditor#process_key'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:932:in 'Reline::LineEditor#run_for_operators'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1028:in 'Reline::LineEditor#process_key'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1051:in 'Reline::LineEditor#normal_char'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1089:in 'Reline::LineEditor#input_key'
/home/runner/work/reline/reline/test/reline/helper.rb:124:in 'block in Reline::TestCase#input_keys'
/home/runner/work/reline/reline/test/reline/helper.rb:117:in 'Array#each'
/home/runner/work/reline/reline/test/reline/helper.rb:117:in 'Reline::TestCase#input_keys'
/home/runner/work/reline/reline/test/reline/test_key_actor_emacs.rb:948:in 'Reline::KeyActor::EmacsTest#test_completion_append_character'
===============================================================================
===============================================================================
Error: test_continuous_completion_disabled_with_perfect_match(Reline::KeyActor::EmacsTest): Encoding::CompatibilityError: Shift_JIS is not compatible with UTF-8
/home/runner/work/reline/reline/lib/reline/line_editor.rb:814:in 'block in Reline::LineEditor#filter_normalize_candidates'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:808:in 'Array#select'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:808:in 'Reline::LineEditor#filter_normalize_candidates'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:831:in 'Reline::LineEditor#perform_completion'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1434:in 'Reline::LineEditor#complete'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:961:in 'Method#call'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:961:in 'Reline::LineEditor#wrap_method_call'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1029:in 'block in Reline::LineEditor#process_key'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:932:in 'Reline::LineEditor#run_for_operators'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1028:in 'Reline::LineEditor#process_key'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1051:in 'Reline::LineEditor#normal_char'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1089:in 'Reline::LineEditor#input_key'
/home/runner/work/reline/reline/test/reline/helper.rb:124:in 'block in Reline::TestCase#input_keys'
/home/runner/work/reline/reline/test/reline/helper.rb:117:in 'Array#each'
/home/runner/work/reline/reline/test/reline/helper.rb:117:in 'Reline::TestCase#input_keys'
/home/runner/work/reline/reline/test/reline/test_key_actor_emacs.rb:936:in 'Reline::KeyActor::EmacsTest#test_continuous_completion_disabled_with_perfect_match'
===============================================================================
===============================================================================
Error: test_continuous_completion_with_perfect_match(Reline::KeyActor::EmacsTest): Encoding::CompatibilityError: Shift_JIS is not compatible with UTF-8
/home/runner/work/reline/reline/lib/reline/line_editor.rb:814:in 'block in Reline::LineEditor#filter_normalize_candidates'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:808:in 'Array#select'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:808:in 'Reline::LineEditor#filter_normalize_candidates'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:831:in 'Reline::LineEditor#perform_completion'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1434:in 'Reline::LineEditor#complete'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:961:in 'Method#call'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:961:in 'Reline::LineEditor#wrap_method_call'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1029:in 'block in Reline::LineEditor#process_key'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:932:in 'Reline::LineEditor#run_for_operators'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1028:in 'Reline::LineEditor#process_key'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1051:in 'Reline::LineEditor#normal_char'
/home/runner/work/reline/reline/lib/reline/line_editor.rb:1089:in 'Reline::LineEditor#input_key'
/home/runner/work/reline/reline/test/reline/helper.rb:124:in 'block in Reline::TestCase#input_keys'
/home/runner/work/reline/reline/test/reline/helper.rb:117:in 'Array#each'
/home/runner/work/reline/reline/test/reline/helper.rb:117:in 'Reline::TestCase#input_keys'
/home/runner/work/reline/reline/test/reline/test_key_actor_emacs.rb:924:in 'Reline::KeyActor::EmacsTest#test_continuous_completion_with_perfect_match'
===============================================================================
Finished in 2.118582151 seconds.
385 tests, 1762 assertions, 0 failures, 3 errors, 0 pendings, 3 omissions, 0 notifications

4df825c48f
2024-11-29 18:15:46 +00:00
David Rodríguez
ee7ff4a12b [rubygems/rubygems] Backwards compatibility for 2.5.17-2.5.23 caches
9dbfce76cf
2024-11-29 15:27:40 +00:00
David Rodríguez
9a4d91fa95 [rubygems/rubygems] Restore previous application cache format for git sources
And make sure `bundle install --local` can install from it without git.

7d6b631620
2024-11-29 15:27:39 +00:00
David Rodríguez
2a8437a1eb [rubygems/rubygems] Check feature flag earlier
33536aa61c
2024-11-29 15:27:38 +00:00
David Rodríguez
68c7e75349 [rubygems/rubygems] Remove unnecessary early return
These are never equal.

69e369da74
2024-11-29 15:27:37 +00:00
David Rodríguez
34f6334bca [rubygems/rubygems] Improve naming in git sources
The "revision" attribute is actually getting the revision from the
Gemfile.lock file. So I think "locked" is a better term here to avoid
confusion with the revision checked out in `vendor/cache`.

ca5bdebe1f
2024-11-29 15:27:34 +00:00
Akinori MUSHA
ae85fc7271 [ruby/set] Bump VERSION to 1.1.1
1c3cded76a
2024-11-29 10:27:25 +00:00
Nobuyoshi Nakada
ad773b5e99 [ruby/time] [DOC] Make RDoc coverage 100%
c668704413
2024-11-29 01:39:01 +00:00
David Rodríguez
bd88cffd8c [rubygems/rubygems] Test with Ruby 3.4
23d06195fa
2024-11-28 15:52:16 +00:00
Mari Imaizumi
afea58a0ef [ruby/reline] Bump version to 0.5.12
(https://github.com/ruby/reline/pull/786)

d4f6741e7e
2024-11-28 15:22:40 +00:00
Stan Lo
36ed9c2fc9 [ruby/rdoc] Improve how gemspec's files are defined
(https://github.com/ruby/rdoc/pull/1212)

Currently, the gemspec's files are defined by hand, which is error-prone.

For example: https://github.com/ruby/rdoc/pull/1211

This commit uses `Dir.glob` where possible to reduce the risk of that
happening again.

- Additional files added with this approach:

    ```
    # This should have been added by only captured by this commit
    lib/rdoc/parser/prism_ruby.rb

    # These are folders and can be included/ignored either way
    lib/rdoc/generator/template/darkfish
    lib/rdoc/generator/template/darkfish/css
    lib/rdoc/generator/template/darkfish/fonts
    lib/rdoc/generator/template/darkfish/images
    lib/rdoc/generator/template/darkfish/js
    lib/rdoc/generator/template/json_index
    lib/rdoc/generator/template/json_index/js
    ```

- Files that are ignored after this change:

    ```
    # They make no difference on documentation generation
    # Probably can be removed
    lib/rdoc/generator/template/darkfish/.document
    lib/rdoc/generator/template/json_index/.document
    ```

ac2a151f10
2024-11-28 12:18:11 +00:00
tomoya ishida
34a43d5972 [ruby/reline] Fix io_gate.encoding raises IOError in ruby <= 3.0
(https://github.com/ruby/reline/pull/785)

85e20f0031
2024-11-27 18:51:04 +00:00
Hiroshi SHIBATA
24889e44f7 Rename environment name to more descriptive 2024-11-27 16:45:10 +09:00
Ellen Marie Dash
092a48de7e [rubygems/rubygems] [SpecFetcher] If candidates include {name}-ruby or ruby-{name}, recommend those.
d7d33172c1
2024-11-26 22:04:26 +00:00
tomoya ishida
c1dcd1d496 [ruby/reline] KeyStroke handles multibyte character
(https://github.com/ruby/reline/pull/713)

5a8da85f2b
2024-11-26 17:58:43 +00:00
tomoya ishida
def684508c [ruby/irb] Fix indentation of xstring literal
(https://github.com/ruby/irb/pull/1038)

Fixes indent calculation of this input
```
if false
p `ls`
end
```

4217a46f5d
2024-11-26 17:50:30 +00:00
David Rodríguez
2b91a56d40 [rubygems/rubygems] Remove no longer necessary code
9ea1539b08
2024-11-26 15:11:05 +09:00
David Rodríguez
10de74b75b [rubygems/rubygems] Avoid needing a second pass to ignore unlocked gems
When converging locked specifications to select the ones that should be
preserved while resolving, we can avoid having to do a second pass to
ignore the ones that have been explicitly unlocked.

411742703e
2024-11-26 15:11:05 +09:00
David Rodríguez
44ad2e3f38 [rubygems/rubygems] Allow some materialized specs to be missing
As long as some spec in the materialization is complete.

9a673b0bbb
2024-11-26 15:11:05 +09:00
David Rodríguez
36fb7994fe [rubygems/rubygems] Deprecate check parameter to Bundler::SpecSet#for
3041b3d784
2024-11-26 15:11:05 +09:00
David Rodríguez
c76b1ea2a6 [rubygems/rubygems] Keep track of materializations in the original resolve
This gives more flexibility to allow further improvements.

f11a890f5e
2024-11-26 15:11:05 +09:00
David Rodríguez
e15921c694 [rubygems/rubygems] Create LazySpecifications directly with most_specific_locked_platform
So there's no need to pass it around in so many places.

784ab7481b
2024-11-26 15:11:05 +09:00
David Rodríguez
963f98a94f [rubygems/rubygems] Enable Performance/MapCompact cop
0c3a65871a
2024-11-26 15:11:05 +09:00
David Rodríguez
4addaaf4df [rubygems/rubygems] More aggressive Performance/FlatMap cop configuration
d8d68cc00e
2024-11-26 15:11:05 +09:00
David Rodríguez
11e522b913 [rubygems/rubygems] Fix installs of subdependencies of unlocked dependencies to be conservative
When converging specification to pass the set of versions that should be
preserved from the lockfile during resolution, we should make sure all
top level gems are considered, and only exclude those gems themselves
(and not their dependencies) if their locked versions happen to not be
satisfied by an edited Gemfile.

ed2f1b7b88
2024-11-26 15:11:05 +09:00
David Rodríguez
dd400ba630 [rubygems/rubygems] Filter out gems to unlock inside converge_specs
d0f789970f
2024-11-26 15:11:05 +09:00
David Rodríguez
6386d49f9e [rubygems/rubygems] Fix development dependencies considered unnecessarily sometimes
When used with `LazySpecification` objects, `SpecSet#for` was
incorrectly considering development dependencies. This did not cause any
issues because all usages of this method with `LazySpecification`'s are
not strict, meaning the pass `check = false` and ignore incomplete
specifications. But it was still doing more work than necessary because
development dependencies were still added to the `deps` array for
processing and then ignored because of not being found in the spec set.

Same when converging path specifications and replacing their dependencies.

6afca8a95f
2024-11-26 15:11:05 +09:00
David Rodríguez
7c93460331 [rubygems/rubygems] Simplify more
a2bb68a29b
2024-11-26 15:11:05 +09:00
David Rodríguez
d6a0e575c9 [rubygems/rubygems] Don't bother sorting if there's a single element
6dc64f9851
2024-11-26 15:11:05 +09:00
David Rodríguez
83ce2351ff [rubygems/rubygems] Remove no longer necessary code
e1caeecdf8
2024-11-26 15:11:05 +09:00
David Rodríguez
631908d9a8 [rubygems/rubygems] Use platform local variable
6a6041d073
2024-11-26 15:11:05 +09:00
David Rodríguez
6916999fed [rubygems/rubygems] This is about locked_platforms
df2c9eb52f
2024-11-26 15:11:05 +09:00
David Rodríguez
7b66aee0b7 [rubygems/rubygems] Set instance variables in consistent order
c382b606bd
2024-11-26 15:11:05 +09:00
Mike Linksvayer
7be0d50514 [ruby/logger] include license texts in gem
1a64cb552f
2024-11-25 22:31:44 +00:00
David Rodríguez
62b9da7088 [rubygems/rubygems] Fix bundle lock --add-checksums
Due to a typo in the spec, the issue was not caught initially. If
Bundler does not need to re-resolve, `bundle lock` is a noop so Bundler
does not add checksums.

To fix the issue, we do something similar to what `bundle install` does,
just without actually installation. First set the domain (local or
remote) according to whether a re-resolve is necessary, and then
materialize lazy specifications into real specifications, so that
checksums are actually fetched from each source.

84b6f4ee96
2024-11-25 18:14:32 +00:00
David Rodríguez
e7bb505130 [rubygems/rubygems] Make installer code more clear
I always found the `resolve_if_necessary` method pretty confusing
because by reading it, it suggests that resolution always happens, and
the point is whether that needs to be local or remote. This commit tries
to make that more clear.

93d6861ee8
2024-11-25 18:14:31 +00:00
David Rodríguez
c215e95572 [rubygems/rubygems] Most of the times, eagerly resolving is not necessary
All we need is to setup remote or local sources appropriately.

3ceff46a2a
2024-11-25 18:14:31 +00:00
tomoya ishida
0f41cc442e [ruby/reline] Fix tab completion appending quote
(https://github.com/ruby/reline/pull/782)

cbf213291c
2024-11-25 17:38:50 +00:00
gemmaro
1d510a952d [rubygems/rubygems] Fix test task name on generated readme when using test-unit
* bundler/lib/bundler/templates/newgem/README.md.tt (Development): Use the
test_task value to get the correct test task name ("test", not "test-unit").
* bundler/spec/commands/newgem_spec.rb (README.md): Add tests for test task
names for each test frameworks.

2a24708a63
2024-11-25 16:20:52 +00:00
David Rodríguez
e1de5a6e3b [rubygems/rubygems] Fix gemfury credentials getting written to logs in verbose mode
585a6a89d4
2024-11-25 14:57:03 +00:00
David Rodríguez
77990f6751 [rubygems/rubygems] Remove comment about oldest supported version
That's indeed the ideal behavior but it's a mess to maintain because the
version of RubyGems shipped with each patchlevel of Ruby changes. We
could try looking at the `VERSION` constant in `
RbConfig::CONFIG["rubylibdir"` but for now I calling what's in there now
as good enough.

40ccf2b093
2024-11-25 14:56:09 +00:00
David Rodríguez
4e6ada3ae4 [rubygems/rubygems] Remove unnecessary and out of date ruby version check
We already do this check in `setup.rb` itself, which is run earlier.

160cc3f1c5
2024-11-25 14:56:08 +00:00
David Rodríguez
d2acc71d32 [rubygems/rubygems] Remove now dead code
31fadaf2d2
2024-11-25 14:56:08 +00:00
tomoya ishida
bf47b1b523 [ruby/reline] Fix completion quote, preposing and target calculation
bug
(https://github.com/ruby/reline/pull/763)

d3ba7216eb
2024-11-24 15:45:18 +00:00
sodacris
0989400a92 [rubygems/rubygems] fix bundle which commands on windows
9e0018d9fe
2024-11-22 13:36:21 +00:00
Adam Daniels
3b5b34e3ae [rubygems/rubygems] Set $0 to exe when running gem exec to fix name in CLI output
The $0 value is used in many CLI libraries to determine the name of the
application, when displaying help and error messages.

Without setting this value, it defaults to `gem` which can be confusing.

Before:

```
$ gem exec kamal help
Commands:
  gem accessory           # Manage accessories (db/redis/search)
  gem app                 # Manage application
  gem audit               # Show audit log from servers
  gem build               # Build application image
  gem config              # Show combined config (including secrets!)
  gem deploy              # Deploy app to servers
  gem details             # Show details about all containers
  gem docs [SECTION]      # Show Kamal configuration documentation
  gem help [COMMAND]      # Describe available commands or one specific command
  gem init                # Create config stub in config/deploy.yml and secrets stub in .kamal
  gem lock                # Manage the deploy lock
  gem proxy               # Manage kamal-proxy
  gem prune               # Prune old application images and containers
  gem redeploy            # Deploy app to servers without bootstrapping servers, starting kamal-proxy, pruning, and registry login
  gem registry            # Login and -out of the image registry
  gem remove              # Remove kamal-proxy, app, accessories, and registry session from servers
  gem rollback [VERSION]  # Rollback app to VERSION
  gem secrets             # Helpers for extracting secrets
  gem server              # Bootstrap servers with curl and Docker
  gem setup               # Setup all accessories, push the env, and deploy app to servers
  gem upgrade             # Upgrade from Kamal 1.x to 2.0
  gem version             # Show Kamal version
```

After:

```
$ gem exec kamal help
Commands:
  kamal accessory           # Manage accessories (db/redis/search)
  kamal app                 # Manage application
  kamal audit               # Show audit log from servers
  kamal build               # Build application image
  kamal config              # Show combined config (including secrets!)
  kamal deploy              # Deploy app to servers
  kamal details             # Show details about all containers
  kamal docs [SECTION]      # Show Kamal configuration documentation
  kamal help [COMMAND]      # Describe available commands or one specific command
  kamal init                # Create config stub in config/deploy.yml and secrets stub in .kamal
  kamal lock                # Manage the deploy lock
  kamal proxy               # Manage kamal-proxy
  kamal prune               # Prune old application images and containers
  kamal redeploy            # Deploy app to servers without bootstrapping servers, starting kamal-proxy, pruning, and registry login
  kamal registry            # Login and -out of the image registry
  kamal remove              # Remove kamal-proxy, app, accessories, and registry session from servers
  kamal rollback [VERSION]  # Rollback app to VERSION
  kamal secrets             # Helpers for extracting secrets
  kamal server              # Bootstrap servers with curl and Docker
  kamal setup               # Setup all accessories, push the env, and deploy app to servers
  kamal upgrade             # Upgrade from Kamal 1.x to 2.0
  kamal version             # Show Kamal version
```

4fd060b96d
2024-11-21 20:41:30 +00:00
Jerome Dalbert
890c83e607 [rubygems/rubygems] Fix bundle remove sometimes not removing gems
e7f5f067e8
2024-11-21 12:25:31 +00:00
David Rodríguez
ac5661db7b [rubygems/rubygems] Fix locking of incorrect version of git gem in an edge case
In particular, when a gem registry transitive dependency is changed to a
git source direct dependency.

bcdc7660d9
2024-11-21 10:37:51 +00:00