Commit graph

11330 commits

Author SHA1 Message Date
Peter Zhu
92614111c0 [ruby/rdoc] Fix links in docs
www.ruby-lang.org without the leading https:// will generate an
incorrect link because it will be treated as a relative link.

28f32149b6
2022-04-15 13:24:48 +09:00
Nobuyoshi Nakada
5397dd2e76 [ruby/rdoc] Apply matching word pairs to underscore-methods
Protected characters with `PROTECT_ATTR` should not have special
roles.

c318af0ea2
2022-04-14 16:37:14 +09:00
Peter Zhu
1a2490b564 [rubygems/rubygems] Fix formatting in docs
rdoc uses + for typewriter font rather than backticks.

be320f1e0c
2022-04-14 16:24:09 +09:00
Nobuyoshi Nakada
e06100d969 [ruby/rdoc] Allow cross references to methods including underscores
As underscores are masked to "protect" from the conversion, consider
also `PROTECT_ATTR` as a word character.

db58bb5170
2022-04-14 12:51:30 +09:00
Jeremy Evans
0579486f15 [ruby/net-http] Update the content-length heading when decoding bodies
Previously, the content-encoding header was removed and the body
was modified, but the content-length header was not modified,
resulting in the content-length header not matching the body
length.

Don't delete content-length before yielding inflate body, as that
causes a switch to read the entire body instead of reading in
chunks.

Fixes [Bug #16672]

58284e9710

Co-authored-by: st0012 <stan001212@gmail.com>
2022-04-14 00:11:26 +09:00
Peter Zhu
aaac279de0 [ruby/rdoc] Only parse valid URLs
Only valid characters for URLs should be used for generating URLs.

A list of valid characters can be found in sections 2.2 and 2.3 of IETF
RFC 3986 (https://www.ietf.org/rfc/rfc3986.txt).

2bd8fcdd4f
2022-04-13 22:25:33 +09:00
Jeremy Evans
ebb4378237 [ruby/net-http] Add HTTP#response_body_encoding for setting response body encoding
This allows for the ability to opt-in to a method to set the
encoding of response bodies.  By setting the accessor to a String
or Encoding instance, it will use the specified encoding.
Setting the value of true will try to detect the encoding of the
response body, either using the Content-Type header (assuming it
specifies charset) or by scanning for a <meta> tag in the document
that specifies the encoding.  The default is false in which case
no forcing of encoding will be done (same as before the patch).

Implements [Feature #2567]
Implements [Feature #15517]

6233e6b7c1

Co-authored-by: Yui Naruse <naruse@ruby-lang.org>
2022-04-12 00:17:34 +09:00
Ashley Ellis Pierce
c59488a8e3 [rubygems/rubygems] Use ask_yes_no
1d38e167fa
2022-04-06 08:55:00 +09:00
Ashley Ellis Pierce
37a19f7f67 [rubygems/rubygems] Extract default_host method
6e10e75574
2022-04-06 08:54:59 +09:00
Ashley Ellis Pierce
b75b67f113 [rubygems/rubygems] Use YAML
6122e8cac5
2022-04-06 08:54:59 +09:00
Ashley Ellis Pierce
bb3ecdba6a [rubygems/rubygems] Accomodate gem hosts without profile/me endpoint
31b6dcf5d3
2022-04-06 08:54:58 +09:00
Ashley Ellis Pierce
75083704bf [rubygems/rubygems] Update endpoint
a5a7b3ec96
2022-04-06 08:54:58 +09:00
Ashley Ellis Pierce
ec09b2dba1 [rubygems/rubygems] Remove whitespace
08c2d88137
2022-04-06 08:54:57 +09:00
Ashley Ellis Pierce
925d73b3ee [rubygems/rubygems] Make changes <2.6 compatible
Multiple params to merge was not introduced until Ruby 2.6, so this
merges the two additional params together first and then merges that
with the request body

870f7e9a1c
2022-04-06 08:54:56 +09:00
Ashley Ellis Pierce
7bb6449fe5 [rubygems/rubygems] Make mfa the default
0b636f6902
2022-04-06 08:54:55 +09:00
Ashley Ellis Pierce
4ae3b78c95 [rubygems/rubygems] Correct mfa level name
a002e351ae
2022-04-06 08:54:55 +09:00
Ashley Ellis Pierce
b3f1b3ccef [rubygems/rubygems] Enable mfa on specific keys during gem signin
e787f7f655
2022-04-06 08:54:54 +09:00
Alan Wu
2304cfa4c0 Document MakeMakefile#append_cflags
This method is at least 7 years old and is widely used in the wild.
Since we need to support it, let's document it to make it discoverable.
Add docs and move it out of the `# :stopdoc:` zone.
2022-04-05 12:57:55 -04:00
Nobuyoshi Nakada
de427c3ce0 [ruby/optparse] Define inspect and pretty_inspect
a3f0ec21b1
2022-04-04 15:05:44 +09:00
Hartley McGuire
4db75b6fe7 [rubygems/rubygems] bump actions/checkout to 3 in bundler gem template
Dependabot bumped the repo's configuration in 0c996fa but it did not
bump the version in the template for `bundler gem`

e14980e169
2022-04-04 14:14:40 +09:00
Jeremy Evans
7648bae4c8 [ruby/net-http] Revert "Update the content-length heading when decoding bodies"
This reverts commit a7cb30124c.

This is causing errors in Ruby's CI, will revert for now and
try again after testing a fix with Ruby's CI.

7b852b1feb
2022-04-03 06:51:07 +09:00
Jeremy Evans
58adb1636b [ruby/net-http] Update the content-length heading when decoding bodies
Previously, the content-encoding header was removed and the body
was modified, but the content-length header was not modified,
resulting in the content-length header not matching the body
length.

Fixes [Bug #16672]

a7cb30124c
2022-04-02 02:49:21 +09:00
Hiroshi SHIBATA
06f94d1784 [ruby/net-protocol] Bump version to 0.1.3
9cf40af499
2022-04-01 13:56:47 +09:00
Marc-André Lafortune
8a38419b73 [ruby/ostruct] v0.5.5
ce879e56cf
2022-04-01 00:18:36 +09:00
Charles Oliver Nutter
8751769637 [ruby/ostruct] Avoid using block_given in the presence of aliases
defined?(yield) bypasses the block_given? method (or any aliases
to it) and always does the right thing.

4c38fe612e
2022-04-01 00:16:49 +09:00
James Hill
834c3b3545 [rubygems/rubygems] Update bundler documentation to reflect bundle config scope changes
In https://github.com/rubygems/rubygems/pull/4152 `bundle config` was changed
to default to local scope (instead of global) if the command was executed
from inside an application directory.

Updated documentation reflects this change.

d92d42cae5
2022-03-31 20:00:10 +09:00
Marc-André Lafortune
4c4a1e2035 [ruby/ostruct] v0.5.4
fe19de4644
2022-03-24 21:38:26 +09:00
Marc-André Lafortune
ad5754162b [ruby/ostruct] Avoid aliasing block_given? for JRuby [Fixes #40]
14d04ff694
2022-03-24 21:37:14 +09:00
David Rodríguez
d32fa986c3 [rubygems/rubygems] Make rescue clause more specific
This is hiding a real bundler issue as a "network error". It's more
helpful to get a proper bug report, with stack trace and so on.

So stop re-raising errors when evaluating unmarshaled  responses  as
network errors, and only raise Marshal errors when the Marshal format is
invalid, not whenever marshalled gemspecs can't be loaded because that
may hide actual client errors, like missing `YAML` constants.

05ea907e1c
2022-03-23 23:31:05 +09:00
Nobuyoshi Nakada
92ef73a918 [ruby/rdoc] Expand the enclosing tree of the current file
f9f90ef2ff
2022-03-22 01:32:13 +09:00
Nobuyoshi Nakada
dafe5c1323 [ruby/rdoc] Fold files in the page directory
b7b4cdab6c
2022-03-22 01:32:12 +09:00
Nobuyoshi Nakada
73541cdc2f
[ruby/rdoc] Allow method source code to scroll [ci skip]
1bb0496c53
2022-03-20 15:42:56 +09:00
Nobuyoshi Nakada
20ad09e560 [ruby/rdoc] Use the custom style details summary only in nav-section
7736d3a89c
2022-03-20 15:38:28 +09:00
Nobuyoshi Nakada
6946263a29
[DOC] make internally used classes/methods nodoc
Empty class documents are generated even with `:stopdoc:`.
2022-03-20 14:26:20 +09:00
Hiroshi SHIBATA
fadc7a150c [ruby/logger] bump version to 1.5.1
c4a4155ab7
2022-03-17 17:28:33 +09:00
Nobuyoshi Nakada
329c89bb42
Make implicit function declaration error [Feature #18615]
Enable `-Werror=implicit-function-declaration` by default for
building C extensions for early failures.
2022-03-17 14:37:34 +09:00
Kazuhiro NISHIYAMA
d06f787e9f
Fix broken links of rdoc
- `www.ruby-lang.org` links to `./www.ruby-lang.org`
- `cgi['field_name']` links to `./'field_name'`
2022-03-17 10:11:38 +09:00
Nobuyoshi Nakada
ebcbca96fb [ruby/rdoc] Fix full name of known class
Properly set the name of `File::Constants`, which is the only name
with a namespace in `RDoc::KNOWN_CLASSES`, and fixes longstanding bug
that `File::Constants` becomes `File::File::Constants`.

When it is generated by `rb_file_const` in dir.c, `name` is set to the
qualified name as same as `full_name`, and generated in the normal way
in file.c later, already set `full_name` is cleared and `name` will be
constructed from the enclosing namespace and the `name`.  It will
results in duplicated namespace, `File::File::Constants`.

3a8d6df562
2022-03-16 15:05:41 +09:00
Kazuhiro NISHIYAMA
7aabdbe837 [rubygems/rubygems] Fix a typo
3e06a91435
2022-03-15 11:37:43 +09:00
Nobuyoshi Nakada
b85457c710 [rubygems/rubygems] [DOC] Enable Gem::Package example
Other code must not be between the doc and class definition.

366784aae5
2022-03-15 08:40:35 +09:00
David Rodríguez
6a8bc90278 [rubygems/rubygems] Report Github Actions CI provider within user agent string
See
https://docs.github.com/es/actions/learn-github-actions/environment-variables#default-environment-variables.

So that we can show stats about it at https://ecosystem.rubytogether.org

48d6dc68f8
2022-03-15 04:44:33 +09:00
Nobuyoshi Nakada
41d63d3130 [rubygems/rubygems] Move :stopdoc: directive
If this is at the top level, it stops the documentation of the
entire module, but not only the part in this file.

34e8c1ee06
2022-03-15 01:18:03 +09:00
Ivo Anjo
7348db866a [DOC] Remove outdated note from WeakRef#initialize
The note

> Raises an ArgumentError if the given +orig+ is immutable, such as Symbol,
> Integer, or Float.

has not been true since #2313 (GH-2313, Feature #16035) when
@casperisfine enabled storing non-finalizable objects in the underlying
`ObjectSpace::WeakMap`.

On Ruby 2.7+, `WeakRef.new(1) + 1` works fine and the result is the
expected 2.
2022-03-14 10:50:52 +01:00
Nobuyoshi Nakada
e859a218fd
[DOC] hide UnicodeNormalize in module index 2022-03-14 15:01:20 +09:00
Nobuyoshi Nakada
0bf194fb33 [ruby/rdoc] Start with open when only one visible class/module
6bb93001db
2022-03-14 14:48:13 +09:00
Nobuyoshi Nakada
976431d9ed [ruby/rdoc] Fold class and module index
4c7c46fcc4
2022-03-14 14:48:12 +09:00
Nobuyoshi Nakada
a884431624 [ruby/forwardable] Move :stopdoc: directive
If this is at the top level, it stops the documentation of the
entire module, but not only the part in this file.

34cd2ac4a1
2022-03-14 14:44:46 +09:00
Nobuyoshi Nakada
8760b270ed [ruby/irb] Move :stopdoc: directive
If this is at the top level, it stops the documentation of the
entire module, but not only the part in this file.

86c41b06ad
2022-03-14 14:40:28 +09:00
Nobuyoshi Nakada
416c63c118 [ruby/rdoc] Refine pretty_print
acb91ea74a
2022-03-13 21:15:08 +09:00
Nobuyoshi Nakada
0bcc3bd6ab [ruby/rdoc] Clean documents for backwards compatibility
23e61a208e
2022-03-13 19:56:42 +09:00