Commit graph

12164 commits

Author SHA1 Message Date
Burdette Lamar
3c7d5ccdce [ruby/net-http] [DOC] Enhanced RDoc for request headers
(https://github.com/ruby/net-http/pull/120)

b4eb8a7932
2023-02-14 20:33:11 +00:00
BurdetteLamar
bc6e587e86 [ruby/net-http] Enhanced RDoc for Compression
cff88acd70
2023-02-13 13:04:33 +00:00
tomoya ishida
f313514563 [ruby/irb] Fix colorize backtick symbol
(https://github.com/ruby/irb/pull/508)

dd7f25cd45

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-02-12 20:27:32 +00:00
Satadru Pramanik, DO, MPH, MEng
94aed6ece5 [ruby/fileutils] Add mkdir_p to FileUtils.install
(https://github.com/ruby/fileutils/pull/104)

* Add mkdir_p to FileUtils.install

* Adjust raise message.

* adjust raise language

* handle trailing slash in dest

* simplify

* Add tests
2023-02-10 03:37:39 +00:00
Mike Perham
194520f80e [ruby/logger] Add Logger#with_level{...} for block-scoped log level.
(https://github.com/ruby/logger/pull/85)

* Update lib/logger/severity.rb

7aabb0b4aa
2023-02-10 01:08:49 +00:00
Daniel Colson
8edd350bda [rubygems/rubygems] Avoid crashing with a corrupted lockfile
I did a bad thing (script that edits the Gemfile.lock directly) and
ended up with a Gemfile.lock that was completely missing some indirect
dependencies. While this is my fault and an error is reasonable, I
noticed that the error got progressively less friendly in recent
versions of bundler.

Something similar came up in https://github.com/rubygems/rubygems/issues/6210,
and this commit would have helped with that case as well
(although we've already handled this a different way with #6219).

Details:
---

Back on Bundler 2.2.23, a corrupt lockfile like this would cause a helpful error:

```
Unable to find a spec satisfying minitest (>= 5.1) in the set. Perhaps the lockfile is corrupted?
```

Bundler 2.3.26 gave a helpful warning:

```
Warning:
Your lockfile was created by an old Bundler that left some things out.
Because of the missing DEPENDENCIES, we can only install gems one at a time,
instead of installing 16 at a time.
You can fix this by adding the missing gems to your Gemfile, running bundle
install, and then removing the gems from your Gemfile.
The missing gems are:
* minitest depended upon by activesupport
```

But then continued on and crashed while trying to report the unmet
dependency:

```
--- ERROR REPORT TEMPLATE -------------------------------------------------------

NoMethodError: undefined method `full_name' for nil:NilClass
lib/bundler/installer/parallel_installer.rb:127:in `block (2 levels) in check_for_unmet_dependencies'

...
```

Bundler 2.4.0 and up crash as above when jobs=1, but crash
even harder when run in parallel:

```
--- ERROR REPORT TEMPLATE -------------------------------------------------------

fatal: No live threads left. Deadlock?
3 threads, 3 sleeps current:0x00007fa6b6704660 main thread:0x00007fa6b6704660
* #<Thread:0x000000010833b130 sleep_forever>
   rb_thread_t:0x00007fa6b6704660 native:0x0000000108985600 int:0

* #<Thread:0x0000000108dea630@Parallel Installer Worker #0 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever>
   rb_thread_t:0x00007fa6b67f67c0 native:0x0000700009a62000 int:0

* #<Thread:0x0000000108dea4a0@Parallel Installer Worker #1 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever>
   rb_thread_t:0x00007fa6b67f63c0 native:0x0000700009c65000 int:0

<internal:thread_sync>:18:in `pop'
tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:42:in `deq'

...
```

Changes
---

This commit fixes the confusing thread deadlock crash by detecting if
dependencies are missing such that we'll never be able to enqueue. When
that happens we treat it as a failure so the install can finish.

That gets us back to the `NoMethodError`, which this commit fixes by
using a different warning in the case where no spec is found.

d73001a21d
2023-02-09 10:29:50 +00:00
Daniel Colson
728d2f808e [rubygems/rubygems] Improve wording of unmet dependencies warning
`trying to manually editing` doesn't seem quite grammatically
correct. We could change it to `trying to manually edit` (is that a
split infinitive?), but I don't think `trying to` adds much here so
I've removed it instead so `editing` is the verb.

For the list of dependencies, the wording before this commit seemed to
reverse the dependency. "B, depended on A" sounds like B depends on A
(or did in the past but doesn't anymore?), but that's not correct. I
think there's a missing word: "B, depended on by A", but I find "B,
dependency of A" a bit nicer.

49a31257e3
2023-02-08 22:20:24 +00:00
Daniel Colson
fd71a76f55 [rubygems/rubygems] Add Ruby 3.2 and 3.3 platforms to Gemfile DSL
Along the same lines as https://github.com/rubygems/rubygems/pull/5469,
this adds support for Ruby 3.2 and 3.3 platforms: `:ruby_32`, `mri_32`,
etc.

It also includes a spec that should help catch this earlier in the
future, failing if we don't support platforms for the version of Ruby
that is running the tests.

7cd19d824d
2023-02-07 21:12:18 +00:00
BurdetteLamar
2c7fe9c0a6 [ruby/net-http] Enhanced RDoc for Net::HTTP
e65a3d9f11
2023-02-07 16:01:04 +00:00
Burdette Lamar
a641f6422c [ruby/net-http] [DOC] Reorganize doc for proxy server
(https://github.com/ruby/net-http/pull/117)

f8b6b76cba
2023-02-07 14:53:38 +00:00
ima1zumi
8fc69a0a7e [ruby/reline] Add comment for unused constants
FILENAME_COMPLETION_PROC and USERNAME_COMPLETION_PROC are not used by Reline.
However, they were added for compatibility with the rb-readline gem.
These constants have been retained and comments added.

98fdbd3f18
2023-02-07 12:49:51 +00:00
zzak
b171e99791 [ruby/rdoc] Actually execute RDoc document task for coverage
7e70d41585
2023-02-06 23:09:05 +00:00
Akira Matsuda
cab8c11611 [rubygems/rubygems] Properly exclude gemspec file itself from gem
by comparing the file names with full path.

Follows up f444478eac

9637a82d2e
2023-02-06 16:19:46 +00:00
tompng
91f353b1c3 [ruby/reline] Fix line rendering when newline is added at the end of the buffer
7d61b3df9a
2023-02-06 14:23:59 +00:00
ccmywish
b3fd1222c2 [ruby/English] Replace HTML5 deprecated tag <tt> with <code>
3712fd6752
2023-02-06 05:20:34 +00:00
Sam Bostock
45a2f1c5c2 [rubygems/rubygems] Replace "prior to" with "immediately after"
Currently, the instructions and placeholder contradict each other.

The commit that introduced this placeholder (42bc4715d920e836c8499883d)
makes it clear that the placeholder should be replaced AFTER publishing
(i.e. once the author successfully claims the gem name on Rubygems), so
the placeholder should match.

23e2dea828
2023-02-05 01:37:36 +00:00
git
06195e7603 * remove trailing spaces. [ci skip] 2023-02-04 18:06:18 +00:00
Burdette Lamar
6db79aefec [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/116)

22c0d34002
2023-02-04 18:06:06 +00:00
zzak
da9ee7bcf3 [ruby/rdoc] Add newline before return
6d609cb64c

Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
2023-02-03 23:41:06 +00:00
zzak
e04d20bc48 [ruby/rdoc] Add rdoc:coverage default task
157fbaf575
2023-02-03 23:41:06 +00:00
Burdette Lamar
faa4c2279a [ruby/net-http] [DOC] Enhanced RDoc for write_timeout
(https://github.com/ruby/net-http/pull/115)

6da39b0461
2023-02-03 14:33:53 +00:00
Martin Emde
65ca14ea6e [rubygems/rubygems] Fix TarReader::Entry#read/partial to match File#read and StringIO#read
TarReader is used as an IO object, but doesn't behave the same as other
implementations. These fixes make `read` and `readpartial` conform to the
interface of StringIO and File.

bba32d7217
2023-02-02 17:17:34 +00:00
BurdetteLamar
3e5a77f1ae [ruby/net-http] Remarks on inclusions
dfd060c583
2023-02-02 14:16:59 +00:00
Burdette Lamar
5a9e2f142d [ruby/net-http] [DOC] Enhanced RDoc for HTTPGenericRequest
(https://github.com/ruby/net-http/pull/113)

14c8405702
2023-02-02 14:03:19 +00:00
Hiroshi SHIBATA
375f527ded [rubygems/rubygems] Introduce to specify deprecated version for rubygems_deprecate_command.
We sometimes to remove minor command without bumping major version. This feature
  helps this deprecation process.

41301cd2a8
2023-02-01 16:44:55 +00:00
BurdetteLamar
3ebc80314c [ruby/net-http] Redirection revision
9a4e2d3a2a
2023-01-31 21:01:04 +00:00
Burdette Lamar
d92289f633 [ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP
(https://github.com/ruby/net-http/pull/110)

b098caa5e4
2023-01-31 14:18:50 +00:00
Hiroshi SHIBATA
fe7d4eed25
Manually merged https://github.com/ruby/net-http/pull/106
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
Co-authored-by: BurdetteLamar <burdettelamar@yahoo.com>
2023-01-31 13:14:05 +09:00
Hiroshi SHIBATA
d3822c9a8a Merge RubyGems/Bundler master.
Pick from 5ace20dbec
2023-01-31 10:49:08 +09:00
David Rodríguez
4cbfd87e5a [rubygems/rubygems] Allow disabling RubyGems require decorations
Currently Bundler needs to do cumbersome operations to revert custom
RubyGems require on a `bundler/setup` context. This causes issues when
third party gems also monkeypatch require, since Bundler will also undo
those decorations.

This commit allows it to use the simpler approach of properly telling
RubyGems that it needs to default to built-in require without any extra
magic.

1df5009e14

Co-authored-by: Xavier Noria <fxn@hashref.com>
2023-01-31 10:49:08 +09:00
Tim Bates
369ed03cd4 [rubygems/rubygems] Fix issue with extensions not compiling properly using inline gemfile
fa6e6ea95c
2023-01-31 10:49:08 +09:00
Étienne Barrié
70eedef32a [ruby/reline] Splat is always an Array
82095bd62b
2023-01-31 09:33:49 +09:00
Mat Sadler
cb06006213 [rubygems/rubygems] normalise manifest path from cargo on windows
23b5ca5fc4
2023-01-30 17:39:48 +00:00
Mat Sadler
c5a34f5b56 [rubygems/rubygems] better error message if cargo metadata doesn't contain the package we expect
cb7e6d1577
2023-01-30 17:39:48 +00:00
Mat Sadler
b4defea362 [rubygems/rubygems] install rust extensions into expected directory nesting
85ea86d348
2023-01-30 17:39:47 +00:00
Mat Sadler
ca951f6719 [rubygems/rubygems] use cargo to get crate name
the final copying of the extension into place has been slimmed
down, reflecting that it only needs to copy a single file, rather
than replicating the more involved process used for a C ext

this also refactors #build so that #cargo_crate_name only needs
to be called once, and hopefully the build flow is easier to
understand

5a0d7f2e6c
2023-01-30 17:39:47 +00:00
Mat Sadler
00e1ee4a7e [rubygems/rubygems] don't force Cargo.lock to be in gem root
371044c0ab
2023-01-30 17:39:46 +00:00
BurdetteLamar
8250b46794 [ruby/net-http] Correct doc error
dc006d8419
2023-01-28 21:41:15 +00:00
Daniel Colson
8429134d0d [rubygems/rubygems] Don't warn on bundler binstubs --standalone --all
Prior to this commit `bundle binstubs --standalone --all` would output a
warning about not being able to generate a standalone binstub for
bundler.

This warning predates the `--all` option, and I don't think it makes
sense in this context. The warning makes good sense when explicitly
trying to generate a bundler standalone binstub with `bundle binstubs
bundler --standalone`, since that command won't do what the user might
have expected. But `--all` is not specifically asking for bundler, and
having it report each time that the bundler binstubs could not be
generated does not seem particularly helpful. The only way to make that
warning go away would be to stop using `--standalone --all`.

This commit skips the warning when running with the `--all` option.

e6a72e19eb
2023-01-27 21:06:39 +00:00
Samuel Giddins
71256caf7f [rubygems/rubygems] Update the list of SPDX licence identifiers
18a9b0dc7e
2023-01-27 11:31:41 +09:00
Nobuyoshi Nakada
06e30df408 [ruby/syntax_suggest] Hide internal document and detail of Kernel monkey patching
https://bugs.ruby-lang.org/issues/19285

25ca82f8f9
2023-01-27 11:31:10 +09:00
Samuel Giddins
70829928cb [rubygems/rubygems] Deprecate Gem::List
It is unused, we will remove it in the next major version

c3f6c27d6d
2023-01-26 21:41:48 +00:00
Hiroshi SHIBATA
eb2670e32d [ruby/reline] Revert "correct Win32API capitalization for JRuby"
This reverts commit d6e7c9e1d9.

c47a5b684c
2023-01-26 04:27:52 +00:00
Hiroshi SHIBATA
d9fd048351 [rubygems/rubygems] blade is hosted under ruby-lang.org now
00fdef8a41
2023-01-23 05:55:46 +00:00
Hiroshi SHIBATA
d8751c0aa7 [ruby/cgi] blade is hosted under ruby-lang.org now
826ba3140c
2023-01-23 03:41:54 +00:00
Aaron Patterson
06b62cbbdd Add offsetof so we can get the offset of members
I want to get the offset of fields inside structs, but I don't want to
instantiate the struct.  I need to embed the offsets inside machine
code, and I can't get the offsets without calling `new` on the struct.

This commit adds an `offset` method so you can get the offset of a
member without instantiating anything.  You can do:

```ruby
C.rb_control_frame_t.offsetof(:sp) #=> 8
```

I don't think this implementation is perfect, you can only get immediate
fields.  But it is better than nothing!
2023-01-20 14:11:05 -08:00
tompng
4241b3cf2d [ruby/reline] accept new_indent > cursor_max
61cc580da4
2023-01-20 13:40:15 +00:00
Josh Nichols
0cc91871a8 [rubygems/rubygems] Update bundle-exec man page for with_unbundled_env
`with_clean_env` has been deprecated in `with_unbundled_env`. It already generates a deprecation warning when it uses, but this man page was still referring to it.
2023-01-20 13:06:58 +00:00
Burdette Lamar
401aa9ddd1 [ruby/net-http] [DOC] Header doc
(https://github.com/ruby/net-http/pull/104)

3308362d9b
2023-01-19 18:58:40 +00:00
Burdette Lamar
308942920f [ruby/net-http] [DOC] Enhanced RDoc for set_form
(https://github.com/ruby/net-http/pull/103)

f6506ff889
2023-01-18 21:03:58 +00:00