Commit graph

11330 commits

Author SHA1 Message Date
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
David Rodríguez
1098fdf890 [rubygems/rubygems] Also document gem env argument aliases
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.

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

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.

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

1c53023ac4
2022-06-28 22:30:42 +09:00
Nobuyoshi Nakada
5ccdcd8168 [ruby/rdoc] Remove dead code
f727854bd5
2022-06-28 21:24:59 +09:00
Nobuyoshi Nakada
131422ceea [ruby/rdoc] Support attributes defined by rb_struct_define
854b370763
2022-06-28 20:17:30 +09:00
Nobuyoshi Nakada
98bf8c83fa [ruby/rdoc] Refinement is added since ruby 3.1
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.

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.

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)
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.

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.

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.

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
David Rodríguez
6f229da2c0 [rubygems/rubygems] Fix standalone script generation for statically linked dev ruby
4d0d7b3c97
2022-06-23 18:17:37 +09:00
David Rodríguez
4f5eb48dea [rubygems/rubygems] Fix bundle package --no-install no longer skipping install
This is a regression from cf749f8ffa. The
funny thing is that we have a spec for this feature, so it was unclear
how we regressed here. It turns out there was a bug in one of our
negative matchers checking that gems ARE NOT included in a bundle.

This commit fixes the bug in the negative matcher and reverts
cf749f8ffa (with a slightly simpler diff).

3f9a4ff32a
2022-06-23 18:17:08 +09:00
Takuya Noguchi
812354ace4 [rubygems/rubygems] Bundler: fix man page for bundle-add
Follows up https://github.com/rubygems/bundler/pull/5610

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

0c4df2b8ca
2022-06-22 13:40:21 +09:00
Burdette Lamar
fdd1102550 [ruby/fileutils] Clarify difference between cp_r and install (https://github.com/ruby/fileutils/pull/95)
94a599e69f
2022-06-22 02:23:10 +09:00
Burdette Lamar
2e81fd764b [ruby/fileutils] Correct method references for secure removal (https://github.com/ruby/fileutils/pull/93)
42c9685826
2022-06-21 23:16:24 +09:00
Burdette Lamar
1002998c6d [ruby/fileutils] [DOC] Adding 'Related' (https://github.com/ruby/fileutils/pull/92)
fc3cc28397
2022-06-21 22:42:39 +09:00
Peter Zhu
5ca2335802 [ruby/irb] [DOC] Fix formatting in docs
3ddc89e38c
2022-06-20 22:42:30 +09:00
Stan Lo
2d4a41df6b [ruby/irb] Commands should respect USE_COLORIZE config (https://github.com/ruby/irb/pull/362)
534688dfc4
2022-06-20 22:27:30 +09:00
citrusmoose
8d689294d0 [rubygems/rubygems] Fix extension paths in generated standalone script
The paths for extensions of gems would contain the hardcoded ruby
version on which the extension was built. This will replace it with
runtime ruby version like the parent version directory. It will make the
standalone script compatible between different ruby version installations.

a9dae93d5d
2022-06-20 16:04:47 +09:00
Josh Nichols
aeab405878 [rubygems/rubygems] Improve performance of Bundler::SpecSet#for by using hash lookup of handled deps
I was looking at (yet another) flamegraph in speedscope, and used the
'left hand heavy' and was shocked to realize that 0.5s of the 1.7s
is spent in DepProxy#name. This method _only_ delegates the name to an
underlying spec, so it's not complex at all.

It seems to be of how often this line ends up calling it:

     next if handled.any?{|d| d.name == dep.name && (match_current_platform || d.__platform == dep.__platform) } || dep.name == "bundler"

The `handled` array is built up as dependencies are handled, so this get
slower as more dependencies are installed.

This change changes how `handled` is track. Instead of just an array, I've
tried using a Hash, with the key being a dep's name, and the value being
a list of deps with that name. This means it's constant time to find
the dependencies with the same name.

I saw a drop from 1.7s to 1.0s against master, and from 0.95s to 0.24s
when used with https://github.com/rubygems/rubygems/pull/5533

844dac30d4
2022-06-20 02:34:41 +09:00
Burdette Lamar
9327b6f222 [ruby/fileutils] [DOC] Revisions for module-level doc (https://github.com/ruby/fileutils/pull/90)
* Revisions for module-level doc

dcbad90a1f
2022-06-17 22:36:26 +09:00
David Rodríguez
1e8bf48fd5 [rubygems/rubygems] Bring TODO message up to date
e07dba0923
2022-06-17 17:05:21 +09:00
David Rodríguez
5450b409fc [rubygems/rubygems] Remove part of comment that fell out of date
272ac23aa8
2022-06-17 17:05:20 +09:00
David Rodríguez
8855b68f97 [rubygems/rubygems] Don't modify RbConfig at all when building extensions
Instead, pass sitearchdir and sitelibdir directly to `make`.

This also removes the need to create and use the siteconf file at all
when generating makefiles.

dea41fa2dc
2022-06-17 17:05:20 +09:00