Commit graph

32 commits

Author SHA1 Message Date
pjsk
01ae9e4fb0
[rubygems/rubygems] implement fallback
e09a6ec815
2025-08-06 10:46:46 +09:00
pjsk
720ae3285e
[rubygems/rubygems] make things a bit more testable
29c085f5f5
2025-08-06 10:46:46 +09:00
Frank Olbricht
8691a4ada1
[rubygems/rubygems] Use IMDSv2 for S3 instance credentials
fa1c51ef59
2025-08-06 10:46:46 +09:00
Peteris Rudzusiks
3feba181ed [rubygems/rubygems] Let s3_uri_signer accept the HTTP method
35fc7f9547
2025-07-09 13:48:37 +09:00
Peteris Rudzusiks
5d880b75ef [rubygems/rubygems] Correctly sign S3 HEAD requests
We sometimes send HEAD requests. The s3_uri_signer.rb code allways assumed GETs.
This lead to consistently getting 403 responses back from S3. Recently, S3
attempted to change the behaviour of how 403s are handled when TCP connections
are reused,  which escalated this bug from "just noise" to "breaks gem installs".
They've reverted that behaviour, so the severity of this problem is back to
"just noise". Either way, it's a bug in rubygems and warrants a fix it.

c38f502b73
2025-07-09 13:48:36 +09:00
Peteris Rudzusiks
af6012b942 [rubygems/rubygems] Fix date format in S3 URI signer
%M is minute of the hour.
%m is month of year.
We want the former, not the latter.

d7ca3fa279
2025-07-09 13:48:35 +09:00
Hiroshi SHIBATA
d2da774f87 [rubygems/rubygems] Rename wrapper files for vendored libraries with 'vendored_' prefix
cfc908c8c1
2024-02-26 22:04:04 +00:00
David Rodríguez
d64d0b5423
Vendor uri gem in RubyGems 2024-01-29 12:14:21 +09:00
David Rodríguez
ce924ce1fb [rubygems/rubygems] Vendor net-http and net-protocol in RubyGems
99d91c9ed2
2023-12-13 12:16:55 +09:00
Hiroshi SHIBATA
e003784fc8 [rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteral
9264d83421
2023-04-05 09:50:29 +00:00
Hiroshi SHIBATA
f24a86d83f util/rubocop -A --only Layout/EmptyLineAfterMagicComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
4dd418f877 util/rubocop -A --only Style/FrozenStringLiteralComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
4ab23df2c4 [rubygems/rubygems] util/rubocop -A --only Style/RedundantParentheses
295691d4dc
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
d2cebb4e31 [rubygems/rubygems] util/rubocop -A --only Style/NumericLiterals
860669b08a
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
712d6e675b [rubygems/rubygems] util/rubocop -A --only Style/RedundantInterpolation
add44e56eb
2023-03-17 18:50:55 +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 Rodriguez
9d28618091
[rubygems/rubygems] Avoid loading the digest gem unnecessarily
OpenSSL includes what we need.

955f3b72ca
2021-10-25 20:48:52 +09:00
David Rodriguez
e0c20485db [ruby/rubygems] Prefer require_relative for internal requires
51796f257a
2021-10-11 01:12:50 +09:00
David Rodríguez
350f4a0b66
[rubygems/rubygems] Rubygems doesn't need to load the base64 library
fe723c0f7f
2021-07-27 09:25:56 +09:00
Hiroshi SHIBATA
4aca77edde Merge prepare version of RubyGems 3.2.0 2020-12-08 17:30:02 +09:00
Hiroshi SHIBATA
b717f73402
Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"
31a6eaabc1 is obsoleted with
  https://github.com/rubygems/rubygems/pull/3820
2020-09-23 22:01:44 +09:00
Hiroshi SHIBATA
31a6eaabc1
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-09-23 21:02:56 +09:00
David Rodríguez
e1494145d9 [rubygems/rubygems] Make sure tests at least load without openssl
054d57f74b
2020-07-31 21:07:19 +09:00
David Rodríguez
a89665b7b1 Enforce no empty lines around class body in rubygems
To normalize the code style with `bundler`.
2020-07-31 21:07:19 +09:00
Alexander Pakulov
0b9b0774c3 [rubygems/rubygems] Minor fix
95c1f4e179
2019-09-05 18:44:02 +09:00
Alexander Pakulov
d84b9b6d0a [rubygems/rubygems] Use IAM role to extract security-credentials for EC2 instance
9a401646e1
2019-09-05 18:41:58 +09:00
Alexander Pakulov
25a327d41b
[rubygems/rubygems] Do not mutate uri.query during s3 signature creation
c0275ee537
2019-08-17 07:35:48 +09:00
Kazuhiro NISHIYAMA
42a9e27d84 [rubygems/rubygems] Use gsub with Hash
83eced0b39
2019-08-05 18:44:59 +09:00
Alexander Pakulov
0d596c1ab2
[rubygems/rubygems] Making Gem::S3URISigner.sign method smaller with helper methods
2a96494d91
2019-07-31 07:47:01 +08:00
Alexander Pakulov
74419711ad
[rubygems/rubygems] Use default value for expiration in the method signature
1372e50c17
2019-07-31 07:47:01 +08:00
Alexander Pakulov
aa9015dd84
[rubygems/rubygems] Moving rubygems/request dependencies into ec2_metadata
6a1856517f
2019-07-31 07:47:01 +08:00
Alexander Pakulov
4a8c2dd419
[rubygems/rubygems] Extracting sign_s3_url & s3_source_auth into a separate S3URISigner class
c30d21ec7a
2019-07-31 07:47:01 +08:00