Hiroshi SHIBATA
666a918595
[rubygems/rubygems] GNU Make needs DESTDIR on Windows environment like msys or mingw
...
https://github.com/rubygems/rubygems/commit/7fd987d30d
2021-11-06 09:06:49 +09:00
David Rodríguez
907aa47527
[rubygems/rubygems] Fix `ruby setup.rb` command when `--prefix` is passed
...
https://github.com/rubygems/rubygems/commit/8d04092f6e
2021-11-05 23:20:50 +09:00
David Rodríguez
f5a4fdae25
[rubygems/rubygems] Remove unnecessarily changing GEM_HOME
...
At this point gem paths are already loaded and memoize. Changing
`GEM_HOME` has no effect.
https://github.com/rubygems/rubygems/commit/a1f62f0939
2021-11-05 23:20:48 +09:00
David Rodríguez
5b941ec90d
[rubygems/rubygems] Remove unnecessary loop
...
Rubygems installs a single executable. Make that explicit.
https://github.com/rubygems/rubygems/commit/2839d15521
2021-11-05 23:20:47 +09:00
Hiroshi SHIBATA
16331d9abb
[rubygems/rubygems] Explicitly ignored empty value for DESTDIR
...
https://github.com/rubygems/rubygems/commit/69dcc02553
2021-11-05 07:35:25 +09:00
Hiroshi SHIBATA
33d01b7344
[rubygems/rubygems] Skip to set DESTDIR option when it's not provided for mswin platform
...
https://github.com/rubygems/rubygems/commit/b93546c8d8
2021-11-05 07:35:24 +09:00
Alyssa Ross
1506c8228b
[rubygems/rubygems] Don't apply `--destdir` twice when running `setup.rb`
...
Prior to this patch, if I ran:
ruby setup.rb --destdir /foo
Then Bundler files would be written into /foo/foo, because destdir was
being prepended, even though `bundler_spec.bin_dir` already included
destdir.
https://github.com/rubygems/rubygems/commit/9e857ffb52
2021-11-05 07:23:36 +09:00
David Rodríguez
9503dd91a5
[rubygems/rubygems] Fix `--destdir` handling on Windows
...
Driver letters were not accounted for in one place.
https://github.com/rubygems/rubygems/commit/fbe42460d7
2021-11-05 07:23:36 +09:00
David Rodríguez
5e855be86b
[rubygems/rubygems] More refactoring of `--destdir` handling
...
https://github.com/rubygems/rubygems/commit/f42c2025ed
2021-11-05 07:23:35 +09:00
David Rodríguez
70cbca48b8
[rubygems/rubygems] Refactor `--destdir` handling
...
https://github.com/rubygems/rubygems/commit/8aab3d11b0
2021-11-05 07:23:35 +09:00
David Rodríguez
c5224c71ae
[rubygems/rubygems] Fix `gem install` vs `gem fetch` inconsistency
...
https://github.com/rubygems/rubygems/commit/b3e985799e
2021-11-03 17:42:39 +09:00
Carlos Palhares
38785aa3b9
Update licenses= documentation
2021-11-02 10:24:35 +09:00
Carlos Palhares
17f8fd6568
Allow custom LicenseRef
2021-11-02 10:24:00 +09:00
Hiroshi SHIBATA
4a39167260
Removed the related code of `gem server`
2021-11-02 10:19:34 +09:00
Frederik Dudzik
17fb785d15
[rubygems/rubygems] Vendor tsort into rubygems
...
So that it loads a consistent version of the library and `rubygems` is
never affected by gem activation conflicts related to `tsort`.
Getting CI green required updating one `bundler` spec, because `tsort`
is no longer loaded by `bundle clean` until after `BUNDLE_PATH` has been
changed, so to ensure it is found, it needs to be installed under
`BUNDLE_PATH` as well (which will be different from the global system
path on Bundler 3, meaning installing `tsort` to the global system path
is not enough there). This spec workaround can be removed once we also
vendor `tsort` inside `bundler`.
https://github.com/rubygems/rubygems/commit/d326880999
2021-10-29 18:00:46 +09:00
Jenny Shen
92ec010595
[rubygems/rubygems] Add support to build and sign certificates with multiple key algorithms
...
https://github.com/rubygems/rubygems/commit/967876f15d
Co-Authored-By: Frederik Dudzik <frederik.dudzik@shopify.com>
2021-10-26 08:01:55 +09:00
David Rodriguez
9d28618091
[rubygems/rubygems] Avoid loading the `digest` gem unnecessarily
...
OpenSSL includes what we need.
https://github.com/rubygems/rubygems/commit/955f3b72ca
2021-10-25 20:48:52 +09:00
David Rodriguez
a959342abf
[rubygems/rubygems] Remove comment that seems no longer accurate
...
We require things inline or autoload them for efficiency and to avoid as
much as possible conflicting with user's choice of gems.
But I removed the require and observed no deadlocks when activating
gems.
https://github.com/rubygems/rubygems/commit/7d6333e842
2021-10-25 20:48:52 +09:00
David Rodriguez
e0c20485db
[ruby/rubygems] Prefer `require_relative` for internal requires
...
https://github.com/rubygems/rubygems/commit/51796f257a
2021-10-11 01:12:50 +09:00
David Rodríguez
6c39a272af
[ruby/rubygems] We no longer need to check realpaths
...
Since symlinks and absolute paths are already checked.
https://github.com/rubygems/rubygems/commit/de19bc4c7e
2021-10-10 23:12:57 +09:00
David Rodríguez
bbcf8f87ac
[ruby/rubygems] Check safety of packaged symlinks
...
If we explicitly disallow the creation of symlinks that point to files
outside of the destination directory, we can avoid any other safety
checks while creating directories, because we can be sure they will
always fall under the destination directory as well.
https://github.com/rubygems/rubygems/commit/555692b8de
2021-10-10 23:12:47 +09:00
David Rodríguez
a5289bfa71
[ruby/rubygems] Install location safety should consider casing
...
https://github.com/rubygems/rubygems/commit/0a0ad34af3
2021-10-10 23:12:38 +09:00
David Rodríguez
6c878731c1
[ruby/rubygems] Remove redundant `File.expand_path`
...
`File.realpath` already expands paths.
https://github.com/rubygems/rubygems/commit/25524ebbeb
2021-10-10 23:12:28 +09:00
David Rodríguez
59c24f054e
[ruby/rubygems] Simplify `File.expand_path` usage
...
https://github.com/rubygems/rubygems/commit/02e3cf44bf
2021-10-10 23:12:10 +09:00
David Rodríguez
11720818f6
[ruby/rubygems] Don't make duplicated checks on directory safety
...
This seems to speed up `gem install` on Windows by more than 50%.
https://github.com/rubygems/rubygems/commit/1970b1296d
2021-10-10 23:12:03 +09:00
Nobuyoshi Nakada
b16d876ac2
Needs time.rb for `Time#iso8601`
...
`Gem::Request.verify_certificate_message` used this method without
"time" which defines it.
2021-10-10 21:11:55 +09:00
Masataka Pocke Kuwabara
d03d122ba1
[rubygems/rubygems] Improve performance of Specification#missing_extensions?
...
https://github.com/rubygems/rubygems/commit/90c1919f94
2021-10-09 08:04:08 +09:00
Ellen Marie Dash
fcaa918445
[rubygems/rubygems] Only disallow FIXME/TODO for first word of gemspec description
...
7890c98 matched the start of each line, whereas this matches the start
of the entire string.
https://github.com/rubygems/rubygems/commit/432de7b819
2021-09-28 17:43:42 +09:00
David Rodríguez
4e7f085cf7
[rubygems/rubygems] Revert "Fix an issue causing nested Gem::Uri instances"
...
This reverts commit 6589f7bcc7a63a47cb73f58a290c1e1ac42bba99.
https://github.com/rubygems/rubygems/commit/9d0ce31f08
2021-09-24 10:57:15 +09:00
huangduirong
b1ab1ee046
[rubygems/rubygems] Fix error message building changing password of source
...
Do not change the password of the input parameter source during
anonymization, by using the proper helper instead of changing the
original uri directly.
https://github.com/rubygems/rubygems/commit/eaa2dd8a97
2021-09-24 10:57:03 +09:00
Jonathan
13bb16f41e
[rubygems/rubygems] Fix bug where redacted credentials are sent to server
...
Implement deep cloning for `Gem::Uri` class to fix a bug where redacting
credentials modifies the URI string in place instead of returning a
modified copy.
https://github.com/rubygems/rubygems/commit/eafb5a279b
2021-09-22 10:14:48 +09:00
Jonathan
63109976be
[rubygems/rubygems] Fix an issue causing nested Gem::Uri instances
...
https://github.com/rubygems/rubygems/commit/6589f7bcc7
2021-09-22 10:14:19 +09:00
Ellen Marie Dash
cd2e6318f6
[rubygems/rubygems] Only check if descriptions *start with* FIXME/TODO
...
It doesn't make much sense to just forbid certain words in descriptions.
https://github.com/rubygems/rubygems/commit/7890c98415
2021-09-22 10:13:49 +09:00
David Rodríguez
eaeb5bf0bc
[rubygems/rubygems] Avoid loading URI unnecessarily when activating gems
...
https://github.com/rubygems/rubygems/commit/ef5f30cba7
2021-09-22 10:13:34 +09:00
Lars Kanis
576b2e64cd
MINGW-UCRT: Set CONFIG['arch'] and RUBY_PLATFORM to "x64-mingw-ucrt"
...
This allows easy differentiation between ABI incompatible platforms like MSWIN64 and MSVCRT-based MINGW32.
This also implicates a distinct rubygem platform which is also "x64-mingw-ucrt".
Although the term "mingw32" is the OS-part for 64 bit systems as well, the "32" is misleading and confusing for many users.
Therefore the new platform string drops the "32" from the OS part to just "mingw".
This conforms to the common practice of windows platform testing per RUBY_PLATFORM=~/mswin|mingw/ .
2021-09-20 00:15:30 +09:00
David Rodríguez
1e290c31f4
[rubygems/rubygems] Merge `Gem::UriParser` and `Gem::PrintableUri` into a `Gem::Uri` class
...
The new class is a wrapper on top of an URI. And then, when you want
credentials redacted, you call `#redacted` that returns a copy of itself,
but with credentials redacted.
https://github.com/rubygems/rubygems/commit/9581c2740a
2021-08-31 19:06:14 +09:00
Daniel Niknam
1948ac20ce
[rubygems/rubygems] Replacing clone with dup
...
https://github.com/rubygems/rubygems/commit/30f5b3c027
2021-08-31 19:06:14 +09:00
Daniel Niknam
4715bbf7b3
[rubygems/rubygems] Remove returning self for `Gem::PrintableUri#parse_uri`
...
https://github.com/rubygems/rubygems/commit/25c99d7f9d
2021-08-31 19:06:14 +09:00
Daniel Niknam
aa898b4206
[rubygems/rubygems] Remove @credential_redacted instance variable
...
https://github.com/rubygems/rubygems/commit/c3bb52eb5c
2021-08-31 19:06:14 +09:00
Daniel Niknam
7067005f23
[rubygems/rubygems] Bring back the empty line that was removed previously by mistake
...
https://github.com/rubygems/rubygems/commit/ffb480ca7a
2021-08-31 19:06:14 +09:00
Daniel Niknam
d73dc8e937
[rubygems/rubygems] Remove unused method
...
https://github.com/rubygems/rubygems/commit/3a8486794e
2021-08-31 19:06:14 +09:00
Daniel Niknam
6d883b33ae
[rubygems/rubygems] Remove `ruby/uri` requirement
...
For the purpose of this class, we need to make sure the return object by `Gem::UriParser.parse_uri` method will have the following method:
- user
- user=
- password
- password=
So we can remove the the `uri` dependency and just look for the methods to exist.
https://github.com/rubygems/rubygems/commit/241e093597
2021-08-31 19:06:14 +09:00
Daniel Niknam
589377fbdc
[rubygems/rubygems] Refactor `Gem::RemoteFetcher::FetchError.build` back to its initialize method
...
https://github.com/rubygems/rubygems/commit/21dcdd2dc5
2021-08-31 19:06:14 +09:00
Daniel Niknam
a508693f06
[rubygems/rubygems] Remove defensive guards
...
https://github.com/rubygems/rubygems/commit/dba130cd80
2021-08-31 19:06:14 +09:00
Daniel Niknam
fafd9d280a
[rubygems/rubygems] Rename `Gem::PrintableUri#parsed_uri?` to `Gem::PrintableUri#valid_uri?`
...
https://github.com/rubygems/rubygems/commit/a5177709c9
2021-08-31 19:06:14 +09:00
Daniel Niknam
e3c319ad53
[rubygems/rubygems] Remove trailing `if`
...
https://github.com/rubygems/rubygems/commit/5b6b649bba
2021-08-31 19:06:14 +09:00
Daniel Niknam
3adc141a79
[rubygems/rubygems] Refactor `Gem::RemoteFetcher::FetchError` initializer to `build` method
...
The `initialize` method is already doing a lot and by adding the `Gem::PrintableUri` to redact sensitive information, things are getting complicated and hard to read here. For the start, I have refactored the `initialize` method into a class method called `build`.
https://github.com/rubygems/rubygems/commit/4312e8fdf5
2021-08-31 19:06:14 +09:00
Daniel Niknam
19e1d3cdce
[rubygems/rubygems] Using `Gem::PrintableUri` in `Gem::Request` class
...
The `@uri` variable could be a source URI with a credential. Using `Gem::PrintableUri` to make sure we are redacting sensitive information from it when logging on verbose mode.
https://github.com/rubygems/rubygems/commit/f566787211
2021-08-31 19:06:14 +09:00
Daniel Niknam
31c2e6c08e
[rubygems/rubygems] Using `Gem::PrintableUri` in `Gem::Commands::InstallCommand` class
...
The `x.source.uri` could be a source URI with a credential. Using `Gem::PrintableUri` to make sure we are redacting sensitive information from it.
https://github.com/rubygems/rubygems/commit/8755ee0aaa
2021-08-31 19:06:14 +09:00
Daniel Niknam
b41802421a
[rubygems/rubygems] Introduce `Gem::PrintableUri` that would redact URIs to be used on outputs
...
We need to redact URI credential in several places and copy pasting the code into each part of it is not ideal. This class is responsible for parsing URI strings and redacting credential from it. Also, it will handle URI object in the same manner. We will be reusing this class whenever we need to print/display a URI to users.
URI with the following format will be redacted:
- Token: `http://my-secure-token@example.com ` => `http://REDACTED@example.com `
- Username & Password: `http://my-username:my-secure-password@example.com ` => `http://my-username:REDACTED@example.com `
- x-oauth-basic: `http://my-secure-token:x-oauth-basic@example.com ` => `http://REDACTED:x-oauth-basic@example.com `
https://github.com/rubygems/rubygems/commit/f1e45d3a89
2021-08-31 19:06:14 +09:00