summaryrefslogtreecommitdiff
path: root/lib/bundler/endpoint_specification.rb
AgeCommit message (Collapse)Author
2023-12-05[rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in onlyMartin Emde
Looks for the CHECKSUMS section in the lockfile, activating the feature only if the section exists. Without a CHECKSUMS section, Bundler will continue as normal, validating checksums when gems are installed while checksums from the compact index are present. https://github.com/rubygems/rubygems/commit/2353cc93a4
2023-10-25[rubygems/rubygems] Set file path when eval-ing local specification in ↵Samuel Giddins
EndpointSpecification Not strictly necessary, but there is no reason not to be helpful and set the path https://github.com/rubygems/rubygems/commit/894c0303dd
2023-10-23[rubygems/rubygems] Improve errors and register checksums reliablyMartin Emde
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 https://github.com/rubygems/rubygems/commit/26ceee0e76 Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
2023-10-23[rubygems/rubygems] Refactor Checksum classes and methods to reduceMartin Emde
code. (https://github.com/rubygems/rubygems/pull/6917) https://github.com/rubygems/rubygems/commit/2238bdaadc
2023-10-23[rubygems/rubygems] Refactor to checksums stored via sourceSamuel Giddins
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 https://github.com/rubygems/rubygems/commit/86c7084e1c
2023-10-23[rubygems/rubygems] Use the server checksum, then calculate from gem on disk ↵Mercedes Bernard
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. https://github.com/rubygems/rubygems/commit/de00a4f153
2023-10-23[rubygems/rubygems] Add CHECKSUMS for each gem in lockfileThong Kuah
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. https://github.com/rubygems/rubygems/commit/bde37ca6bf
2023-03-23Fix flaky when making materialized specs uniqDavid Rodríguez
Sometimes we'll have an heterogenous array of specs which include `Gem::Specification` objects, which don't define `#identifier`. Let's use `#full_name` consistently. Notes: Merged: https://github.com/ruby/ruby/pull/7582
2022-10-18Merge RubyGems/Bundler masterHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/6214d00b2315ed37c76b1fbc1c72f61f92ba5a65 Notes: Merged: https://github.com/ruby/ruby/pull/6578
2022-09-08Resync Bundler & RubyGemsDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/6330
2022-09-04Attempt to fix test-bundlerTakashi Kokubun
f7cf641469161c3770b58f79e08e312512212aa8 broke spec/bundler/install/gems/resolving_spec.rb:356. This line seems to impact that test, so I slightly modified the implementation for that spec's case.
2022-09-05[rubygems/rubygems] Fix resolution hanging on musl platformsDavid Rodríguez
After recent musl support was added, Bundler started hanging in musl platforms. I identified the issue where valid candidates were being filtered out because their platform was specified as a string, and thus `Gem::Platform.match_spec?` which under the hood ends up calling `Gem::Platform#===` would return `nil`, because it does not support comparing platforms to strings. In particular, `Bundler::EndpointSpecification`'s platform coming from the API was not instantiated as a `Gem::Platform`, hence the issue. Also, this spec surfaced another issue where a bug corrected in `Gem::Platform#match_platforms` had not been yet backported to Bundler. So this commit also backports that to get the spec green across RubyGems versions. Finally, the fix in `Bundler::EndpointSpecification` made a realworld spec start failing. This spec was faking out `rails-4.2.7.1` requirement on Bundler in the `Gemfile.lock` file to be `>= 1.17, < 3` when the real requirement is `>= 1.17, < 2`. Due to the bug in `Bundler::EndpointSpecification`, the real requirement provided by the compact index API (recorded with VCR) was being ignored, and the `Gemfile.lock` fake requirement was being used, which made the spec pass. This is all expected, and to fix the issue I changed the spec to be really realworld and don't fake any Bundler requirements. https://github.com/rubygems/rubygems/commit/faf4ef46bc
2022-08-23Merge rubygems/bundler HEADHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/6b3a5a9ab0453463381a8164efb6298ea9eb776f Notes: Merged: https://github.com/ruby/ruby/pull/6268
2022-08-23[rubygems/rubygems] Remove unnecessary mixin inclusionDavid Rodríguez
It's already included by the parent. https://github.com/rubygems/rubygems/commit/3ffe389c44 Notes: Merged: https://github.com/ruby/ruby/pull/6268
2022-04-28[rubygems/rubygems] Fix missing required rubygems version when using old APIsDavid Rodríguez
A while ago, we fixed resolution when using old dependency endpoints to also consider metadata dependencies, by requesting the full gemspec from the marsahaled index, which includes this information as opposed to these old APIs. This has made resolution slower, but correct, but also introduced the issue that some old marshaled gemspecs don't include the `required_rubygems_version` field because they were created with a RubyGems version that predates its addition. Use a default value in this case. https://github.com/rubygems/rubygems/commit/5dc94afcc0 Co-authored-by: Ilya Dudarenko <i.dudarenko@tinkoff.ru>
2022-01-19Merge rubygems/rubygems HEAD.Hiroshi SHIBATA
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a Notes: Merged: https://github.com/ruby/ruby/pull/5462
2021-08-31[rubygems/rubygems] Remove `syck` traces from `bundler`David Rodríguez
Same reason as in the previous commit. https://github.com/rubygems/rubygems/commit/f00a6c8516 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2020-10-15Merge bundler-2.2.0.rc.2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3659
2018-11-02Added bundler as default gems. Revisit [Feature #12733]hsbt
* bin/*, lib/bundler/*, lib/bundler.rb, spec/bundler, man/*: Merge from latest stable branch of bundler/bundler repository and added workaround patches. I will backport them into upstream. * common.mk, defs/gmake.mk: Added `test-bundler` task for test suite of bundler. * tool/sync_default_gems.rb: Added sync task for bundler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22Postponing the Bundler merge.hsbt
I faced a big issue about Bundler with ruby core. I have no time to resolve it issue before 2.5 final release. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-01Update bundled bundler to 1.16.0.hsbt
* lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-08Merge bundler to standard libraries.hsbt
rubygems 2.7.x depends bundler-1.15.x. This is preparation for rubygems and bundler migration. * lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4 * spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches. * https://github.com/bundler/bundler/pull/6007 * Exclude not working examples on ruby repository. * Fake ruby interpriter instead of installed ruby. * Makefile.in: Added test task named `test-bundler`. This task is only working macOS/linux yet. I'm going to support Windows environment later. * tool/sync_default_gems.rb: Added sync task for bundler. [Feature #12733][ruby-core:77172] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e