Commit graph

14659 commits

Author SHA1 Message Date
Peter Zhu
ba098fa151 Sync RDoc 2022-07-25 16:29:14 -04:00
Takuya Noguchi
979368b47c [rubygems/rubygems] Bundler: add deprecation notice of viz to man
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

0e1cbfa598
2022-07-25 21:37:13 +09:00
Ashley Ellis Pierce
244bda7efd [rubygems/rubygems] Display mfa warnings on gem signin
4dc77b7099

Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
2022-07-23 03:42:59 +09:00
Takuya Noguchi
d77633a695 [rubygems/rubygems] Bundler: update command example in bundle-exec(1)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

28bf5c8b33
2022-07-23 00:24:37 +09:00
st0012
b3be030740 [ruby/reline] Rename dialog_pointer_* to dialog_highlight_*
"Pointer" is not what we usually use to describe a selected item.

"Highlight" is a more common word for the scenario so we should use it instead.

b4279d1557
2022-07-22 23:34:49 +09:00
Takuya Noguchi
c6734edc34 [rubygems/rubygems] Remove bundle show from obsolete commands
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

6c07c9427b
2022-07-22 21:01:45 +09:00
Nobuyoshi Nakada
a4e890b93e [rubygems/rubygems] Use SystemExit#status as exit_code
No reasons to manage separately.

8ede5c886e
2022-07-22 21:01:31 +09:00
Takuya Noguchi
d7ffd3fea4
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22 12:07:23 +09:00
David Rodríguez
fa5724cca9 [rubygems/rubygems] Fix ruby setup.rb --destdir /foo modifying global specs
Running a command like that is actually removing any previous default
bundler specs in the default RubyGems installation (outside of destdir).
It should instead only modify destdir.

5ed275383c
2022-07-20 19:55:34 +09:00
Takuya Noguchi
cbaf58d455 [rubygems/rubygems] Bundler: update primary source in man 5 gemfile
Specifying multiple primary sources in top-level was deprecated in
Bundler 1.13.
As Bundler CLI uses primary source instead of global, "global source"
is replaced with "primary source".

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

1dd1753f6e
2022-07-20 19:45:08 +09:00
Takuya Noguchi
631b34ef95 [rubygems/rubygems] Bundler: change error/warning message for multiple global sources
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

316564b8fc
2022-07-19 23:51:47 +09:00
David Rodríguez
fd0902bfcd [rubygems/rubygems] Move fileutils require to be even more lazy
If directories are already created (the common case), fileutils won't be
required at all.

63a9b94fc9
2022-07-18 23:24:38 +09:00
Peter Zhu
dd362a786a [ruby/rdoc] Fix call-seq for aliased method with similar names
deduplicate_call_seq has a bug that skips call-seq for methods where the
alias is a prefix of the method name. For example, if the alias name is
"each" and the current method name is "each_line", then
deduplicate_call_seq will skip all call-seq for "each_line" since it
will believe that it is for the alias.

1148988ccc
2022-07-18 22:36:57 +09:00
David Rodríguez
a74634de10 [rubygems/rubygems] Fix upgrading RubyGems with a customized Gem.default_dir
16d01f9486
2022-07-18 19:07:55 +09:00
David Rodríguez
01560e1c53 [rubygems/rubygems] Improve error message when gems cannot be found
Include the source of each gem.

a0bed2fb79
2022-07-18 19:07:47 +09:00
Yuta Saito
fab8f3bde6 [rubygems/rubygems] Stop using /dev/null for silent ui for WASI platform
WASI doesn't guarantee that `/dev/null` is present.
So without this patch, we needed to mount host's `/dev` directory to WASI
guest process to avoid `ENOTCAPABLE` error while `require "bundler/setup"`

e9187ab61f
2022-07-17 19:44:51 +09:00
David Rodríguez
ef2d673052 [rubygems/rubygems] Show a proper error if extension dir is not writable
Instead of showing the bug report template.

0c8b6f7dd5
2022-07-17 17:47:23 +09:00
David Rodríguez
3cfc3fcf96 [rubygems/rubygems] Unify some common code
972e8ff965
2022-07-17 17:47:22 +09:00
David Rodríguez
14f52cfce5 [rubygems/rubygems] Don't call #build_extensions at all if there are no extensions
5ecc0e0b31
2022-07-17 17:47:22 +09:00
Nobuyoshi Nakada
5ae83151b1 [rubygems/rubygems] Drop support for old Gem::Specification versions
`specification_version` method was added before RubyGems 1.0, and
`add_runtime_dependency` method was before 1.2.  These seem aged
enough to remove.

92770c5cd9
2022-07-16 19:33:16 +09:00
st0012
36ca0e58b6 [ruby/reline] Use color name instead of code (integer) in dialog color APIs
As pointed out in the
[comment](https://github.com/ruby/reline/pull/413#issuecomment-1168033973),
the code is actually a control sequence and not only for colors.

To make the dialog color APIs safer to use, we should restrict its
usages and extract away the bg/fg concept from the input.

So in this commit, I made these changes:

1. The dialog_*_bg/fg_color APIs only takes and returns color names (symbol):
  - :black
  - :red
  - :green
  - :yellow
  - :blue
  - :magenta
  - :cyan
  - :white
2. Add additional dialog_*_bg/fg_color_sequence APIs to access the raw code.

b32a977766
2022-07-16 02:30:23 +09:00
Takuya Noguchi
7fda741f6e [rubygems/rubygems] Use https protocol for URLs for config mirror
example.org is used mirror URL as an example, not to make access to
a (potential) third-party domain.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

31230f850c
2022-07-15 18:45:38 +09:00
Takuya Noguchi
8e451d1083 [rubygems/rubygems] Fix wrong information about default RubyGems source
Also fix regression from rubygems/rubygems PR 3056

https://my.diffend.io/gems/rubygems-update/1.3.5/1.3.6/page/4#d2h-514986
https://my.diffend.io/gems/rubygems-update/2.0.0/2.0.2/page/2#d2h-514986

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

06b1e9ebc5
2022-07-15 17:32:05 +09:00
Nobuyoshi Nakada
025677560a [ruby/un] Support FileUtils.cp_lr
e976ad8a7c
2022-07-14 16:26:47 +09:00
Olle Jonsson
7c58c55c11 [ruby/timeout] gemspec: Drop unused directives "executables"
This gem exposes no executables.

70be2bd48a
2022-07-14 16:21:25 +09:00
David Rodríguez
76de7a92b9 [rubygems/rubygems] Fix misleading error if compact index cannot be copied
Previously if `~/.bundle/cache/compact_index/rubygems.org.*/version`
were owned by root with read-only access, `bundle install` would fail
with a misleading error message. For example:

```
There was an error while trying to write to `/tmp/bundler-compact-index-20220711-1823-npllre/versions`. It is
likely that you need to grant write permissions for that path.
```

This happened because the EACCESS error was caught by
`SharedHelpers.filesystem_access`, which makes it look like the target
directory is at fault instead of the source.

We can't simply drop this guard because that causes the opposite
problem: the permission error appears to come from the source instead of
the target, since `CompactIndexClient::Cache#lines` also wraps read
access errors.

Instead, bring a minimal implementation of `FileUtils.cp` and nest calls
to `SharedHelpers.filesystem_access` properly.

320822c070

Co-authored-by: Stan Hu <stanhu@gmail.com>
2022-07-14 15:06:09 +09:00
David Rodríguez
8c74eaa08d [rubygems/rubygems] Fix gem update --system crash while regenerating binstubs
Since a few commits ago, we no longer call `Gem::Specification.reset`
after each invocation of `Gem::Installer#install`. This means we don't
call it when the default Bundler is installed during `gem update
--system`. This causes no issues until the end of the upgrade process
when:

* The previous default Bundler spec is removed from disk.
* All specification stubs are turned into real specifications by loading
  them from disk. But the one for Bundler no longer exists so
  materializes to `nil` and regenerating binstubs crashes like this:

  ```
  Bundler 2.4.0.dev installed
  RubyGems 3.4.0.dev installed
  Regenerating binstubs
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `platform' for nil:NilClass
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `block in execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:981:in `block in each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `map'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `select'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:301:in `invoke'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:604:in `regenerate_binstubs'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:183:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:185:in `process_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:149:in `run'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:51:in `run'
  setup.rb:33:in `<main>'
  ```

We fix it by more carefully managing the removal of the previous default
Bundler gem.

9989f6d5af
2022-07-14 04:47:58 +09:00
Jean Boussier
8290d76647 [ruby/timeout] Give a name to the background thread
5594ae2f4d
2022-07-13 21:16:15 +09:00
Hiroshi SHIBATA
437a5ae9d6 Merge RubyGems and Bundler master 2022-07-13 14:11:55 +09:00
Burdette Lamar
66dfcbed37 [ruby/irb] [DOC] Include updated help message (https://github.com/ruby/irb/pull/377)
* Include updated help message

ff129f3794
2022-07-12 00:05:15 +09:00
Nobuyoshi Nakada
b564ef3698 [ruby/rdoc] Fix the known classes more
9f47234e0e
2022-07-11 13:43:14 +09:00
Nobuyoshi Nakada
86df6f4bb3 [ruby/rdoc] Fix an exception class name
87301da71b
2022-07-11 13:14:06 +09:00
Burdette Lamar
55c5bf27f5 [ruby/irb] Additions/revisions to help-message (https://github.com/ruby/irb/pull/370)
Changed:

    Added text to options that said just 'same as ruby -whatever'.
    Added defaults.
    Removed an errant tab.

dfe454cc33
2022-07-08 03:15:47 +09:00
Burdette Lamar
7ba5c0633c [ruby/pstore] Emphasize keys instead of roots, values instead of objects (https://github.com/ruby/pstore/pull/7)
Modifies RDoc to Emphasize keys instead of roots, values instead of objects.

Code:

    Renames method #root? to #key? and method #roots to #keys.
    Aliases method #key as #root and method #keys as #roots.
    Adds testing for all four methods.

4436ea0891
2022-07-07 07:05:01 +09:00
Brian Le
902d1a5c51 [rubygems/rubygems] add message when gems are requested to be updated but they are not installed
27953ffe9a
2022-07-06 02:59:14 +09:00
Brian Le
6eab8095fa [rubygems/rubygems] output gems already up-to-date regardless if any gems were updated
4ec608a573
2022-07-06 02:59:13 +09:00
BurdetteLamar
558a9244e9 [ruby/pstore] Enhanced RDoc
cb2b9dc9a9
2022-07-02 21:49:13 +09:00
BurdetteLamar
7e8fd40c06 [ruby/pstore] Enhanced RDoc
7e56730689
2022-07-02 21:49:13 +09:00
BurdetteLamar
d7419354ac [ruby/pstore] Enhanced RDoc
23a7f5468f
2022-07-02 21:49:12 +09:00
BurdetteLamar
6f26a6cdef [ruby/pstore] Enhanced RDoc
c12560e59a
2022-07-02 21:49:11 +09:00
BurdetteLamar
ce5aa6d4af [ruby/pstore] Enhanced RDoc
117177c226
2022-07-02 21:49:10 +09:00
BurdetteLamar
2dafa0470b [ruby/pstore] Enhanced RDoc
8f9843ef19
2022-07-02 21:49:09 +09:00
BurdetteLamar
902563a827 [ruby/pstore] Enhanced RDoc
8de41c1eed
2022-07-02 21:49:09 +09:00
BurdetteLamar
6eeb774ab1 [ruby/pstore] Enhanced RDoc
c59d4a063e
2022-07-02 21:49:08 +09:00
BurdetteLamar
8715ecd04b [ruby/pstore] Enhanced RDoc
81a266d88c
2022-07-02 21:49:07 +09:00
David Rodríguez
7b78aba53a [rubygems/rubygems] Account for default gems not having remote when caching
b93d4de2ff
2022-07-02 19:41:02 +09:00
David Rodríguez
9101269e94 [rubygems/rubygems] Move rubygems source specific logic to rubygems source
6aa4c422a7
2022-07-02 19:41:02 +09:00
David Rodríguez
b0c639f249 [rubygems/rubygems] Fix unintended double spaces in DSL documentation
b1826876d0
2022-06-30 18:55:44 +09:00
David Rodríguez
95bfea6648 [rubygems/rubygems] Use modern style hashes in Gemfile DSL docs
3f83236c02
2022-06-30 04:11:17 +09:00
David Rodríguez
a16de43f23 [rubygems/rubygems] Add gem env user_gemhome and gem env user_gemdir
14d3f80df6
2022-06-29 03:25:46 +09:00