Граф коммитов

1097 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA fef0313ec7 [rubygems/rubygems] util/rubocop -A --only Style/PreferredHashMethods
https://github.com/rubygems/rubygems/commit/ae3bdc0e85
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 7b8a24ad08 [rubygems/rubygems] util/rubocop -A --only Style/EmptyCaseCondition
https://github.com/rubygems/rubygems/commit/dae8fc70a4
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 3fe5909ef1 [rubygems/rubygems] util/rubocop -A --only Style/SelfAssignment
https://github.com/rubygems/rubygems/commit/7c1168c623
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f86296fa0a [rubygems/rubygems] util/rubocop -A --only Style/EmptyElse
https://github.com/rubygems/rubygems/commit/04227104ac
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4ab23df2c4 [rubygems/rubygems] util/rubocop -A --only Style/RedundantParentheses
https://github.com/rubygems/rubygems/commit/295691d4dc
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA d8c5fa963f [rubygems/rubygems] util/rubocop -A --only Style/YodaCondition
https://github.com/rubygems/rubygems/commit/3594945391
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 66bd2c1a1c [rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
https://github.com/rubygems/rubygems/commit/4e77a1d1d5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 52ea7afa5f [rubygems/rubygems] util/rubocop -A --only Style/NegatedIf
https://github.com/rubygems/rubygems/commit/aa95ee27a2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA bd57322bfe [rubygems/rubygems] util/rubocop -A --only Style/DefWithParentheses
https://github.com/rubygems/rubygems/commit/91391ceedf
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 03b82d1865 [rubygems/rubygems] util/rubocop -A --only Style/SingleLineMethods
https://github.com/rubygems/rubygems/commit/fa2e835ed2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA d2cebb4e31 [rubygems/rubygems] util/rubocop -A --only Style/NumericLiterals
https://github.com/rubygems/rubygems/commit/860669b08a
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 712d6e675b [rubygems/rubygems] util/rubocop -A --only Style/RedundantInterpolation
https://github.com/rubygems/rubygems/commit/add44e56eb
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 0b632b9cdd [rubygems/rubygems] util/rubocop -A --only Style/ClassCheck
https://github.com/rubygems/rubygems/commit/1c3356a872
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 567db6064b [rubygems/rubygems] util/rubocop -A --only Style/NestedParenthesizedCalls
https://github.com/rubygems/rubygems/commit/a875fdb535
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 3d4c3f9e4f [rubygems/rubygems] util/rubocop -A --only Style/ParallelAssignment
https://github.com/rubygems/rubygems/commit/5c88c77873
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4bb5ce8188 [rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolation
https://github.com/rubygems/rubygems/commit/cb554f6eb7
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 83f9aa8f02 [rubygems/rubygems] util/rubocop -A --only Style/Alias
https://github.com/rubygems/rubygems/commit/fba6e94de9
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f4d1f660d0 [rubygems/rubygems] util/rubocop -A --only Layout/SpaceInsideRangeLiteral
https://github.com/rubygems/rubygems/commit/426dd97a31
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ae81ff0c9b [rubygems/rubygems] util/rubocop -A --only Layout/MultilineBlockLayout
https://github.com/rubygems/rubygems/commit/9aa6101942
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 9a1269eaaa [rubygems/rubygems] util/rubocop -A --only Layout/MultilineArrayBraceLayout
https://github.com/rubygems/rubygems/commit/f4f45ab27e
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 26d6604343 [rubygems/rubygems] util/rubocop -A --only Layout/MultilineMethodCallBraceLayout
https://github.com/rubygems/rubygems/commit/acb0548bf6
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ce21ce6f23 [rubygems/rubygems] util/rubocop -A --only Layout/FirstArgumentIndentation
https://github.com/rubygems/rubygems/commit/0542726fd3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4b285e5c6f [rubygems/rubygems] util/rubocop -A --only Layout/AssignmentIndentation
https://github.com/rubygems/rubygems/commit/8e64298989
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 9ffd73523d [rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundExceptionHandlingKeywords
https://github.com/rubygems/rubygems/commit/ad1fe68d97
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 583fbc627c [rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundModuleBody
https://github.com/rubygems/rubygems/commit/48c88466b7
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA c480a0c46a [rubygems/rubygems] util/rubocop -A --only Layout/LeadingCommentSpace
https://github.com/rubygems/rubygems/commit/4d680320e3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA dab1d0ed20 [rubygems/rubygems] util/rubocop -A --only Layout/EmptyLineBetweenDefs
https://github.com/rubygems/rubygems/commit/00117e69cc
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ab2278eb34 [rubygems/rubygems] util/rubocop -A --only Lint/UselessAccessModifier
https://github.com/rubygems/rubygems/commit/5070f90987
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA eb80f51c6d [rubygems/rubygems] util/rubocop -A --only Lint/RedundantStringCoercion
https://github.com/rubygems/rubygems/commit/58e4885493
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 05208c3875 [rubygems/rubygems] util/rubocop -A --only Lint/UnusedBlockArgument
https://github.com/rubygems/rubygems/commit/d8efd919db
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 7ab4ede4f5 [rubygems/rubygems] util/rubocop -A --only Performance/TimesMap
https://github.com/rubygems/rubygems/commit/976a351f8b
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 139f0927f5 [rubygems/rubygems] util/rubocop -A --only Performance/DoubleStartEndWith
https://github.com/rubygems/rubygems/commit/893da27e7c
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 2eb99350f4 [rubygems/rubygems] Removed rubocop:disable detected by Lint/RedundantCopDisableDirective
https://github.com/rubygems/rubygems/commit/07b0da6c24
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 8e40d1e153 [rubygems/rubygems] RUBY_PATCHLEVEL was provided after Ruby 1.8.5
https://github.com/rubygems/rubygems/commit/7750d5c460
2023-03-17 18:50:55 +09:00
David Rodríguez a47c54131d [rubygems/rubygems] Remove ensure part in require
I've seen this error sometimes but never found it helpful, since the
culprit has never been thread/monitor related, so it just adds noise.

Right now I'm seeing an issue in CI where we seem to be crashing during
ensure and showing a weird backtrace:

```
#<Thread:0x000055821d7a73b8 /home/runner/work/rubygems/rubygems/lib/rubygems/request_set.rb:167 run> terminated with exception (report_on_exception is true):
/home/runner/work/rubygems/rubygems/lib/rubygems/platform.rb:141:in `==': undefined local variable or method `to_a' for false:FalseClass (NameError)
Did you mean?  to_s
	from /home/runner/work/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb:168:in `!='
	from /home/runner/work/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb:168:in `require'
	from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:441:in `block in ensure_subdirectories'
	from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:437:in `each'
	from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:437:in `ensure_subdirectories'
	from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:413:in `ensure_gem_subdirectories'
	from /home/runner/work/rubygems/rubygems/lib/rubygems/resolver/specification.rb:110:in `download'
	from /home/runner/work/rubygems/rubygems/lib/rubygems/request_set.rb:173:in `block (2 levels) in install'
```

Let's get this out of the picture in case that helps clarify the
culprit.

https://github.com/rubygems/rubygems/commit/87ce40b70e
2023-03-17 18:50:55 +09:00
David Rodríguez dd0f0a5e6e [rubygems/rubygems] Fix `gem uninstall` with `--install-dir`
https://github.com/rubygems/rubygems/commit/ac23687353
2023-03-17 18:50:55 +09:00
Mau Magnaguagno 364364c3bd [rubygems/rubygems] Improve TarHeader#calculate_checksum
String#unpack("C*") is equivalent to String#bytes and Array#inject {|a,b| a + b } is equivalent to Array#sum.
This is a minor enhancement in terms of speed and readability.
2023-03-16 12:55:01 +00:00
Hiroshi SHIBATA 760b8b7d24 [rubygems/rubygems] Change enforce style with Layout/CaseIndentation on rubygems
https://github.com/rubygems/rubygems/commit/d4938259c4
2023-03-16 01:59:11 +00:00
Hiroshi SHIBATA b528ecc164 [rubygems/rubygems] OpenSSL::Digest is always provided after Ruby 2.4
https://github.com/rubygems/rubygems/commit/4f2f2ad412
2023-03-15 11:21:21 +00:00
Hiroshi SHIBATA 55a0fbfaf8 [rubygems/rubygems] Move build artifact detection logic for root gemspec to bundler from Gem::Specification.
Gem::Specification#missing_extension? is heavily called from RubyGems.
  We should reduce extra method call from this place.

https://github.com/rubygems/rubygems/commit/e24e59d44d
2023-03-15 03:35:54 +00:00
Hiroshi SHIBATA fade612d18 [rubygems/rubygems] Removed needless option
https://github.com/rubygems/rubygems/commit/4489361a21
2023-03-10 03:51:17 +00:00
Hiroshi SHIBATA 15739c66b7 [rubygems/rubygems] Added only missing extensions option into pristine command
https://github.com/rubygems/rubygems/commit/cfd0e615d7
2023-03-10 03:51:16 +00:00
Hiroshi SHIBATA 3926ad578c [rubygems/rubygems] Drop to support Psych 3.0 bundled at Ruby 2.5
https://github.com/rubygems/rubygems/commit/a6650c2c96
2023-03-09 13:37:06 +00:00
Hiroshi SHIBATA ea8b5e7359 [rubygems/rubygems] rubocop -a lib/rubygems/specification.rb
https://github.com/rubygems/rubygems/commit/85d60e9886
2023-03-08 23:23:45 +00:00
Hiroshi SHIBATA cb3f1f6de8 [rubygems/rubygems] Detect extension files under full_required_paths
When we use this methods with local gemspec, we don't handle
  build status of extension correctly. So We need to find extension
  files in require_paths.

  Example with ruby/erb repository:

  ```
  $ bundle exec irb
  Ignoring erb-4.0.2 because its extensions are not built. Try: gem pristine erb --version 4.0.2
  >>
  ```

https://github.com/rubygems/rubygems/commit/f90e43cf3f
2023-03-08 23:23:45 +00:00
Martin Emde 85a1738ab3 [rubygems/rubygems] Add TarReader::Entry#seek to seek within the tar file entry
TarReader#each previously implemented a partial version of seek.
This code moved to Entry#seek for use from TarReader#each.

Entry#close now returns nil instead of true, like IO#close.

Closing an Entry now seeks to the end of the Entry, seeking past
any remaining zero byte tar file padding and moving the io to the
correcty position to read the next file in the archive.

Uses seek for Entry#rewind and #pos=, fixing the tar->gzip->tar nested
rewind that would break previous to this change.

Add Entry.open that behaves more like File.open.

https://github.com/rubygems/rubygems/commit/f5149565d5
2023-03-07 20:21:43 +00:00
Samuel Giddins 638f68b2fe [rubygems/rubygems] Avoid calling String#dup in Gem::Version#marshal_dump
Might potentially save a second every time RubyGems.org creates a specs index

https://github.com/rubygems/rubygems/commit/d6e4d50f8d
2023-03-07 11:48:41 +00:00
Josef Šimánek dc33d32f12
Use proper memoized var name for Gem.state_home. 2023-03-07 16:52:28 +09:00
David Rodríguez bd0f2c7958 [rubygems/rubygems] Let git source use default cloned repo branch
https://github.com/rubygems/rubygems/commit/d8af770379
2023-03-07 16:51:34 +09:00
Hiroshi SHIBATA f70b46dbc7
More debug for 75829f4d37 2023-03-06 13:01:54 +09:00
Hiroshi SHIBATA 75829f4d37
Added debug message for http://rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20230306T023004Z.fail.html.gz#dist 2023-03-06 12:45:05 +09:00
Hiroshi SHIBATA 0c9a2ce6e0 [rubygems/rubygems] Build default gems same as fresh installtion.
Current implementation tried to build installation artifact. But default gems
  didn't provide normal gem files. So, It's always build failure.

  https://github.com/ruby/bigdecimal/actions/runs/4269574995/jobs/7432842788

    ERROR:  Error installing pkg/bigdecimal-3.1.4.gem:
    ERROR: Failed to build gem native extension.

    No such file or directory @ dir_s_mkdir - /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/bigdecimal-3.1.4/ext/bigdecimal/.gem.20230225-2301-2mul99

    Gem files will remain installed in /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/gems/bigdecimal-3.1.4 for inspection.
    Results logged to /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.3.0+0/extensions/x86_64-darwin-19/3.3.0+0/bigdecimal-3.1.4/gem_make.out

https://github.com/rubygems/rubygems/commit/2157aa8ec8
2023-03-05 23:52:28 +00:00
Hiroshi SHIBATA bab809d98f [rubygems/rubygems] Introduce Gem::Specification.find_by_full_name for finding conbination of name and version for gemspec
https://github.com/rubygems/rubygems/commit/0430551215
2023-03-05 23:52:28 +00:00
Samuel Giddins 2d6097a0f5 [rubygems/rubygems] Fix method redefinition warning in gem exec specs
https://github.com/rubygems/rubygems/commit/f177990d4c
2023-02-28 12:54:37 +00:00
Samuel Giddins a17b1b19b1 [rubygems/rubygems] Always join with a string
Gem.path_separator can also be a regexp...

https://github.com/rubygems/rubygems/commit/7e6e56a5f3
2023-02-22 08:42:20 +00:00
Samuel Giddins 0ca3a095be [rubygems/rubygems] Only update env if var exists
Will save on an error if it would be nil from an exception happening during that line

https://github.com/rubygems/rubygems/commit/d6797a04e9
2023-02-22 08:42:19 +00:00
Samuel Giddins 80bfa1b30a [rubygems/rubygems] Fix resetting env in gem exec, and make sure it is set for gem exec gem
https://github.com/rubygems/rubygems/commit/13a6dd4992
2023-02-22 08:42:18 +00:00
Samuel Giddins 2dd9698350 [rubygems/rubygems] Allow gem exec gem
https://github.com/rubygems/rubygems/commit/a767f7b9be
2023-02-22 08:42:17 +00:00
Samuel Giddins 47d4f73ee7 [rubygems/rubygems] Remove platform option for gem exec
Also fix native extensions that load dependencies

https://github.com/rubygems/rubygems/commit/a06f9870c7
2023-02-22 08:42:17 +00:00
Samuel Giddins 612ebd10c0 [rubygems/rubygems] Ensure dependencies are updated by default when running gem exec
https://github.com/rubygems/rubygems/commit/664f3e1e5f
2023-02-22 08:42:16 +00:00
Samuel Giddins 3f0f9a7942 [rubygems/rubygems] Add gem exec description
https://github.com/rubygems/rubygems/commit/dac1609fd5
2023-02-22 08:42:16 +00:00
Samuel Giddins d81be0609b [rubygems/rubygems] Add specs for gem exec
https://github.com/rubygems/rubygems/commit/3078e5834e
2023-02-22 08:42:16 +00:00
Samuel Giddins cbe14cc8e6 [rubygems/rubygems] Add gem exec command
https://github.com/rubygems/rubygems/commit/ca69a317f3
2023-02-22 08:42:15 +00:00
Hiroshi SHIBATA 38fa8eb4cb Merge rubygems/bundler master
Pick from e9304aed7e
2023-02-21 19:28:12 +09:00
Nobuyoshi Nakada 9b6d421ff4 [rubygems/rubygems] [DOC] Update the link to OpenSource.org
The static list in alphabetical order seems no longer provided.

https://github.com/rubygems/rubygems/commit/a37dff7736
2023-02-21 10:26: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.

https://github.com/rubygems/rubygems/commit/bba32d7217
2023-02-02 17:17:34 +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.

https://github.com/rubygems/rubygems/commit/41301cd2a8
2023-02-01 16:44:55 +00: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.

https://github.com/rubygems/rubygems/commit/1df5009e14

Co-authored-by: Xavier Noria <fxn@hashref.com>
2023-01-31 10:49:08 +09:00
Mat Sadler cb06006213 [rubygems/rubygems] normalise manifest path from cargo on windows
https://github.com/rubygems/rubygems/commit/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
https://github.com/rubygems/rubygems/commit/cb7e6d1577
2023-01-30 17:39:48 +00:00
Mat Sadler b4defea362 [rubygems/rubygems] install rust extensions into expected directory nesting
https://github.com/rubygems/rubygems/commit/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

https://github.com/rubygems/rubygems/commit/5a0d7f2e6c
2023-01-30 17:39:47 +00:00
Mat Sadler 00e1ee4a7e [rubygems/rubygems] don't force Cargo.lock to be in gem root
https://github.com/rubygems/rubygems/commit/371044c0ab
2023-01-30 17:39:46 +00:00
Samuel Giddins 71256caf7f [rubygems/rubygems] Update the list of SPDX licence identifiers
https://github.com/rubygems/rubygems/commit/18a9b0dc7e
2023-01-27 11:31:41 +09:00
Samuel Giddins 70829928cb [rubygems/rubygems] Deprecate Gem::List
It is unused, we will remove it in the next major version

https://github.com/rubygems/rubygems/commit/c3f6c27d6d
2023-01-26 21:41:48 +00:00
Hiroshi SHIBATA d9fd048351 [rubygems/rubygems] blade is hosted under ruby-lang.org now
https://github.com/rubygems/rubygems/commit/00fdef8a41
2023-01-23 05:55:46 +00:00
Hiroshi SHIBATA a43f1d90c2 Merge RubyGems and Bundler master
from 0635c1423d
2023-01-10 15:53:07 +09:00
Nobuyoshi Nakada 89546dce21 [rubygems/rubygems] [DOC] Remove internal document about `Kernel` monkey patch
https://bugs.ruby-lang.org/issues/19285

https://github.com/rubygems/rubygems/commit/1e22219ed4
2023-01-08 08:09:34 +00:00
Nobuyoshi Nakada 55aa1a206c [rubygems/rubygems] `LoadError#path` on the caught exception does not need to protect
https://github.com/rubygems/rubygems/commit/a31f5d1a18
2023-01-08 08:09:34 +00:00
Nobuyoshi Nakada 1a1b653c9c [rubygems/rubygems] Let RDoc parse the doc of `Kernel#require`
Since RDoc does not parse string literals as documents, `eval` the
entire file instead of embedding in a here-document.
On the contrary, as `gem_original_require` alias is an implementation
detail but not for users, it should not be documented.

https://github.com/rubygems/rubygems/commit/cad4cf16cf
2023-01-08 08:09:33 +00:00
Gustavo Ribeiro f5a035daf9 [rubygems/rubygems] deprecate gem build -C flag
https://github.com/rubygems/rubygems/commit/fac241d4ef
2022-12-26 19:08:55 +00:00
Gustavo Ribeiro 08f6196bda [rubygems/rubygems] add global flag (-C) to change execution directory
https://github.com/rubygems/rubygems/commit/312fc36711
2022-12-26 19:08:55 +00:00
Hiroshi SHIBATA b7ad60a794 Merge RubyGems/Bundler master
from 72fd3dd209
2022-12-26 15:09:21 +09:00
Hiroshi SHIBATA f6620037ba Merge RubyGems-3.4.0 and Bundler-2.4.0 2022-12-24 16:57:07 +09:00
Eloy Espinaco 0a9544ce4a [rubygems/rubygems] Cleanup intermediate artifacts after installing built extensions
https://github.com/rubygems/rubygems/commit/98b6a959bd
2022-12-20 13:15:02 +09:00
Hiroshi SHIBATA bbe56a6437 Merge RubyGems/Bundler master
from bfb0ae6977
2022-12-12 10:49:43 +09:00
David Rodríguez 73eddee76e [rubygems/rubygems] Bump optparse to 0.3.0
And remove a patch no longer needed since we dropped Ruby 2.4 support.

https://github.com/rubygems/rubygems/commit/8939337072
2022-12-11 13:35:01 +00:00
David Rodríguez d82328ffc8 [rubygems/rubygems] Bump Molinillo and tsort
And configure tsort to be vendored as a dependency of Molinillo.

https://github.com/rubygems/rubygems/commit/8ec749f891
2022-12-11 13:35:00 +00:00
Benoit Daloze a57a3154d3 [rubygems/rubygems] Avoid deprecated Gem::Platform.match in Gem::Resolver::InstallerSet
https://github.com/rubygems/rubygems/commit/05cb5410cb
2022-12-08 07:17:09 +00:00
Ian Ker-Seymer 554161236a [rubygems/rubygems] Always build in release mode
https://github.com/rubygems/rubygems/commit/7b84fc1f19
2022-12-07 11:31:25 +00:00
Hiroshi SHIBATA 28611be6ee Merge RubyGems/Bundler master from ee2f8398324af4bc1b95f7565ce2fda98126e026 2022-11-11 17:24:08 +09:00
Josef Šimánek de159c5a85 [rubygems/rubygems] Store last check even when upgrade is not available and fix test.
https://github.com/rubygems/rubygems/commit/bcffc2b0a5
2022-11-11 17:24:08 +09:00
Josef Šimánek 7ce0f81fbb [rubygems/rubygems] Use file in XDG_STATE_HOME directory to store last update check timestamp.
https://github.com/rubygems/rubygems/commit/0fbc4ace8a
2022-11-11 17:24:08 +09:00
Josef Šimánek c7d043065c [rubygems/rubygems] Add 'call for update' to RubyGems install command.
https://github.com/rubygems/rubygems/commit/05811f8248
2022-11-11 17:24:08 +09:00
Jason Karns ceeefb5870 [rubygems/rubygems] github source should default to secure protocol
Bundler 2 switched to secure https here c2e81f8ff6

Insecure protocols should be avoided to prevent MITM attacks.

https://github.com/rubygems/rubygems/commit/758413364a
2022-11-11 17:24:08 +09:00
Peter Zhu 1e53ebae57 [rubygems/rubygems] Drop support for bitrig
The bitrig OS is no longer maintained with the last release being 7
years ago.

https://github.com/rubygems/rubygems/commit/85ed90ddd0
2022-11-07 10:52:14 +00:00
Peter Zhu 0fb7a1c77c [rubygems/rubygems] Drop support for HP-UX
Support for HP-UX was dropped in Ruby in ruby/ruby#5457.

https://github.com/rubygems/rubygems/commit/a3a8df3582
2022-11-07 10:52:13 +00:00
Thomas E. Enebo 420bdba139 [rubygems/rubygems] Allow upcoming JRuby to pass keywords for Kernel#warn
jruby-head (which will be JRuby 9.4.0.0) can now properly process
the keywords to Kernel#warn.  I cannot think of any capability based
test for this so I constrained it using a version guard.  Only JRuby
will ever hit the version guard.

https://github.com/rubygems/rubygems/commit/cd468c7e0f
2022-10-22 08:01:24 +00:00
David Rodríguez a44040c9e4 [rubygems/rubygems] Add notes to make sure we don't forget to backport changes to Bundler
https://github.com/rubygems/rubygems/commit/1ac5b14c78

Co-authored-by: André Arko <andre@arko.net>
2022-10-01 05:46:41 +09:00
David Rodríguez f04d249e83 [rubygems/rubygems] Fix matching of eabihf platforms
https://github.com/rubygems/rubygems/commit/a03d30cd58
2022-10-01 05:46:40 +09:00
David Rodríguez 8252ea2140 [rubygems/rubygems] Fix matching of linux platforms with eabi modifiers
https://github.com/rubygems/rubygems/commit/89362c18ef

Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
2022-10-01 05:46:40 +09:00
David Rodríguez 4d58ee3de0 [rubygems/rubygems] Refactor platform matching on Linux
I think this highlights better how musl is special.

https://github.com/rubygems/rubygems/commit/4075771697
2022-10-01 05:46:39 +09:00
Jenny Shen 28840d74c2 [rubygems/rubygems] Refine error message to check the push URL instead of just the host
https://github.com/rubygems/rubygems/commit/46990f3292
2022-09-29 17:56:36 +09:00
Jenny Shen 17b783ad9e [rubygems/rubygems] Surface entire redirect uri in permanent redirections
https://github.com/rubygems/rubygems/commit/da7837630b
2022-09-29 17:56:35 +09:00
Jenny Shen 1cbf0fd863 [rubygems/rubygems] Add error message when api response is a permanent redirect
https://github.com/rubygems/rubygems/commit/ccca30c77a

Co-authored-by: Nick Schwaderer <nick.schwaderer@shopify.com>
2022-09-29 17:56:34 +09:00
Mike Dalessio 8f7f12ad64 [rubygems/rubygems] fix: Gem::Platform.match handles String argument properly
Previously 9eead86 introduced non-commutativity of platforms, and
later commit 1b9f7f50 changed the behavior of `Gem::Platform.match` to
ensure the callee of `#=~` was the gem platform.

However, when the platform argument is a String, then the callee and
argument of `#=~` are flipped (see docs for `String#=~`), which works
against the fix from 1b9f7f50.

Closes #5938

https://github.com/rubygems/rubygems/commit/3b1fb562e8
2022-09-28 05:55:28 +09:00
Kevin Newton 68a5b0f086 [rubygems/rubygems] Mask the file mode when extracting files
When extracting files from the tarball, a mode is retrieved from
the header. Occasionally you'll encounter a gem that was packaged
on a system whose permission bits result in a value that is larger
than the value that File.chmod will allow (anything >= 2^16). In
that case the extraction fails with a RangeError, which is pretty
esoteric.

If you extract the tarball with the tar and gunzip utilities, the
file permissions end up being just the bottom 16 bits masked off
from the original value. I've mirrored that behavior here. Per the
tar spec:

> Modes which are not supported by the operating system restoring
> files from the archive will be ignored.

I think that basically means what I've done here.

---

This commit also changes the behavior very slightly with regard to
when the chmod is called. Previously it was called while the file
descriptor was still open, but after the write call.

When write flushes, the file permissions are changed to the mode
value from the File.open call, undoing the changes made by
FileUtils.chmod. CRuby appears to flush the buffer after the
chmod call, whereas TruffleRuby flushes before the chmod call.
So the file permissions can change depending on implementation.
Both implementations end up getting the correct file permissions
for the bottom 9 bits (user, group, world), but differ with
regard to the sticky bit in the next 3.

To get consistent behavior, this commit changes it to close the
file descriptor before attempting to chmod anything, which makes
it consistent because the write flushes in both cases.

https://github.com/rubygems/rubygems/commit/22ce076e99
2022-09-15 14:49:20 +09:00
David Rodríguez b350053ae4 [rubygems/rubygems] Fix resolution on non-musl platforms
Gems without specific platform were being preferred over matching
platform specific gems.

https://github.com/rubygems/rubygems/commit/37b95b9159
2022-09-09 19:38:52 +09:00
David Rodríguez 24fd2f73d0 Resync Bundler & RubyGems 2022-09-08 11:25:03 +09:00
Antonio Paulino 4c1f6750f2 [rubygems/rubygems] Fix: Gem info bug with version flag
https://github.com/rubygems/rubygems/commit/e4cee1f975
2022-09-07 06:18:58 +09:00
なつき aded6971ad [rubygems/rubygems] Support non gnu libc arm-linux-eabi platforms
https://github.com/rubygems/rubygems/commit/394d7a6fc9
2022-09-01 15:01:40 +09:00
David Rodríguez 59f27445ea [rubygems/rubygems] Implement extra rules for libc versioning
https://github.com/rubygems/rubygems/commit/7e976d790a
2022-08-23 05:50:23 +09:00
David Rodríguez 492e70c7b4 [rubygems/rubygems] Fix `gem install` still choosing musl incorrectly
https://github.com/rubygems/rubygems/commit/1b9f7f50a5
2022-08-23 05:50:22 +09:00
David Rodríguez 9819283044 [rubygems/rubygems] Handle non-gnu libc on linux platforms in RubyGems
Attempting to install a gem published as both *-linux and *-linux-musl
results in the incorrect gem being picked up, causing build failures due
to binary incompatibility. This is caused by the `nil` wildcard
swallowing the libc information upon version comparison.

Handle the linux case by performing only non-wildcard equality on the
version and asserting 'gnu' and nil equivalence, while preserving the
current behaviour for other OSes.

https://github.com/rubygems/rubygems/commit/9eead86abc

Co-authored-by: Loic Nageleisen <loic.nageleisen@gmail.com>
2022-08-23 05:50:21 +09:00
Loic Nageleisen 615f79be3c [rubygems/rubygems] Test platform's version-ness consistently
The symmetry with the "for command line" case is made more apparent.

https://github.com/rubygems/rubygems/commit/ab85d3558f
2022-08-23 05:50:20 +09:00
Hiroshi SHIBATA 44264b4fee Merge rubygems/bundler HEAD.
Pick from dfbb5a3811
2022-08-09 12:05:19 +09:00
David Rodríguez f310ac1cb2 [rubygems/rubygems] Include backtrace with crashes by default
https://github.com/rubygems/rubygems/commit/3cc3bfd371
2022-08-05 16:37:03 +09:00
David Rodríguez 542040fb83 [rubygems/rubygems] Warn dangling symlinks
https://github.com/rubygems/rubygems/commit/425b78637f
2022-08-04 13:36:45 +09:00
David Rodríguez 0591780a74 [rubygems/rubygems] Extract entry.full_name to a variable
https://github.com/rubygems/rubygems/commit/3973773005
2022-08-04 13:36:44 +09:00
Hiroshi SHIBATA 71794a75db Merge rubygems/bundler HEAD
Pick from 8331e63263
2022-08-03 13:14:10 +09:00
Ilya Dyakonov 4f00ee8d47 [rubygems/rubygems] fix platform matching for index specs
https://github.com/rubygems/rubygems/commit/f087f1b590
2022-08-03 06:56:36 +09:00
David Rodríguez 20936eb3a9 [rubygems/rubygems] Warn (rather than crash) when setting `nil` specification versions
https://github.com/rubygems/rubygems/commit/a4ba1a4d97
2022-08-03 06:56:18 +09:00
Ashley Ellis Pierce 244bda7efd [rubygems/rubygems] Display mfa warnings on gem signin
https://github.com/rubygems/rubygems/commit/4dc77b7099

Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
2022-07-23 03:42:59 +09:00
Nobuyoshi Nakada a4e890b93e [rubygems/rubygems] Use `SystemExit#status` as `exit_code`
No reasons to manage separately.

https://github.com/rubygems/rubygems/commit/8ede5c886e
2022-07-22 21:01:31 +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 Rodríguez fa5724cca9 [rubygems/rubygems] Fix `ruby setup.rb --destdir /foo` modifying global specs
Running a command like that is actually removing any previous default
bundler specs in the default RubyGems installation (outside of destdir).
It should instead only modify destdir.

https://github.com/rubygems/rubygems/commit/5ed275383c
2022-07-20 19:55:34 +09:00
David Rodríguez a74634de10 [rubygems/rubygems] Fix upgrading RubyGems with a customized `Gem.default_dir`
https://github.com/rubygems/rubygems/commit/16d01f9486
2022-07-18 19:07:55 +09:00
Yuta Saito fab8f3bde6 [rubygems/rubygems] Stop using `/dev/null` for silent ui for WASI platform
WASI doesn't guarantee that `/dev/null` is present.
So without this patch, we needed to mount host's `/dev` directory to WASI
guest process to avoid `ENOTCAPABLE` error while `require "bundler/setup"`

https://github.com/rubygems/rubygems/commit/e9187ab61f
2022-07-17 19:44:51 +09:00
Nobuyoshi Nakada 5ae83151b1 [rubygems/rubygems] Drop support for old `Gem::Specification` versions
`specification_version` method was added before RubyGems 1.0, and
`add_runtime_dependency` method was before 1.2.  These seem aged
enough to remove.

https://github.com/rubygems/rubygems/commit/92770c5cd9
2022-07-16 19:33:16 +09:00
Takuya Noguchi 8e451d1083 [rubygems/rubygems] Fix wrong information about default RubyGems source
Also fix regression from rubygems/rubygems PR 3056

https://my.diffend.io/gems/rubygems-update/1.3.5/1.3.6/page/4#d2h-514986
https://my.diffend.io/gems/rubygems-update/2.0.0/2.0.2/page/2#d2h-514986

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

https://github.com/rubygems/rubygems/commit/06b1e9ebc5
2022-07-15 17:32:05 +09:00
David Rodríguez 8c74eaa08d [rubygems/rubygems] Fix `gem update --system` crash while regenerating binstubs
Since a few commits ago, we no longer call `Gem::Specification.reset`
after each invocation of `Gem::Installer#install`. This means we don't
call it when the default Bundler is installed during `gem update
--system`. This causes no issues until the end of the upgrade process
when:

* The previous default Bundler spec is removed from disk.
* All specification stubs are turned into real specifications by loading
  them from disk. But the one for Bundler no longer exists so
  materializes to `nil` and regenerating binstubs crashes like this:

  ```
  Bundler 2.4.0.dev installed
  RubyGems 3.4.0.dev installed
  Regenerating binstubs
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `platform' for nil:NilClass
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `block in execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:981:in `block in each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:980:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `map'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `each'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `select'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/pristine_command.rb:116:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:301:in `invoke'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:604:in `regenerate_binstubs'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/setup_command.rb:183:in `execute'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:323:in `invoke_with_build_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:185:in `process_args'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:149:in `run'
    /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:51:in `run'
  setup.rb:33:in `<main>'
  ```

We fix it by more carefully managing the removal of the previous default
Bundler gem.

https://github.com/rubygems/rubygems/commit/9989f6d5af
2022-07-14 04:47:58 +09:00
Hiroshi SHIBATA 437a5ae9d6 Merge RubyGems and Bundler master 2022-07-13 14:11:55 +09:00
Brian Le 902d1a5c51 [rubygems/rubygems] add message when gems are requested to be updated but they are not installed
https://github.com/rubygems/rubygems/commit/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
https://github.com/rubygems/rubygems/commit/4ec608a573
2022-07-06 02:59:13 +09:00
David Rodríguez a16de43f23 [rubygems/rubygems] Add `gem env user_gemhome` and `gem env user_gemdir`
https://github.com/rubygems/rubygems/commit/14d3f80df6
2022-06-29 03:25:46 +09:00
David Rodríguez 1098fdf890 [rubygems/rubygems] Also document `gem env` argument aliases
https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/b89da79456
2022-06-29 03:25:45 +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.

https://github.com/rubygems/rubygems/commit/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 1e8bf48fd5 [rubygems/rubygems] Bring TODO message up to date
https://github.com/rubygems/rubygems/commit/e07dba0923
2022-06-17 17:05:21 +09:00
David Rodríguez 5450b409fc [rubygems/rubygems] Remove part of comment that fell out of date
https://github.com/rubygems/rubygems/commit/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.

https://github.com/rubygems/rubygems/commit/dea41fa2dc
2022-06-17 17:05:20 +09:00
David Rodríguez 1aaeff8e36 [rubygems/rubygems] Remove unnecessary condition
This variable can't be falsy.

https://github.com/rubygems/rubygems/commit/b838f9a6f0
2022-06-17 17:05:19 +09:00
David Rodríguez 5a385677f3 [rubygems/rubygems] No need to change `RbConfig::CONFIG` at all
Only `RbConfig::MAKEFILE_CONFIG` is actually used.

https://github.com/rubygems/rubygems/commit/b767cc0929
2022-06-17 17:05:19 +09:00
David Rodríguez d0bf31e6cf [rubygems/rubygems] Don't on gemspecs with invalid `require_paths`, just warn
These gemspecs already work most of the times. When they are installed
normally, the require_paths in the gemspec stub line becomes actually
correct, and the incorrect value in the real gemspec is ignored. It only
becomes an issue in standalone mode.

In Ruby 3.2, `Kernel#=~` has been removed, and that means that it
becomes harder for us to gracefully deal with this error in standalone
mode, because it now happens earlier due to calling `Array#=~` for this
invalid gemspec (since require_paths is incorrectly an array of arrays).

The easiest way to fix this is to actually make this just work instead
by automatically fixing the issue when reading the packaged gemspec.

https://github.com/rubygems/rubygems/commit/d3f2fe6d26
2022-06-12 02:02:20 +09:00
Daniel Berger deff9e2699 [rubygems/rubygems] Remove unnecessary string concatenation
https://github.com/rubygems/rubygems/commit/81ccb3ab89
2022-06-07 23:18:31 +09:00
David Rodríguez ba38318827 [rubygems/rubygems] Unify loading `Gem::Requirement`
It was being explicitly required from `Gem::Specification` but also a
strange autoload was set for it at `Gem::Version`. The autoload was non
standard because it should've been done in the `Gem` module, not in
`Gem::Specification`, since that's where the constant is expected to get
defined. Doing this might get deprecated in the future, and it was not
being effective anyways due to the explicit require.

Unify everything with an `autoload` at the right place.

https://github.com/rubygems/rubygems/commit/174ea3e24c
2022-06-06 18:36:31 +09:00
David Rodríguez 8381c568e7 [rubygems/rubygems] Restore ability to load old marshalled gemspec that use `YAML::PrivateType`
This issue was not detected because when all traces of old YAML parser
and emitter `Syck` were removed, this null-type.gemspec.rz marshalled
gemspec was updated to no longer load `YAML::Syck::PrivateType` but load
`Psych::PrivateType` instead.

However, realworld old marshalled gemspecs still use the
`YAML::PrivateType` constant, so this commit replaces the gemspec to be
the real pry-0.4.7 marshalled gemspec, so that it catches this issue.

https://github.com/rubygems/rubygems/commit/51b330b8d2
2022-06-01 17:06:52 +09:00
David Rodríguez ebb534801f [rubygems/rubygems] Remove no longer needed `Psych::PrivateType` cleanup
This old bug used to affect the `rubyforge_project` field in serialized
gemspecs. However, this field has been removed and it's no longer
present in marshaled loaded gemspecs.

So, while the constant is still present in these marshalled gemspecs and
we still need to make sure it exists, we no longer need to clean it up
from the loaded data.

https://github.com/rubygems/rubygems/commit/09df18e522
2022-06-01 17:06:51 +09:00
David Rodríguez 6e3295e554 [rubygems/rubygems] Make code to find target update version easier to follow
https://github.com/rubygems/rubygems/commit/a7f81cc7ee
2022-05-28 19:22:54 +09:00