bundler 2.2.0.rc.2 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +84 -19
- data/bundler.gemspec +1 -1
- data/lib/bundler.rb +11 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli.rb +5 -5
- data/lib/bundler/cli/binstubs.rb +6 -2
- data/lib/bundler/cli/exec.rb +3 -3
- data/lib/bundler/cli/install.rb +14 -5
- data/lib/bundler/cli/outdated.rb +0 -2
- data/lib/bundler/cli/update.rb +1 -1
- data/lib/bundler/compact_index_client/cache.rb +5 -13
- data/lib/bundler/compact_index_client/gem_parser.rb +28 -0
- data/lib/bundler/compact_index_client/updater.rb +5 -5
- data/lib/bundler/definition.rb +23 -25
- data/lib/bundler/dependency.rb +3 -1
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/feature_flag.rb +0 -1
- data/lib/bundler/fetcher/index.rb +2 -3
- data/lib/bundler/friendly_errors.rb +15 -0
- data/lib/bundler/gem_helpers.rb +30 -24
- data/lib/bundler/index.rb +5 -1
- data/lib/bundler/injector.rb +9 -2
- data/lib/bundler/installer.rb +7 -5
- data/lib/bundler/lazy_specification.rb +20 -9
- data/lib/bundler/man/.document +1 -0
- data/{man → lib/bundler/man}/bundle-add.1 +1 -1
- data/{man → lib/bundler/man}/bundle-add.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-binstubs.1 +1 -1
- data/{man → lib/bundler/man}/bundle-binstubs.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-cache.1 +1 -1
- data/{man → lib/bundler/man}/bundle-cache.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-check.1 +1 -1
- data/{man → lib/bundler/man}/bundle-check.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-clean.1 +1 -1
- data/{man → lib/bundler/man}/bundle-clean.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-config.1 +2 -5
- data/{man → lib/bundler/man}/bundle-config.1.ronn +1 -9
- data/{man → lib/bundler/man}/bundle-doctor.1 +1 -1
- data/{man → lib/bundler/man}/bundle-doctor.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-exec.1 +1 -1
- data/{man → lib/bundler/man}/bundle-exec.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-gem.1 +1 -1
- data/{man → lib/bundler/man}/bundle-gem.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-info.1 +1 -1
- data/{man → lib/bundler/man}/bundle-info.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-init.1 +1 -1
- data/{man → lib/bundler/man}/bundle-init.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-inject.1 +1 -1
- data/{man → lib/bundler/man}/bundle-inject.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-install.1 +2 -2
- data/{man → lib/bundler/man}/bundle-install.1.ronn +1 -1
- data/{man → lib/bundler/man}/bundle-list.1 +1 -1
- data/{man → lib/bundler/man}/bundle-list.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-lock.1 +1 -1
- data/{man → lib/bundler/man}/bundle-lock.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-open.1 +1 -1
- data/{man → lib/bundler/man}/bundle-open.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-outdated.1 +1 -1
- data/{man → lib/bundler/man}/bundle-outdated.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-platform.1 +1 -1
- data/{man → lib/bundler/man}/bundle-platform.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-pristine.1 +1 -1
- data/{man → lib/bundler/man}/bundle-pristine.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-remove.1 +1 -1
- data/{man → lib/bundler/man}/bundle-remove.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-show.1 +1 -1
- data/{man → lib/bundler/man}/bundle-show.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-update.1 +1 -1
- data/{man → lib/bundler/man}/bundle-update.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle-viz.1 +1 -1
- data/{man → lib/bundler/man}/bundle-viz.1.ronn +0 -0
- data/{man → lib/bundler/man}/bundle.1 +1 -1
- data/{man → lib/bundler/man}/bundle.1.ronn +0 -0
- data/{man → lib/bundler/man}/gemfile.5 +1 -1
- data/{man → lib/bundler/man}/gemfile.5.ronn +0 -0
- data/lib/bundler/man/index.txt +25 -0
- data/lib/bundler/plugin/api/source.rb +1 -1
- data/lib/bundler/plugin/dsl.rb +1 -1
- data/lib/bundler/resolver.rb +25 -29
- data/lib/bundler/resolver/spec_group.rb +19 -25
- data/lib/bundler/rubygems_integration.rb +4 -6
- data/lib/bundler/settings.rb +0 -1
- data/lib/bundler/source/git/git_proxy.rb +28 -41
- data/lib/bundler/spec_set.rb +6 -8
- data/lib/bundler/stub_specification.rb +0 -2
- data/lib/bundler/templates/newgem/README.md.tt +0 -1
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +2 -2
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -0
- data/lib/bundler/uri_credentials_filter.rb +2 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +34 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +2 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +38 -40
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +12 -8
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +154 -0
- data/lib/bundler/vendored_tmpdir.rb +4 -0
- data/lib/bundler/version.rb +1 -1
- metadata +58 -54
- data/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb5e62df5ac6ec81289223672d91b6b7a1229fc348a7d7d3dba5a200e87293af
|
4
|
+
data.tar.gz: 8ef6f15e230d10fd4fce8918ffd0bbeff4df1d65e9921d46e0d246cc316fe79d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4da8e14312ce09705a4c23999a27d0cf268809ce6dbb01da190a3f93218fb68c98c21f5ef13ead345e2a46be89dacdc3c87c91e2369bc4b69e0f2a36efa8c6b4
|
7
|
+
data.tar.gz: f48e22dabd54c2a4e3b87b2644ace759777a2f949fcd47322534804272314b655435dbda1aadfcbb4f7a96e2b52b0ee3666595d8a56384e51720feb17ba28a53
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,78 @@
|
|
1
|
+
# 2.2.4 (December 31, 2020)
|
2
|
+
|
3
|
+
## Bug fixes:
|
4
|
+
|
5
|
+
- Fix bundle man pages display on truffleruby [#4209](https://github.com/rubygems/rubygems/pull/4209)
|
6
|
+
- Fix Windows + JRuby no longer being able to install git sources [#4196](https://github.com/rubygems/rubygems/pull/4196)
|
7
|
+
|
8
|
+
# 2.2.3 (December 22, 2020)
|
9
|
+
|
10
|
+
## Bug fixes:
|
11
|
+
|
12
|
+
- Restore full compatibility with previous lockfiles [#4179](https://github.com/rubygems/rubygems/pull/4179)
|
13
|
+
- Add all matching variants with the same platform specificity to the lockfile [#4180](https://github.com/rubygems/rubygems/pull/4180)
|
14
|
+
- Fix bundler installing gems for a different platform when running in frozen mode and current platform not in the lockfile [#4172](https://github.com/rubygems/rubygems/pull/4172)
|
15
|
+
- Fix crash when `bundle exec`'ing to bundler [#4175](https://github.com/rubygems/rubygems/pull/4175)
|
16
|
+
|
17
|
+
# 2.2.2 (December 17, 2020)
|
18
|
+
|
19
|
+
## Bug fixes:
|
20
|
+
|
21
|
+
- Fix resolver crash when a candidate has 0 matching platforms [#4163](https://github.com/rubygems/rubygems/pull/4163)
|
22
|
+
- Restore change to copy global with/without config locally upon `bundle install` [#4154](https://github.com/rubygems/rubygems/pull/4154)
|
23
|
+
|
24
|
+
# 2.2.1 (December 14, 2020)
|
25
|
+
|
26
|
+
## Bug fixes:
|
27
|
+
|
28
|
+
- Ad-hoc fix for platform regression [#4127](https://github.com/rubygems/rubygems/pull/4127)
|
29
|
+
- Workaround JRuby + Windows issue with net-http-persistent vendored code [#4138](https://github.com/rubygems/rubygems/pull/4138)
|
30
|
+
- Reset also root when in a nested invocation [#4140](https://github.com/rubygems/rubygems/pull/4140)
|
31
|
+
- Restore 2.1.4 resolution times [#4134](https://github.com/rubygems/rubygems/pull/4134)
|
32
|
+
- Fix `bundle outdated --strict` crash [#4133](https://github.com/rubygems/rubygems/pull/4133)
|
33
|
+
- Autoload `Bundler::RemoteSpecification` to workaround crash on jruby [#4114](https://github.com/rubygems/rubygems/pull/4114)
|
34
|
+
|
35
|
+
# 2.2.0 (December 7, 2020)
|
36
|
+
|
37
|
+
## Enhancements:
|
38
|
+
|
39
|
+
- New gem template: prefer `require_relative` to `require` [#4066](https://github.com/rubygems/rubygems/pull/4066)
|
40
|
+
- Always show underlying error when fetching specs fails [#4061](https://github.com/rubygems/rubygems/pull/4061)
|
41
|
+
- Add `--all-platforms` flag to `bundle binstubs` to generate binstubs for all platforms [#3886](https://github.com/rubygems/rubygems/pull/3886)
|
42
|
+
- Improve gem not found in source error messages [#4019](https://github.com/rubygems/rubygems/pull/4019)
|
43
|
+
- Revert resolving all Gemfile platforms automatically [#4052](https://github.com/rubygems/rubygems/pull/4052)
|
44
|
+
- Remove extra empty line from README template [#4041](https://github.com/rubygems/rubygems/pull/4041)
|
45
|
+
- Lazily load `erb` [#4011](https://github.com/rubygems/rubygems/pull/4011)
|
46
|
+
|
47
|
+
## Bug fixes:
|
48
|
+
|
49
|
+
- Fix `Bundler::Plugin::API::Source#to_s` having empty source type [#4084](https://github.com/rubygems/rubygems/pull/4084)
|
50
|
+
- Raise consistent errors with or without `bundle exec` [#4063](https://github.com/rubygems/rubygems/pull/4063)
|
51
|
+
- Fix edge case resulting in a crash when using `zeitwerk` inside a nested `bundle exec` invocation [#4062](https://github.com/rubygems/rubygems/pull/4062)
|
52
|
+
- Enable `specific_platform` by default [#4015](https://github.com/rubygems/rubygems/pull/4015)
|
53
|
+
- Prevent remove command from deleting gemfile lines that are comments [#4045](https://github.com/rubygems/rubygems/pull/4045)
|
54
|
+
- Fix issue with `cache_all_platforms` and `specific_platform` configured [#4042](https://github.com/rubygems/rubygems/pull/4042)
|
55
|
+
- Fix incorrect error message on Windows [#4039](https://github.com/rubygems/rubygems/pull/4039)
|
56
|
+
- Make printed drive letters consistent on Windows [#4038](https://github.com/rubygems/rubygems/pull/4038)
|
57
|
+
- Load rubygems plugins from RUBYLIB during `bundle install` and `bundle update` [#3534](https://github.com/rubygems/rubygems/pull/3534)
|
58
|
+
- Fix `specific_platform` and `cache_all` with `bundle cache --all-platforms` [#4022](https://github.com/rubygems/rubygems/pull/4022)
|
59
|
+
- Bring back the possibility to install a plugin from path [#4020](https://github.com/rubygems/rubygems/pull/4020)
|
60
|
+
- Move ronn pages to lib [#3997](https://github.com/rubygems/rubygems/pull/3997)
|
61
|
+
- Fix fileutils double load when using `bundler/inline` [#3991](https://github.com/rubygems/rubygems/pull/3991)
|
62
|
+
- Accept responses with no etag header [#3865](https://github.com/rubygems/rubygems/pull/3865)
|
63
|
+
|
64
|
+
## Documentation:
|
65
|
+
|
66
|
+
- Fix typo of `bundle-install.1` (v2.1) [#4079](https://github.com/rubygems/rubygems/pull/4079)
|
67
|
+
- Add commented out example and more information link to generated gemspec [#4034](https://github.com/rubygems/rubygems/pull/4034)
|
68
|
+
|
1
69
|
# 2.2.0.rc.2 (October 6, 2020)
|
2
70
|
|
3
|
-
##
|
71
|
+
## Features:
|
72
|
+
|
73
|
+
- Add `bundle fund` command [#3390](https://github.com/rubygems/rubygems/pull/3390)
|
74
|
+
|
75
|
+
## Enhancements:
|
4
76
|
|
5
77
|
- Fix ls-files matching regexp [#3845](https://github.com/rubygems/rubygems/pull/3845)
|
6
78
|
- Remove redundant `bundler/setup` require from `spec_helper.rb` generated by `bundle gem` [#3791](https://github.com/rubygems/rubygems/pull/3791)
|
@@ -33,10 +105,6 @@
|
|
33
105
|
|
34
106
|
- Deprecate `bundle cache --all` flag [#3932](https://github.com/rubygems/rubygems/pull/3932)
|
35
107
|
|
36
|
-
## Features:
|
37
|
-
|
38
|
-
- Add `bundle fund` command [#3390](https://github.com/rubygems/rubygems/pull/3390)
|
39
|
-
|
40
108
|
## Documentation:
|
41
109
|
|
42
110
|
- Correct grammar in Gemfile docs [#3990](https://github.com/rubygems/rubygems/pull/3990)
|
@@ -47,12 +115,12 @@
|
|
47
115
|
|
48
116
|
# 2.2.0.rc.1 (July 2, 2020)
|
49
117
|
|
50
|
-
##
|
118
|
+
## Features:
|
51
119
|
|
52
120
|
- Windows support. There's still gotchas and unimplemented features, but a Windows CI is now enforced.
|
53
121
|
- Full multiplatform support. Bundler should now seamlessly handle multiplatform `Gemfile` or `gems.rb` files.
|
54
122
|
|
55
|
-
##
|
123
|
+
## Enhancements:
|
56
124
|
|
57
125
|
- `bundle info` now includes gem metadata [#7376](https://github.com/rubygems/bundler/pull/7376)
|
58
126
|
- `bundle list --without-group` and `bundle list --only-group` now support space separated list of groups in addition to single groups [#7404](https://github.com/rubygems/bundler/pull/7404)
|
@@ -63,9 +131,6 @@
|
|
63
131
|
- Add `bundle plugin uninstall` [#3482](https://github.com/rubygems/rubygems/pull/3482)
|
64
132
|
- `bundle gem` now supports a `--ci` flag and a `gem.ci` configuration that adds CI config files for the main CI providers to the generated gem skeleton [#3667](https://github.com/rubygems/rubygems/pull/3667)
|
65
133
|
- Allow setting a tag prefix to be used by release tasks [#3766](https://github.com/rubygems/rubygems/pull/3766)
|
66
|
-
|
67
|
-
## Minor enhancements:
|
68
|
-
|
69
134
|
- `bundle outdated` now prints output in columns for better readability [#4474](https://github.com/rubygems/bundler/pull/4474)
|
70
135
|
- bundler's `release` rake task now prints a better message when not being logged in and trying to push a gem [#7513](https://github.com/rubygems/bundler/pull/7513)
|
71
136
|
- `BUNDLE_APP_CONFIG` environment variable is now documented [#7563](https://github.com/rubygems/bundler/pull/7563)
|
@@ -108,7 +173,7 @@
|
|
108
173
|
- Fix `bundle install` unintentionally copying `with` and `without` global config to local configuration [#3666](https://github.com/rubygems/rubygems/pull/3666). This PR also address the `BUNDLE_WITH` environment variable unintentionally being persisted to configuration in a similar way ([#3708](https://github.com/rubygems/rubygems/issues/3708))
|
109
174
|
- Fix race condition in `bundle install` that could "empty" exceptions to be raised [#3669](https://github.com/rubygems/rubygems/pull/3669)
|
110
175
|
- Fix `--no-cache` to `bundle install` being unintentionally deprecated [#3688](https://github.com/rubygems/rubygems/pull/3688)
|
111
|
-
- Avoid calling `LoadError#message` to fix performance regression in future ruby
|
176
|
+
- Avoid calling `LoadError#message` to fix performance regression in future ruby 3.0 [#3762](https://github.com/rubygems/rubygems/pull/3762)
|
112
177
|
|
113
178
|
# 2.1.4 (January 5, 2020)
|
114
179
|
|
@@ -158,7 +223,7 @@
|
|
158
223
|
- Restore previous `BUNDLE_GEMFILE` in `bundler/inline` [#7418](https://github.com/rubygems/bundler/pull/7418)
|
159
224
|
- Fix error when using `gem` DSL's `:glob` option for selecting gemspecs from a specific source [#7419](https://github.com/rubygems/bundler/pull/7419)
|
160
225
|
|
161
|
-
##
|
226
|
+
## Enhancements:
|
162
227
|
|
163
228
|
- `bundle config` no longer warns when using "old interface" (might be deprecated again in the future) [#7475](https://github.com/rubygems/bundler/pull/7475)
|
164
229
|
- `bundle update` no longer warns when used without arguments (might be deprecated again in the future) [#7475](https://github.com/rubygems/bundler/pull/7475)
|
@@ -287,7 +352,7 @@
|
|
287
352
|
|
288
353
|
# 2.0.2 (June 13, 2019)
|
289
354
|
|
290
|
-
##
|
355
|
+
## Enhancements:
|
291
356
|
|
292
357
|
- Fixes for Bundler integration with ruby-src ([#6941](https://github.com/rubygems/bundler/pull/6941), [#6973](https://github.com/bundler/bundler/pull/6973), [#6977](https://github.com/bundler/bundler/pull/6977), [#6315](https://github.com/bundler/bundler/pull/6315), [#7061](https://github.com/bundler/bundler/pull/7061))
|
293
358
|
- Use `__dir__` instead of `__FILE__` when generating a gem with `bundle gem` ([#6503](https://github.com/rubygems/bundler/pull/6503))
|
@@ -331,7 +396,7 @@
|
|
331
396
|
|
332
397
|
- Ruby 2.6 compatibility fixes (@segiddins)
|
333
398
|
|
334
|
-
##
|
399
|
+
## Enhancements:
|
335
400
|
|
336
401
|
- Import changes from Bundler 1.17.3 release
|
337
402
|
|
@@ -426,7 +491,7 @@ Changes
|
|
426
491
|
|
427
492
|
# 1.16.6 (October 5, 2018)
|
428
493
|
|
429
|
-
##
|
494
|
+
## Enhancements:
|
430
495
|
|
431
496
|
- Add an error message when adding a gem with `bundle add` that's already in the bundle ([#6341](https://github.com/rubygems/bundler/issues/6341), @agrim123)
|
432
497
|
- Add Homepage, Source Code and Changelog URI metadata fields to the `bundle gem` gemspec template (@walf443)
|
@@ -448,7 +513,7 @@ Changes
|
|
448
513
|
|
449
514
|
# 1.16.5 (September 18, 2018)
|
450
515
|
|
451
|
-
##
|
516
|
+
## Enhancements:
|
452
517
|
|
453
518
|
- Add support for TruffleRuby (@eregon)
|
454
519
|
|
@@ -464,7 +529,7 @@ Changes
|
|
464
529
|
|
465
530
|
# 1.16.4 (August 17, 2018)
|
466
531
|
|
467
|
-
##
|
532
|
+
## Enhancements:
|
468
533
|
|
469
534
|
- Welcome new members to the Bundler core team (@indirect)
|
470
535
|
- Don't mutate original error trees when determining version_conflict_message (@greysteil)
|
@@ -506,7 +571,7 @@ Changes
|
|
506
571
|
|
507
572
|
# 1.16.2 (April 20, 2018)
|
508
573
|
|
509
|
-
##
|
574
|
+
## Enhancements:
|
510
575
|
|
511
576
|
- Include the gem's source in the gem install error message when available (@papanikge)
|
512
577
|
- Remove unnecessary executable bit from gem template (@voxik)
|
@@ -1485,7 +1550,7 @@ Changes
|
|
1485
1550
|
- prefer gemspecs closest to the directory root ([#3428](https://github.com/rubygems/bundler/issues/3428), @segiddins)
|
1486
1551
|
- debug log for API request limits ([#3452](https://github.com/rubygems/bundler/issues/3452), @neerfri)
|
1487
1552
|
|
1488
|
-
##
|
1553
|
+
## Enhancements:
|
1489
1554
|
|
1490
1555
|
- Molinillo resolver, shared with CocoaPods (@segiddins)
|
1491
1556
|
- updated Thor to v0.19.1 (@segiddins)
|
data/bundler.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.required_ruby_version = ">= 2.3.0"
|
35
35
|
s.required_rubygems_version = ">= 2.5.2"
|
36
36
|
|
37
|
-
s.files = Dir.glob("{lib,
|
37
|
+
s.files = Dir.glob("{lib,exe}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
|
38
38
|
|
39
39
|
# Include the CHANGELOG.md, LICENSE.md, README.md manually
|
40
40
|
s.files += %w[CHANGELOG.md LICENSE.md README.md]
|
data/lib/bundler.rb
CHANGED
@@ -212,6 +212,12 @@ module Bundler
|
|
212
212
|
end
|
213
213
|
end
|
214
214
|
|
215
|
+
def most_specific_locked_platform?(platform)
|
216
|
+
return false unless defined?(@definition) && @definition
|
217
|
+
|
218
|
+
definition.most_specific_locked_platform == platform
|
219
|
+
end
|
220
|
+
|
215
221
|
def ruby_scope
|
216
222
|
"#{Bundler.rubygems.ruby_engine}/#{RbConfig::CONFIG["ruby_version"]}"
|
217
223
|
end
|
@@ -602,6 +608,11 @@ EOF
|
|
602
608
|
reset_rubygems!
|
603
609
|
end
|
604
610
|
|
611
|
+
def reset_settings_and_root!
|
612
|
+
@settings = nil
|
613
|
+
@root = nil
|
614
|
+
end
|
615
|
+
|
605
616
|
def reset_paths!
|
606
617
|
@bin_path = nil
|
607
618
|
@bundler_major_version = nil
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2020-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2020-12-31".freeze
|
8
|
+
@git_commit_sha = "529e536f28".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/lib/bundler/cli.rb
CHANGED
@@ -57,7 +57,7 @@ module Bundler
|
|
57
57
|
custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
|
58
58
|
if custom_gemfile && !custom_gemfile.empty?
|
59
59
|
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", File.expand_path(custom_gemfile)
|
60
|
-
Bundler.
|
60
|
+
Bundler.reset_settings_and_root!
|
61
61
|
end
|
62
62
|
|
63
63
|
Bundler.settings.set_command_option_if_given :retry, options[:retry]
|
@@ -122,9 +122,7 @@ module Bundler
|
|
122
122
|
else command = "bundle-#{cli}"
|
123
123
|
end
|
124
124
|
|
125
|
-
man_path = File.expand_path("
|
126
|
-
# man files are located under ruby's mandir with the default gems of bundler
|
127
|
-
man_path = RbConfig::CONFIG["mandir"] unless File.directory?(man_path)
|
125
|
+
man_path = File.expand_path("man", __dir__)
|
128
126
|
man_pages = Hash[Dir.glob(File.join(man_path, "**", "*")).grep(/.*\.\d*\Z/).collect do |f|
|
129
127
|
[File.basename(f, ".*"), f]
|
130
128
|
end]
|
@@ -134,7 +132,7 @@ module Bundler
|
|
134
132
|
if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+}
|
135
133
|
Kernel.exec "man #{man_page}"
|
136
134
|
else
|
137
|
-
puts File.read("#{
|
135
|
+
puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
|
138
136
|
end
|
139
137
|
elsif command_path = Bundler.which("bundler-#{cli}")
|
140
138
|
Kernel.exec(command_path, "--help")
|
@@ -380,6 +378,8 @@ module Bundler
|
|
380
378
|
"Make binstubs that can work without the Bundler runtime"
|
381
379
|
method_option "all", :type => :boolean, :banner =>
|
382
380
|
"Install binstubs for all gems"
|
381
|
+
method_option "all-platforms", :type => :boolean, :default => false, :banner =>
|
382
|
+
"Install binstubs for all platforms"
|
383
383
|
def binstubs(*gems)
|
384
384
|
require_relative "cli/binstubs"
|
385
385
|
Binstubs.new(options, gems).run
|
data/lib/bundler/cli/binstubs.rb
CHANGED
@@ -16,7 +16,11 @@ module Bundler
|
|
16
16
|
Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
|
17
17
|
installer = Installer.new(Bundler.root, Bundler.definition)
|
18
18
|
|
19
|
-
installer_opts = {
|
19
|
+
installer_opts = {
|
20
|
+
:force => options[:force],
|
21
|
+
:binstubs_cmd => true,
|
22
|
+
:all_platforms => options["all-platforms"],
|
23
|
+
}
|
20
24
|
|
21
25
|
if options[:all]
|
22
26
|
raise InvalidOption, "Cannot specify --all with specific gems" unless gems.empty?
|
@@ -38,7 +42,7 @@ module Bundler
|
|
38
42
|
if options[:standalone]
|
39
43
|
next Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") if gem_name == "bundler"
|
40
44
|
Bundler.settings.temporary(:path => (Bundler.settings[:path] || Bundler.root)) do
|
41
|
-
installer.generate_standalone_bundler_executable_stubs(spec)
|
45
|
+
installer.generate_standalone_bundler_executable_stubs(spec, installer_opts)
|
42
46
|
end
|
43
47
|
else
|
44
48
|
installer.generate_bundler_executable_stubs(spec, installer_opts)
|
data/lib/bundler/cli/exec.rb
CHANGED
@@ -63,10 +63,10 @@ module Bundler
|
|
63
63
|
Kernel.load(file)
|
64
64
|
rescue SystemExit, SignalException
|
65
65
|
raise
|
66
|
-
rescue Exception
|
66
|
+
rescue Exception # rubocop:disable Lint/RescueException
|
67
67
|
Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})"
|
68
|
-
|
69
|
-
|
68
|
+
Bundler::FriendlyErrors.disable!
|
69
|
+
raise
|
70
70
|
end
|
71
71
|
|
72
72
|
def process_title(file, args)
|
data/lib/bundler/cli/install.rb
CHANGED
@@ -152,18 +152,27 @@ module Bundler
|
|
152
152
|
|
153
153
|
check_for_group_conflicts_in_cli_options
|
154
154
|
|
155
|
+
Bundler.settings.set_command_option :with, nil if options[:with] == []
|
156
|
+
Bundler.settings.set_command_option :without, nil if options[:without] == []
|
157
|
+
|
155
158
|
with = options.fetch(:with, [])
|
156
159
|
with |= Bundler.settings[:with].map(&:to_s)
|
157
160
|
with -= options[:without] if options[:without]
|
158
|
-
with = nil if options[:with] == []
|
159
161
|
|
160
162
|
without = options.fetch(:without, [])
|
161
163
|
without |= Bundler.settings[:without].map(&:to_s)
|
162
164
|
without -= options[:with] if options[:with]
|
163
|
-
without = nil if options[:without] == []
|
164
165
|
|
165
|
-
|
166
|
-
|
166
|
+
options[:with] = with
|
167
|
+
options[:without] = without
|
168
|
+
|
169
|
+
unless Bundler.settings[:without] == options[:without] && Bundler.settings[:with] == options[:with]
|
170
|
+
# need to nil them out first to get around validation for backwards compatibility
|
171
|
+
Bundler.settings.set_command_option :without, nil
|
172
|
+
Bundler.settings.set_command_option :with, nil
|
173
|
+
Bundler.settings.set_command_option :without, options[:without] - options[:with]
|
174
|
+
Bundler.settings.set_command_option :with, options[:with]
|
175
|
+
end
|
167
176
|
end
|
168
177
|
|
169
178
|
def normalize_settings
|
@@ -190,7 +199,7 @@ module Bundler
|
|
190
199
|
|
191
200
|
Bundler.settings.set_command_option_if_given :clean, options["clean"]
|
192
201
|
|
193
|
-
normalize_groups
|
202
|
+
normalize_groups
|
194
203
|
|
195
204
|
options[:force] = options[:redownload]
|
196
205
|
end
|
data/lib/bundler/cli/outdated.rb
CHANGED
data/lib/bundler/cli/update.rb
CHANGED
@@ -82,7 +82,7 @@ module Bundler
|
|
82
82
|
locked_spec = locked_info[:spec]
|
83
83
|
new_spec = Bundler.definition.specs[name].first
|
84
84
|
unless new_spec
|
85
|
-
|
85
|
+
unless locked_spec.match_platform(Bundler.local_platform)
|
86
86
|
Bundler.ui.warn "Bundler attempted to update #{name} but it was not considered because it is for a different platform from the current one"
|
87
87
|
end
|
88
88
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "gem_parser"
|
4
|
+
|
3
5
|
module Bundler
|
4
6
|
class CompactIndexClient
|
5
7
|
class Cache
|
@@ -92,19 +94,9 @@ module Bundler
|
|
92
94
|
header ? lines[header + 1..-1] : lines
|
93
95
|
end
|
94
96
|
|
95
|
-
def parse_gem(
|
96
|
-
|
97
|
-
|
98
|
-
dependencies, requirements = rest.split("|", 2).map {|s| s.split(",") } if rest
|
99
|
-
dependencies = dependencies ? dependencies.map {|d| parse_dependency(d) } : []
|
100
|
-
requirements = requirements ? requirements.map {|r| parse_dependency(r) } : []
|
101
|
-
[version, platform, dependencies, requirements]
|
102
|
-
end
|
103
|
-
|
104
|
-
def parse_dependency(string)
|
105
|
-
dependency = string.split(":")
|
106
|
-
dependency[-1] = dependency[-1].split("&") if dependency.size > 1
|
107
|
-
dependency
|
97
|
+
def parse_gem(line)
|
98
|
+
@dependency_parser ||= GemParser.new
|
99
|
+
@dependency_parser.parse(line)
|
108
100
|
end
|
109
101
|
|
110
102
|
def info_roots
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class CompactIndexClient
|
5
|
+
if defined?(Gem::Resolver::APISet::GemParser)
|
6
|
+
GemParser = Gem::Resolver::APISet::GemParser
|
7
|
+
else
|
8
|
+
class GemParser
|
9
|
+
def parse(line)
|
10
|
+
version_and_platform, rest = line.split(" ", 2)
|
11
|
+
version, platform = version_and_platform.split("-", 2)
|
12
|
+
dependencies, requirements = rest.split("|", 2).map {|s| s.split(",") } if rest
|
13
|
+
dependencies = dependencies ? dependencies.map {|d| parse_dependency(d) } : []
|
14
|
+
requirements = requirements ? requirements.map {|d| parse_dependency(d) } : []
|
15
|
+
[version, platform, dependencies, requirements]
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def parse_dependency(string)
|
21
|
+
dependency = string.split(":")
|
22
|
+
dependency[-1] = dependency[-1].split("&") if dependency.size > 1
|
23
|
+
dependency
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -22,13 +22,13 @@ module Bundler
|
|
22
22
|
|
23
23
|
def initialize(fetcher)
|
24
24
|
@fetcher = fetcher
|
25
|
-
|
25
|
+
require_relative "../vendored_tmpdir"
|
26
26
|
end
|
27
27
|
|
28
28
|
def update(local_path, remote_path, retrying = nil)
|
29
29
|
headers = {}
|
30
30
|
|
31
|
-
Dir.mktmpdir("bundler-compact-index-") do |local_temp_dir|
|
31
|
+
Bundler::Dir.mktmpdir("bundler-compact-index-") do |local_temp_dir|
|
32
32
|
local_temp_path = Pathname.new(local_temp_dir).join(local_path.basename)
|
33
33
|
|
34
34
|
# first try to fetch any new bytes on the existing file
|
@@ -66,8 +66,8 @@ module Bundler
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
|
70
|
-
if etag_for(local_temp_path) ==
|
69
|
+
etag = (response["ETag"] || "").gsub(%r{\AW/}, "")
|
70
|
+
if etag.length.zero? || etag_for(local_temp_path) == etag
|
71
71
|
SharedHelpers.filesystem_access(local_path) do
|
72
72
|
FileUtils.mv(local_temp_path, local_path)
|
73
73
|
end
|
@@ -75,7 +75,7 @@ module Bundler
|
|
75
75
|
end
|
76
76
|
|
77
77
|
if retrying
|
78
|
-
raise MisMatchedChecksumError.new(remote_path,
|
78
|
+
raise MisMatchedChecksumError.new(remote_path, etag, etag_for(local_temp_path))
|
79
79
|
end
|
80
80
|
|
81
81
|
update(local_path, remote_path, :retrying)
|