Граф коммитов

10294 Коммитов

Автор SHA1 Сообщение Дата
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"`

https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/0c8b6f7dd5
2022-07-17 17:47:23 +09:00
David Rodríguez 3cfc3fcf96 [rubygems/rubygems] Unify some common code
https://github.com/rubygems/rubygems/commit/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
https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/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.

https://github.com/ruby/reline/commit/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>

https://github.com/rubygems/rubygems/commit/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>

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

https://github.com/ruby/timeout/commit/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.

https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/9989f6d5af
2022-07-14 04:47:58 +09:00
Jean Boussier 8290d76647 [ruby/timeout] Give a name to the background thread
https://github.com/ruby/timeout/commit/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

https://github.com/ruby/irb/commit/ff129f3794
2022-07-12 00:05:15 +09:00
Nobuyoshi Nakada b564ef3698 [ruby/rdoc] Fix the known classes more
https://github.com/ruby/rdoc/commit/9f47234e0e
2022-07-11 13:43:14 +09:00
Nobuyoshi Nakada 86df6f4bb3 [ruby/rdoc] Fix an exception class name
https://github.com/ruby/rdoc/commit/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.

https://github.com/ruby/irb/commit/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.

https://github.com/ruby/pstore/commit/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
https://github.com/rubygems/rubygems/commit/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
https://github.com/rubygems/rubygems/commit/4ec608a573
2022-07-06 02:59:13 +09:00
BurdetteLamar 558a9244e9 [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/cb2b9dc9a9
2022-07-02 21:49:13 +09:00
BurdetteLamar 7e8fd40c06 [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/7e56730689
2022-07-02 21:49:13 +09:00
BurdetteLamar d7419354ac [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/23a7f5468f
2022-07-02 21:49:12 +09:00
BurdetteLamar 6f26a6cdef [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/c12560e59a
2022-07-02 21:49:11 +09:00
BurdetteLamar ce5aa6d4af [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/117177c226
2022-07-02 21:49:10 +09:00
BurdetteLamar 2dafa0470b [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/8f9843ef19
2022-07-02 21:49:09 +09:00
BurdetteLamar 902563a827 [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/8de41c1eed
2022-07-02 21:49:09 +09:00
BurdetteLamar 6eeb774ab1 [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/c59d4a063e
2022-07-02 21:49:08 +09:00
BurdetteLamar 8715ecd04b [ruby/pstore] Enhanced RDoc
https://github.com/ruby/pstore/commit/81a266d88c
2022-07-02 21:49:07 +09:00
David Rodríguez 7b78aba53a [rubygems/rubygems] Account for default gems not having remote when caching
https://github.com/rubygems/rubygems/commit/b93d4de2ff
2022-07-02 19:41:02 +09:00
David Rodríguez 9101269e94 [rubygems/rubygems] Move rubygems source specific logic to rubygems source
https://github.com/rubygems/rubygems/commit/6aa4c422a7
2022-07-02 19:41:02 +09:00
David Rodríguez b0c639f249 [rubygems/rubygems] Fix unintended double spaces in DSL documentation
https://github.com/rubygems/rubygems/commit/b1826876d0
2022-06-30 18:55:44 +09:00
David Rodríguez 95bfea6648 [rubygems/rubygems] Use modern style hashes in Gemfile DSL docs
https://github.com/rubygems/rubygems/commit/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`
https://github.com/rubygems/rubygems/commit/14d3f80df6
2022-06-29 03:25:46 +09:00
David Rodríguez 1098fdf890 [rubygems/rubygems] Also document `gem env` argument aliases
https://github.com/rubygems/rubygems/commit/6d841ccbd4
2022-06-29 03:25:45 +09:00
David Rodríguez 7a33d3df6a [rubygems/rubygems] Document better names for `gem env` arguments
I think `gem env home` and `gem env path` read very nice.

https://github.com/rubygems/rubygems/commit/b89da79456
2022-06-29 03:25:45 +09:00
Burdette Lamar 59273ff6e2 [ruby/fileutils] [DOC] Changes to examples (https://github.com/ruby/fileutils/pull/96)
* Changes to examples

https://github.com/ruby/fileutils/commit/346a71b2cb
2022-06-29 00:39:59 +09:00
st0012 7d211c93af [ruby/irb] Color.colorable? needs to consider the condition when irb is not loaded
ruby/debug uses `irb/color` selectively:
0ac22406bb/lib/debug/color.rb (L4)

And in that case, `IRB.conf` won't be defined. So Color.colorable? needs
to consider that.

This also fixes the Ruby trunk CI.

https://github.com/ruby/irb/commit/b2cd07e795
2022-06-28 22:57:17 +09:00
Stan Lo 44c1316293 [ruby/irb] Centralize coloring control (https://github.com/ruby/irb/pull/374)
* Use colorable: argument as the only coloring control

* Centalize color controling logic at Color.colorable?

There are 2 requirements for coloring output:

1. It's supported on the platform
2. The user wants it: `IRB.conf[:USE_COLORIZE] == true`

Right now we check 1 and 2 separately whenever we colorize things.
But it's error-prone because while 1 is the default of `colorable`
parameter, 2 always need to manually checked. When 2 is overlooked, it
causes issues like https://github.com/ruby/irb/pull/362

And there's 0 case where we may want to colorize even when the user
disables it. So I think we should merge 2 into `Color.colorable?` so it
can be automatically picked up.

* Add tests for all inspect modes

* Simplify inspectors' coloring logic

* Replace use_colorize? with Color.colorable?

* Remove Context#use_colorize cause it's redundant

https://github.com/ruby/irb/commit/1c53023ac4
2022-06-28 22:30:42 +09:00
Nobuyoshi Nakada 5ccdcd8168 [ruby/rdoc] Remove dead code
https://github.com/ruby/rdoc/commit/f727854bd5
2022-06-28 21:24:59 +09:00
Nobuyoshi Nakada 131422ceea [ruby/rdoc] Support attributes defined by `rb_struct_define`
https://github.com/ruby/rdoc/commit/854b370763
2022-06-28 20:17:30 +09:00
Nobuyoshi Nakada 98bf8c83fa [ruby/rdoc] Refinement is added since ruby 3.1
https://github.com/ruby/rdoc/commit/c051eb90d1
2022-06-28 15:49:05 +09:00
Nobuyoshi Nakada 51be2cf6d2 [ruby/rdoc] Parse also InitVM-prefixed functions
Initialization depending on VM is separated.

https://github.com/ruby/rdoc/commit/030d10fccd
2022-06-28 14:51:49 +09:00
David Rodríguez f9f85a513b [rubygems/rubygems] Print error messages just once in verbose mode
When running a command with the `--verbose` flag that ends up raising a
`BundlerError`, Bundler will unnecessarily print the error twice.

This commit fixes the issue by removing the duplicate logging.

https://github.com/rubygems/rubygems/commit/689004a164
2022-06-27 23:35:45 +09:00
pocari 8c6c3e30f3 [ruby/reline] Enable to change the background color of dialogs. (https://github.com/ruby/reline/pull/413)
https://github.com/ruby/reline/commit/bd49537964
2022-06-27 22:28:49 +09:00
David Rodríguez f83c5de6d5 [rubygems/rubygems] Improve error message when `operating_system.rb` fails to load
Show an absolute path instead of an unhelpful relative path.

https://github.com/rubygems/rubygems/commit/f1eed36e2f
2022-06-27 17:03:24 +09:00
Peter Jones e0bfdb23af [ruby/irb] Ensure stdout is a TTY before calling winsize
When outputting a (possibly truncated) value, IRB will query the
window size.  However, if IRB was piped to another process, stdout
will no longer be a TTY and will not support the `winsize` method.

This fix ensure that stdout is a TTY.

https://github.com/ruby/irb/commit/125de5eeea
2022-06-26 14:40:48 +09:00
Tomas Volf 56809537a4 [rubygems/rubygems] Clean up temporary directory after generate_index --update
While generate_index did clean up temporary directory, when running with
--update flag, that did not happen and the temporary directory was left
behind.

This commit fixes that and modifies tests in order to make sure this is
not reintroduced later on.

Fixes #5635.

https://github.com/rubygems/rubygems/commit/9fa34dc329
2022-06-26 11:15:43 +09:00
David Rodríguez 12a5fa408b Sync RubyGems & Bundler with upstream repo 2022-06-24 10:52:02 +09:00