Commit graph

12164 commits

Author SHA1 Message Date
Hiroshi SHIBATA
42f368ead5
Surpressing additional message if it missed to detect gem name 2023-11-02 15:48:34 +09:00
Hiroshi SHIBATA
e10f7c9d5b
Fix to detect gem name logic. It's mistake to migrate bundled_gems.rb from rubygems_integration.rb
https://github.com/ioquatix/bake/pull/15#issuecomment-1777985097
2023-11-02 15:48:34 +09:00
Hiroshi SHIBATA
e34e8b93f8
Support Pathname object for warning feature of bundled gems 2023-11-02 13:32:53 +09:00
Kevin Newton
90b21b864d [prism] Updates for sync 2023-11-01 13:10:29 -04:00
Kevin Newton
493439c9ce [ruby/prism] Documentation for pm_strncasecmp
26934263b7
2023-11-01 13:10:29 -04:00
Kevin Newton
4490979615 [ruby/prism] Finish Ruby documentation
dfdcc98a3c
2023-11-01 13:10:29 -04:00
Kevin Newton
79034fbd50 [ruby/prism] More Ruby docs
ca9a660f52
2023-11-01 13:10:29 -04:00
Kevin Newton
953138698e [ruby/prism] Docs for node.rb and parse_result.rb
085da4feb9
2023-11-01 13:10:29 -04:00
Kevin Newton
f12617ec98 [ruby/prism] Fix up Prism and Debug docs
c2b7724d91
2023-11-01 13:10:29 -04:00
Jemma Issroff
e80ca70b9b [ruby/prism] Flip incorrect names of OptionalKeywordParameterNode and RequiredKeywordParameterNode
c31f61e898
2023-11-01 14:40:45 +00:00
Jemma Issroff
d0625099e0 [ruby/prism] Split KeywordParameterNode into Optional and Required
Prior to this commit, KeywordParameterNode included both optional
and required keywords. With this commit, it is split in two, with
`OptionalKeywordParameterNode`s no longer having a value field.

89084d9af4
2023-11-01 14:40:44 +00:00
Cody Cutrer
a1e24ab484 [rubygems/rubygems] avoid dependency on set
it was a performance improvement only, but it causes failures in
unrelated tests

b4149cb9bf
2023-11-01 02:29:56 +00:00
Cody Cutrer
836d9fe46b [rubygems/rubygems] Add Bundler::Plugin.loaded? helper
Useful if your plugin introduces new methods to the DSL, so that
Gemfiles can easily abort if the plugin hasn't loaded yet

b733055c6e
2023-11-01 02:29:56 +00:00
Cody Cutrer
b5d54fc159 [rubygems/rubygems] Only remove bundler plugin gem when it's inside the cache
8d51390ca4
2023-10-31 13:53:05 +00:00
Kevin Newton
b413760d66
[prism] Update prism to latest 2023-10-30 12:35:39 -04:00
Kevin Newton
7bf3d9343f [ruby/prism] parse_inline_comments -> parse_comments
bd4d248fd6
2023-10-30 15:53:37 +00:00
Christian van Rensen
14fa5e39d7 [ruby/net-http] fix no_proxy behaviour
f4951dc42a
2023-10-30 09:27:06 +00:00
Hiroshi SHIBATA
f757a5d3ce [ruby/yaml] Compatibility for Psych 4
b4b72ae0b4
2023-10-30 08:35:13 +00:00
tomoya ishida
db7a4be846 [ruby/irb] Easter egg for autocomplete mode
(https://github.com/ruby/irb/pull/737)

* Show easter-egg inside document dialog in autocomplete mode

* Show more easter_egg(dancing or logo) when Alt+d is pressed in autocomplete mode

a8e5cc7354
2023-10-28 14:47:46 +00:00
License Update
2714d7507a [rubygems/rubygems] Update SPDX license list as of 2023-10-05
e69a43ac9f
2023-10-27 22:14:37 +00:00
Kevin Newton
c201dbc0ad [ruby/prism] Prism.parse_inline_comments
5b72f84480
2023-10-27 18:09:14 +00:00
Vinicius Stock
7e4d2bb81d [ruby/prism] Move static annotations into _static files
9a6d735890
2023-10-27 13:45:53 +00:00
Vinicius Stock
544f64075b [ruby/prism] Add RBI and RBS templates for Prism
b62305ff3e

Co-authored-by: Stan Lo <st0012@users.noreply.github.com>
2023-10-27 13:45:52 +00:00
Kevin Newton
a40e2b8ee9 [ruby/prism] Fix parsing lone assoc splat within hash patterns
1da5e05672
2023-10-27 02:09:33 +00:00
Kevin Newton
21dc64534b [ruby/prism] Regenerate snapshots
160df9a687
2023-10-26 15:19:52 -04:00
Kevin Newton
d1bb858d47 [ruby/prism] Match existing Ruby prettyprint
6d8358c083
2023-10-26 15:19:43 -04:00
Kevin Newton
6241cfab74
[prism] handle locals consistently 2023-10-26 15:08:31 -04:00
Kevin Newton
018f0a9c5f [ruby/prism] Rename to lefts/rights
e6deed05a5
2023-10-26 14:59:13 -04:00
Kevin Newton
922f48f081 [ruby/prism] Remove RequiredDestructuredParameterNode in favor of MultiTargetNode
6d1858192e
2023-10-26 14:59:07 -04:00
Jemma Issroff
7e4ee92de2 [ruby/prism] Add KeywordSplat flag to ArgumentsNode
Method calls with keyword splat args compile differently than
without since they merge the keyword arg hash with the keyword splat
hash. We know this information at parse time, so can set a flag
which the compiler can use.

e5f8a9a3cd
2023-10-26 18:47:50 +00:00
Kevin Newton
51ea82a770 [ruby/prism] Expose options on match last line nodes
0284b38861
2023-10-26 13:58:40 +00:00
Kevin Newton
feb1427ad8 [ruby/prism] Compile with WASI
73c44b0b9c
2023-10-26 13:33:22 +00:00
Michael Chui
0164ce893f add #to_str to URI::Generic 2023-10-26 10:12:49 +09:00
Samuel Giddins
3fe2f2689f [rubygems/rubygems] Raise exception on unexpected EOF in marshal
Instead of NoMethodError being raised by accidentally trying to use nil

ac8f812bbf
2023-10-25 18:52:38 +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
Samuel Giddins
fa3cc4afcb [rubygems/rubygems] Set file path when eval-ing local specification in EndpointSpecification
Not strictly necessary, but there is no reason not to be helpful and set the path

894c0303dd
2023-10-25 17:24:06 +00:00
OKURA Masafumi
bf1362306e [Doc] Improve documentation of PP
* Remove mention to `require 'pp'` for `pretty_inspect`
* Mention the need to add `require 'pp'` to customize
  `#pretty_print(pp)` method
2023-10-25 16:49:09 +09:00
Hiroshi SHIBATA
c5861903ac [rubygems/rubygems] Handle CI configuration on ignore list for Gem::Specification#files
4bb0ef3e55
2023-10-25 00:46:09 +00:00
Hiroshi SHIBATA
5c4978c11c [rubygems/rubygems] Handle empty array
7c0afdd9af
2023-10-24 16:31:43 +00:00
dearblue
062d6050b0 [rubygems/rubygems] Ignore non-tar format .gem files during search
Previously, `rake install` or `rake update` would fail if there was a non-tar format `.gem` file in the current working directory.

f562788f1d
2023-10-23 19:52:22 +00:00
Mau Magnaguagno
f20e91fbf7 [ruby/prism] Avoid String#chars in DedentingHeredoc#to_a
Prefer String#[] directly.

916f991220
2023-10-23 14:56:18 +00:00
Hiroshi SHIBATA
8942c73e6a [rubygems/rubygems] Disabled Style/HashSyntax for keyword arguments
9b61b33568
2023-10-23 07:59:08 +00:00
David Rodríguez
e7d845b1d0
[rubygems/rubygems] Restore using old way of passing Ruby version to resolver
We used `Bundler::RubyVersion.system.gem_version` for a long time, but I
changed this to `Gem.ruby_version` at
94f9643943. It's unclear why I did that
though since I believe it was unrelated to the fix in there.

Bootboot patches `Bundler::RubyVersion` to customize how Bundler works
with Ruby versions, and that change broke that.

Since it's unclear to me how to achieve what Bootboot is doing with the
current code, and there was no strong reason for the change, let's
restore it for now.

8ec36c6017
2023-10-23 13:59:01 +09:00
Martin Emde
6dcd4e90d8
[rubygems/rubygems] Handle base64 encoded checksums in lockfile for future compatibility.
Save checksums using = as separator.

a36ad7d160
2023-10-23 13:59:01 +09:00
Martin Emde
c667de72ff
[rubygems/rubygems] Improve errors and register checksums reliably
Improve error reporting for checksums, raises a new error class.

Solve for multi-source checksum errors.

Add CHECKSUMS to tool/bundler/(dev|standard|rubocop)26_gems.rb

26ceee0e76

Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
2023-10-23 13:59:01 +09:00
Martin Emde
6362bfdc33
[rubygems/rubygems] rename Index#== to Index#subset?
a96a561087
2023-10-23 13:59:01 +09:00
Martin Emde
92f23a48e3
[rubygems/rubygems] Refactor Checksum classes and methods to reduce
code.
(https://github.com/rubygems/rubygems/pull/6917)

2238bdaadc
2023-10-23 13:59:01 +09:00
Samuel Giddins
c5fd94073f
[rubygems/rubygems] Refactor to checksums stored via source
This gets the specs passing, and handles the fact that we expect
checkums to be pinned only to a particular source

This also avoids reading in .gem files during lockfile generation,
instead allowing us to query the source for each resolved gem to grab
the checksum

Finally, this opens up a route to having user-stored checksum databases,
similar to how other package managers do this!

Add checksums to dev lockfiles

Handle full name conflicts from different original_platforms when adding checksums to store from compact index

Specs passing on Bundler 3

86c7084e1c
2023-10-23 13:59:01 +09:00
Mercedes Bernard
69d7e9a12e
[rubygems/rubygems] Use the server checksum, then calculate from gem on disk if possible
1. Use the checksum provided by the server if provided: provides security
knowing if the gem you downloaded matches the gem on the server

2. Calculate the checksum from the gem on disk: provides security knowing
if the gem has changed between installs

3. In some cases, neither is possible in which case we don't put anything
in the checksum and we maintain functionality as it is today

Add the checksums to specs in the index if we already have them

Prior to checksums, we didn't lose any information when overwriting specs
in the index with stubs. But now when we overwrite EndpointSpecifications
or RemoteSpecifications with more generic specs, we could lose checksum
info. This manually sets checksum info so we keep it in the index.

de00a4f153
2023-10-23 13:59:01 +09:00
Thong Kuah
ad08674d8d
[rubygems/rubygems] Add CHECKSUMS for each gem in lockfile
We lock the checksum for each resolved spec under a new CHECKSUMS
section in the lockfile.

If the locked spec does not resolve for the local platform, we preserve
the locked checksum, similar to how we preserve specs.

Checksum locking only makes sense on install. The compact index
information is only available then.

bde37ca6bf
2023-10-23 13:59:01 +09:00