David Rodríguez
aea603615f
[rubygems/rubygems] Missing tweak
...
407c1cbcfe
2025-05-19 11:15:30 +09:00
Samuel Giddins
4be199e435
[rubygems/rubygems] Simplify Gem::Platform#initialize
...
Based on PR feedback
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
562d7aa087
2025-05-19 11:15:29 +09:00
Samuel Giddins
8f61e17556
[rubygems/rubygems] RuboCop
...
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
768784910b
2025-05-19 11:15:29 +09:00
Samuel Giddins
eb48418b40
[rubygems/rubygems] Ensure that Gem::Platform parses strings to a fix point
...
The issue was that the property that
```ruby
platform = Gem::Platform.new $string
platform == Gem::Platform.new(platform.to_s)
```
was not always true.
This property (of acchieving a fix point) is important,
since `Gem::Platform` gets serialized to a string and
then deserialized back to a `Gem::Platform` object.
If it doesn't deserialize to the same object, then
different platforms are used for the initial serialization
than subsequent runs.
I used https://github.com/segiddins/Scratch/blob/main/2025/03/rubygems-platform.rb
to find the failing cases and then fixed them.
With this patch, the prop check test now passes.
313fb4bcec
2025-05-19 11:15:28 +09:00
なつき
88a2a46e23
[rubygems/rubygems] Restrict generic arm
to only match 32-bit arm
...
14c4c16e96
2024-07-05 09:02:52 +00:00
Yuta Saito
273d41b9e3
[rubygems/rubygems] Add --target-rbconfig
option to gem install
and gem update
commands
...
This patch adds `--target-rbconfig` option to specify the rbconfig.rb file
for the deployment target platform. This is useful when cross-compiling
gems. At the moment, this option is only available for `extconf.rb`-based
extensions.
cf2843f7a2
2024-06-18 00:59:35 +00:00
Yuta Saito
80adf6a18c
[rubygems/rubygems] Accept WASI as an OS name in Gem::Platform
...
1209d3c6b0
2024-05-07 05:36:35 +00:00
Samuel Giddins
baf2ec2ca8
[rubygems/rubygems] Use match? when regexp match data is unused
...
Improved performance / reduced allocations
b04726c9a7
2023-12-13 22:00:26 +00:00
Benoit Daloze
a94a2eea34
[rubygems/rubygems] Upstream RubyGems changes from TruffleRuby
...
749a508968
2023-12-08 17:01:23 +00:00
Samuel Giddins
7e7d1f0679
[rubygems/rubygems] Avoid regexp match on every call to Gem::Platform.local
...
The result of `arch` would be ignored if `@local` is set, so wrap all
the logic in `@local ||=` to short-circuit everything
b67d39f3e0
2023-10-25 18:51:37 +00:00
Hiroshi SHIBATA
7fdf98ef39
[rubygems/rubygems] Deprecate Gem::Platform.match
...
e3ba3e2225
2023-07-21 08:47:55 +00:00
Hiroshi SHIBATA
a881b33818
[rubygems/rubygems] util/rubocop -A --only Performance/RegexpMatch
...
52ae4452c2
2023-04-04 12:20:43 +00:00
Hiroshi SHIBATA
f24a86d83f
util/rubocop -A --only Layout/EmptyLineAfterMagicComment
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
0373615948
util/rubocop -A --only Layout/SpaceInsideArrayLiteralBrackets
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
66bd2c1a1c
[rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
...
4e77a1d1d5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
3d4c3f9e4f
[rubygems/rubygems] util/rubocop -A --only Style/ParallelAssignment
...
5c88c77873
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
83f9aa8f02
[rubygems/rubygems] util/rubocop -A --only Style/Alias
...
fba6e94de9
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
760b8b7d24
[rubygems/rubygems] Change enforce style with Layout/CaseIndentation on rubygems
...
d4938259c4
2023-03-16 01:59:11 +00:00
Hiroshi SHIBATA
a43f1d90c2
Merge RubyGems and Bundler master
...
from 0635c1423d
2023-01-10 15:53:07 +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.
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 .
a3a8df3582
2022-11-07 10:52:13 +00:00
David Rodríguez
a44040c9e4
[rubygems/rubygems] Add notes to make sure we don't forget to backport changes to Bundler
...
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
...
a03d30cd58
2022-10-01 05:46:40 +09:00
David Rodríguez
8252ea2140
[rubygems/rubygems] Fix matching of linux platforms with eabi modifiers
...
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.
4075771697
2022-10-01 05:46:39 +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
3b1fb562e8
2022-09-28 05:55:28 +09:00
なつき
aded6971ad
[rubygems/rubygems] Support non gnu libc arm-linux-eabi platforms
...
394d7a6fc9
2022-09-01 15:01:40 +09:00
David Rodríguez
59f27445ea
[rubygems/rubygems] Implement extra rules for libc versioning
...
7e976d790a
2022-08-23 05:50:23 +09:00
David Rodríguez
492e70c7b4
[rubygems/rubygems] Fix gem install
still choosing musl incorrectly
...
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.
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.
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
Takuya Noguchi
d7ffd3fea4
RubyGems: Enable Style/StringLiterals cop
...
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22 12:07:23 +09:00
Hiroshi SHIBATA
437a5ae9d6
Merge RubyGems and Bundler master
2022-07-13 14:11:55 +09:00
David Rodríguez
f04954d95c
[rubygems/rubygems] Normalize end alignment style with Bundler
...
f7f504b24c
2022-01-19 11:20:36 +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
Daniel Niknam
f212b9d4f2
[rubygems/rubygems] Refactor Ruby platform priority condition to its own method
...
The `Gem::Platform::RUBY ? -1 : 1` has been used multiple times in different places and could be refactored to a method (DRY).
9d43ca8f0c
2021-08-31 19:06:14 +09:00
David Rodríguez
54ae3f587e
[rubygems/rubygems] Prefer require_relative
to require
for internal requires
...
c74fc58695
2021-08-31 19:06:14 +09:00
Hiroshi SHIBATA
96741765d8
Merge the master branch of RubyGems
2021-04-15 15:36:15 +09:00
David Rodríguez
53468cc111
Sync latest development version of bundler & rubygems
2021-03-08 13:47:35 +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
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
Olle Jonsson
5eacf4e72c
Enable rubocop-performance StartWith cop
...
- this would keep the could-be-a-string-method matches few
2020-06-05 07:32:42 +09:00
David Rodríguez
061add792e
[rubygems/rubygems] Enable Style/ExtraSpacing
and auto-correct
...
6fa0b1b679
2020-03-30 12:48:23 +09:00
f
73633683c5
[rubygems/rubygems] add tests
...
8a7e27381c
2019-09-26 17:48:01 +09:00
f
1fb44d2b8c
[rubygems/rubygems] Detect libc version, closes #2918
...
1d18b12a26
2019-09-26 17:48:01 +09:00
hsbt
4ae3df42f7
Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9c
...
This version contains the some style changes by RuboCop.
* 9d810be0ed
* 61ea98a727
* 795893dce3
* 9be7858f7f
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-14 12:59:03 +00:00
hsbt
5335ce0e06
Merge master branch from rubygems/rubygems upstream.
...
* Enable Style/MethodDefParentheses in Rubocop
https://github.com/rubygems/rubygems/pull/2478
* Enable Style/MultilineIfThen in Rubocop
https://github.com/rubygems/rubygems/pull/2479
* Fix required_ruby_version with prereleases and improve error message
https://github.com/rubygems/rubygems/pull/2344
* Fix bundler rubygems binstub not properly looking for bundler
https://github.com/rubygems/rubygems/pull/2426
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 10:20:47 +00:00