bundler 2.6.2 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +91 -0
- data/README.md +2 -2
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/checksum.rb +1 -1
- data/lib/bundler/cli/console.rb +8 -6
- data/lib/bundler/cli/doctor.rb +23 -19
- data/lib/bundler/cli/info.rb +4 -4
- data/lib/bundler/cli/inject.rb +2 -2
- data/lib/bundler/cli/issue.rb +1 -1
- data/lib/bundler/cli/lock.rb +2 -1
- data/lib/bundler/cli/outdated.rb +6 -4
- data/lib/bundler/cli/show.rb +1 -1
- data/lib/bundler/compact_index_client/updater.rb +2 -1
- data/lib/bundler/current_ruby.rb +23 -33
- data/lib/bundler/definition.rb +125 -112
- data/lib/bundler/dependency.rb +92 -47
- data/lib/bundler/dsl.rb +83 -78
- data/lib/bundler/endpoint_specification.rb +10 -3
- data/lib/bundler/errors.rb +22 -0
- data/lib/bundler/feature_flag.rb +2 -6
- data/lib/bundler/gem_helpers.rb +4 -10
- data/lib/bundler/gem_version_promoter.rb +0 -2
- data/lib/bundler/injector.rb +9 -9
- data/lib/bundler/installer.rb +16 -2
- data/lib/bundler/lazy_specification.rb +50 -45
- data/lib/bundler/man/bundle-add.1 +3 -3
- data/lib/bundler/man/bundle-binstubs.1 +3 -3
- data/lib/bundler/man/bundle-cache.1 +3 -3
- data/lib/bundler/man/bundle-check.1 +3 -3
- data/lib/bundler/man/bundle-clean.1 +3 -3
- data/lib/bundler/man/bundle-config.1 +8 -8
- data/lib/bundler/man/bundle-config.1.ronn +9 -4
- data/lib/bundler/man/bundle-console.1 +3 -3
- data/lib/bundler/man/bundle-doctor.1 +3 -3
- data/lib/bundler/man/bundle-env.1 +3 -3
- data/lib/bundler/man/bundle-exec.1 +5 -5
- data/lib/bundler/man/bundle-exec.1.ronn +2 -2
- data/lib/bundler/man/bundle-fund.1 +3 -3
- data/lib/bundler/man/bundle-gem.1 +3 -3
- data/lib/bundler/man/bundle-help.1 +3 -3
- data/lib/bundler/man/bundle-info.1 +3 -3
- data/lib/bundler/man/bundle-init.1 +3 -3
- data/lib/bundler/man/bundle-inject.1 +3 -3
- data/lib/bundler/man/bundle-install.1 +3 -3
- data/lib/bundler/man/bundle-issue.1 +3 -3
- data/lib/bundler/man/bundle-licenses.1 +3 -3
- data/lib/bundler/man/bundle-list.1 +3 -3
- data/lib/bundler/man/bundle-lock.1 +3 -3
- data/lib/bundler/man/bundle-open.1 +3 -3
- data/lib/bundler/man/bundle-outdated.1 +3 -3
- data/lib/bundler/man/bundle-platform.1 +3 -3
- data/lib/bundler/man/bundle-plugin.1 +3 -3
- data/lib/bundler/man/bundle-pristine.1 +3 -3
- data/lib/bundler/man/bundle-remove.1 +3 -3
- data/lib/bundler/man/bundle-show.1 +3 -3
- data/lib/bundler/man/bundle-update.1 +3 -3
- data/lib/bundler/man/bundle-version.1 +3 -3
- data/lib/bundler/man/bundle-viz.1 +3 -3
- data/lib/bundler/man/bundle.1 +3 -3
- data/lib/bundler/man/gemfile.5 +3 -3
- data/lib/bundler/match_metadata.rb +13 -0
- data/lib/bundler/plugin/index.rb +5 -1
- data/lib/bundler/resolver/base.rb +2 -1
- data/lib/bundler/resolver/candidate.rb +11 -8
- data/lib/bundler/resolver/package.rb +8 -4
- data/lib/bundler/resolver/spec_group.rb +1 -25
- data/lib/bundler/resolver.rb +14 -4
- data/lib/bundler/ruby_dsl.rb +12 -3
- data/lib/bundler/rubygems_ext.rb +82 -81
- data/lib/bundler/rubygems_integration.rb +2 -15
- data/lib/bundler/runtime.rb +19 -24
- data/lib/bundler/shared_helpers.rb +4 -0
- data/lib/bundler/source/git/git_proxy.rb +6 -0
- data/lib/bundler/source/git.rb +6 -1
- data/lib/bundler/source/rubygems/remote.rb +11 -3
- data/lib/bundler/source/rubygems.rb +19 -4
- data/lib/bundler/source.rb +2 -0
- data/lib/bundler/source_list.rb +4 -0
- data/lib/bundler/spec_set.rb +66 -29
- data/lib/bundler/templates/newgem/Gemfile.tt +1 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +7 -3
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +12 -11
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +6 -6
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +10 -30
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04be45da6f2c0f4d36af4bbed990919e3fafcba6d1ae0f29adff18b814bbd343
|
4
|
+
data.tar.gz: 4b2dc4d27575de59e07cfe3cbb397248c60288b0da5a3f857ef5f2ad738b46b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1f8470b8caa25f59bdef6c9a62b938292b6e8dc2a1799c93971f931e774aee8c766dc503007900dbd8e743a6396dad8803ea92f6d47261fb82748d46705d865
|
7
|
+
data.tar.gz: 50c0f2dabb906fe79566eea2024f1c346469026ae57936cc1c0c4d4bbaeab0321e0261c82128ad2c36985f998dbc0db21f1311c4bef2fb097ecd24d641136450
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,94 @@
|
|
1
|
+
# 2.6.6 (March 13, 2025)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Fix `ENAMETOOLONG` error when creating compact index cache [#5578](https://github.com/rubygems/rubygems/pull/5578)
|
6
|
+
- Use shorthand hash syntax for bundle add [#8547](https://github.com/rubygems/rubygems/pull/8547)
|
7
|
+
- Update vendored uri to 1.0.3 [#8534](https://github.com/rubygems/rubygems/pull/8534)
|
8
|
+
- Retry gracefully on blank partial response in compact index [#8524](https://github.com/rubygems/rubygems/pull/8524)
|
9
|
+
- Give a better error when trying to write the lock file on a read-only filesystem [#5920](https://github.com/rubygems/rubygems/pull/5920)
|
10
|
+
- Improve log messages when lockfile platforms are added [#8523](https://github.com/rubygems/rubygems/pull/8523)
|
11
|
+
- Allow noop `bundle install` to work on read-only or protected folders [#8519](https://github.com/rubygems/rubygems/pull/8519)
|
12
|
+
|
13
|
+
## Bug fixes:
|
14
|
+
|
15
|
+
- Detect partial gem installs from a git source so that they are reinstalled on a successive run [#8539](https://github.com/rubygems/rubygems/pull/8539)
|
16
|
+
- Modify `bundle doctor` to not report issue when files aren't writable [#8520](https://github.com/rubygems/rubygems/pull/8520)
|
17
|
+
|
18
|
+
## Performance:
|
19
|
+
|
20
|
+
- Optimize resolution by removing an array allocation from `Candidate#<=>` [#8559](https://github.com/rubygems/rubygems/pull/8559)
|
21
|
+
|
22
|
+
## Documentation:
|
23
|
+
|
24
|
+
- Update docs for with/without consistency [#8555](https://github.com/rubygems/rubygems/pull/8555)
|
25
|
+
- Recommend non-deprecated methods in `bundle exec` documentation [#8537](https://github.com/rubygems/rubygems/pull/8537)
|
26
|
+
- Hint about default group when using `only` configuration option [#8536](https://github.com/rubygems/rubygems/pull/8536)
|
27
|
+
|
28
|
+
# 2.6.5 (February 20, 2025)
|
29
|
+
|
30
|
+
## Enhancements:
|
31
|
+
|
32
|
+
- Fix lockfile platforms inconveniently added on JRuby [#8494](https://github.com/rubygems/rubygems/pull/8494)
|
33
|
+
|
34
|
+
## Bug fixes:
|
35
|
+
|
36
|
+
- Fix resolver issue due to ill-defined version ranges being created [#8503](https://github.com/rubygems/rubygems/pull/8503)
|
37
|
+
- Make sure empty gems are not reinstalled every time [#8502](https://github.com/rubygems/rubygems/pull/8502)
|
38
|
+
|
39
|
+
# 2.6.4 (February 17, 2025)
|
40
|
+
|
41
|
+
## Enhancements:
|
42
|
+
|
43
|
+
- Make Bundler never instantiate development dependencies [#8486](https://github.com/rubygems/rubygems/pull/8486)
|
44
|
+
- Fix some invalid options to `gem` DSL not getting reported as invalid [#8480](https://github.com/rubygems/rubygems/pull/8480)
|
45
|
+
- Add `irb` to a Gemfile for a newly created gem [#8467](https://github.com/rubygems/rubygems/pull/8467)
|
46
|
+
- Auto-heal empty installation directory [#8457](https://github.com/rubygems/rubygems/pull/8457)
|
47
|
+
- Fix `bundle console` unnecessarily trying to load IRB twice [#8443](https://github.com/rubygems/rubygems/pull/8443)
|
48
|
+
- Add ruby_34 and ruby_35 as valid platform: [#8430](https://github.com/rubygems/rubygems/pull/8430)
|
49
|
+
- Consider gems under `platform: :windows` filter in Gemfile when running on Windows with ARM architecture [#8428](https://github.com/rubygems/rubygems/pull/8428)
|
50
|
+
|
51
|
+
## Bug fixes:
|
52
|
+
|
53
|
+
- Fix regression when running `bundle update <foo>` would sometimes downgrade a top level dependency [#8491](https://github.com/rubygems/rubygems/pull/8491)
|
54
|
+
- Fix dependency locking when Bundler finds incorrect lockfile dependencies [#8489](https://github.com/rubygems/rubygems/pull/8489)
|
55
|
+
- Raise error when lockfile is missing deps in frozen mode [#8483](https://github.com/rubygems/rubygems/pull/8483)
|
56
|
+
- Fix `bundle install --prefer-local` sometimes installing very old versions [#8484](https://github.com/rubygems/rubygems/pull/8484)
|
57
|
+
- Fix incorrect error message when running `bundle update` in frozen mode [#8481](https://github.com/rubygems/rubygems/pull/8481)
|
58
|
+
- Keep platform variants in `vendor/cache` even if incompatible with the current Ruby version [#8471](https://github.com/rubygems/rubygems/pull/8471)
|
59
|
+
- Fix `bundle console` printing bug report template incorrectly [#8436](https://github.com/rubygems/rubygems/pull/8436)
|
60
|
+
- Fix `--prefer-local` not respecting default gems [#8412](https://github.com/rubygems/rubygems/pull/8412)
|
61
|
+
|
62
|
+
## Performance:
|
63
|
+
|
64
|
+
- Improve resolution performance [#8458](https://github.com/rubygems/rubygems/pull/8458)
|
65
|
+
|
66
|
+
## Documentation:
|
67
|
+
|
68
|
+
- Fix more broken links [#8416](https://github.com/rubygems/rubygems/pull/8416)
|
69
|
+
|
70
|
+
# 2.6.3 (January 16, 2025)
|
71
|
+
|
72
|
+
## Enhancements:
|
73
|
+
|
74
|
+
- Don't fallback to evaluating YAML gemspecs as Ruby code [#8404](https://github.com/rubygems/rubygems/pull/8404)
|
75
|
+
- Print message when blocking on file locks [#8299](https://github.com/rubygems/rubygems/pull/8299)
|
76
|
+
- Add support for mise version manager file [#8356](https://github.com/rubygems/rubygems/pull/8356)
|
77
|
+
- Add Ruby 3.5 to Gemfile DSL platform values [#8365](https://github.com/rubygems/rubygems/pull/8365)
|
78
|
+
|
79
|
+
## Bug fixes:
|
80
|
+
|
81
|
+
- Revert RubyGems plugins getting loaded on `Bundler.require` [#8410](https://github.com/rubygems/rubygems/pull/8410)
|
82
|
+
- Fix platform specific gems sometimes being removed from the lockfile [#8401](https://github.com/rubygems/rubygems/pull/8401)
|
83
|
+
- Serialize gemspec when caching git source [#8403](https://github.com/rubygems/rubygems/pull/8403)
|
84
|
+
- Fix crash on read-only filesystems in Ruby 3.4 [#8372](https://github.com/rubygems/rubygems/pull/8372)
|
85
|
+
- Fix `bundle outdated <GEM>` failing if not all gems are installed [#8361](https://github.com/rubygems/rubygems/pull/8361)
|
86
|
+
- Fix `bundle install` crash on Windows [#8362](https://github.com/rubygems/rubygems/pull/8362)
|
87
|
+
|
88
|
+
## Documentation:
|
89
|
+
|
90
|
+
- Fix broken links in the documents [#8389](https://github.com/rubygems/rubygems/pull/8389)
|
91
|
+
|
1
92
|
# 2.6.2 (December 23, 2024)
|
2
93
|
|
3
94
|
## Bug fixes:
|
data/README.md
CHANGED
@@ -29,7 +29,7 @@ See [bundler.io](https://bundler.io) for the full documentation.
|
|
29
29
|
|
30
30
|
### Troubleshooting
|
31
31
|
|
32
|
-
For help with common problems, see [TROUBLESHOOTING](doc/TROUBLESHOOTING.md).
|
32
|
+
For help with common problems, see [TROUBLESHOOTING](../doc/bundler/TROUBLESHOOTING.md).
|
33
33
|
|
34
34
|
Still stuck? Try [filing an issue](https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md).
|
35
35
|
|
@@ -41,7 +41,7 @@ To get in touch with the Bundler core team and other Bundler users, please join
|
|
41
41
|
|
42
42
|
### Contributing
|
43
43
|
|
44
|
-
If you'd like to contribute to Bundler, that's awesome, and we <3 you. We've put together [the Bundler contributor guide](https://github.com/rubygems/rubygems/blob/master/bundler/
|
44
|
+
If you'd like to contribute to Bundler, that's awesome, and we <3 you. We've put together [the Bundler contributor guide](https://github.com/rubygems/rubygems/blob/master/doc/bundler/contributing/README.md) with all of the information you need to get started.
|
45
45
|
|
46
46
|
If you'd like to request a substantial change to Bundler or its documentation, refer to the [Bundler RFC process](https://github.com/rubygems/rfcs) for more information.
|
47
47
|
|
@@ -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 = "
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2025-03-13".freeze
|
8
|
+
@git_commit_sha = "25cf0763954".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/lib/bundler/checksum.rb
CHANGED
data/lib/bundler/cli/console.rb
CHANGED
@@ -20,9 +20,14 @@ module Bundler
|
|
20
20
|
require name
|
21
21
|
get_constant(name)
|
22
22
|
rescue LoadError
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
if name == "irb"
|
24
|
+
Bundler.ui.error "#{name} is not available"
|
25
|
+
exit 1
|
26
|
+
else
|
27
|
+
Bundler.ui.error "Couldn't load console #{name}, falling back to irb"
|
28
|
+
name = "irb"
|
29
|
+
retry
|
30
|
+
end
|
26
31
|
end
|
27
32
|
|
28
33
|
def get_constant(name)
|
@@ -32,9 +37,6 @@ module Bundler
|
|
32
37
|
"irb" => :IRB,
|
33
38
|
}[name]
|
34
39
|
Object.const_get(const_name)
|
35
|
-
rescue NameError
|
36
|
-
Bundler.ui.error "Could not find constant #{const_name}"
|
37
|
-
exit 1
|
38
40
|
end
|
39
41
|
end
|
40
42
|
end
|
data/lib/bundler/cli/doctor.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "rbconfig"
|
4
4
|
require "shellwords"
|
5
|
-
require "fiddle"
|
6
5
|
|
7
6
|
module Bundler
|
8
7
|
class CLI::Doctor
|
@@ -57,6 +56,14 @@ module Bundler
|
|
57
56
|
Dir.glob("#{spec.full_gem_path}/**/*.bundle")
|
58
57
|
end
|
59
58
|
|
59
|
+
def lookup_with_fiddle(path)
|
60
|
+
require "fiddle"
|
61
|
+
Fiddle.dlopen(path)
|
62
|
+
false
|
63
|
+
rescue Fiddle::DLError
|
64
|
+
true
|
65
|
+
end
|
66
|
+
|
60
67
|
def check!
|
61
68
|
require_relative "check"
|
62
69
|
Bundler::CLI::Check.new({}).run
|
@@ -73,10 +80,7 @@ module Bundler
|
|
73
80
|
definition.specs.each do |spec|
|
74
81
|
bundles_for_gem(spec).each do |bundle|
|
75
82
|
bad_paths = dylibs(bundle).select do |f|
|
76
|
-
|
77
|
-
false
|
78
|
-
rescue Fiddle::DLError
|
79
|
-
true
|
83
|
+
lookup_with_fiddle(f)
|
80
84
|
end
|
81
85
|
if bad_paths.any?
|
82
86
|
broken_links[spec] ||= []
|
@@ -95,7 +99,7 @@ module Bundler
|
|
95
99
|
end
|
96
100
|
end.sort.each {|m| message += m }
|
97
101
|
raise ProductionError, message
|
98
|
-
elsif
|
102
|
+
elsif permissions_valid
|
99
103
|
Bundler.ui.info "No issues found with the installed bundle"
|
100
104
|
end
|
101
105
|
end
|
@@ -104,21 +108,21 @@ module Bundler
|
|
104
108
|
|
105
109
|
def check_home_permissions
|
106
110
|
require "find"
|
107
|
-
|
108
|
-
|
109
|
-
|
111
|
+
files_not_readable = []
|
112
|
+
files_not_readable_and_owned_by_different_user = []
|
113
|
+
files_not_owned_by_current_user_but_still_readable = []
|
110
114
|
broken_symlinks = []
|
111
115
|
Find.find(Bundler.bundle_path.to_s).each do |f|
|
112
116
|
if !File.exist?(f)
|
113
117
|
broken_symlinks << f
|
114
|
-
elsif !File.
|
118
|
+
elsif !File.readable?(f)
|
115
119
|
if File.stat(f).uid != Process.uid
|
116
|
-
|
120
|
+
files_not_readable_and_owned_by_different_user << f
|
117
121
|
else
|
118
|
-
|
122
|
+
files_not_readable << f
|
119
123
|
end
|
120
124
|
elsif File.stat(f).uid != Process.uid
|
121
|
-
|
125
|
+
files_not_owned_by_current_user_but_still_readable << f
|
122
126
|
end
|
123
127
|
end
|
124
128
|
|
@@ -130,23 +134,23 @@ module Bundler
|
|
130
134
|
ok = false
|
131
135
|
end
|
132
136
|
|
133
|
-
if
|
137
|
+
if files_not_owned_by_current_user_but_still_readable.any?
|
134
138
|
Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
|
135
|
-
"user, but are still readable
|
139
|
+
"user, but are still readable. These files are:\n - #{files_not_owned_by_current_user_but_still_readable.join("\n - ")}"
|
136
140
|
|
137
141
|
ok = false
|
138
142
|
end
|
139
143
|
|
140
|
-
if
|
144
|
+
if files_not_readable_and_owned_by_different_user.any?
|
141
145
|
Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
|
142
|
-
"user, and are not readable
|
146
|
+
"user, and are not readable. These files are:\n - #{files_not_readable_and_owned_by_different_user.join("\n - ")}"
|
143
147
|
|
144
148
|
ok = false
|
145
149
|
end
|
146
150
|
|
147
|
-
if
|
151
|
+
if files_not_readable.any?
|
148
152
|
Bundler.ui.warn "Files exist in the Bundler home that are not " \
|
149
|
-
"readable
|
153
|
+
"readable by the current user. These files are:\n - #{files_not_readable.join("\n - ")}"
|
150
154
|
|
151
155
|
ok = false
|
152
156
|
end
|
data/lib/bundler/cli/info.rb
CHANGED
@@ -39,8 +39,8 @@ module Bundler
|
|
39
39
|
path = File.expand_path("../../..", __dir__)
|
40
40
|
else
|
41
41
|
path = spec.full_gem_path
|
42
|
-
if spec.
|
43
|
-
return Bundler.ui.warn "The gem #{name}
|
42
|
+
if spec.installation_missing?
|
43
|
+
return Bundler.ui.warn "The gem #{name} is missing. It should be installed at #{path}, but was not found"
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
@@ -65,8 +65,8 @@ module Bundler
|
|
65
65
|
gem_info << "\tDefault Gem: yes\n" if spec.respond_to?(:default_gem?) && spec.default_gem?
|
66
66
|
gem_info << "\tReverse Dependencies: \n\t\t#{gem_dependencies.join("\n\t\t")}" if gem_dependencies.any?
|
67
67
|
|
68
|
-
if name != "bundler" && spec.
|
69
|
-
return Bundler.ui.warn "The gem #{name}
|
68
|
+
if name != "bundler" && spec.installation_missing?
|
69
|
+
return Bundler.ui.warn "The gem #{name} is missing. Gemspec information is still available though:\n#{gem_info}"
|
70
70
|
end
|
71
71
|
|
72
72
|
Bundler.ui.info gem_info
|
data/lib/bundler/cli/inject.rb
CHANGED
@@ -35,8 +35,8 @@ module Bundler
|
|
35
35
|
Bundler.ui.confirm(added.map do |d|
|
36
36
|
name = "'#{d.name}'"
|
37
37
|
requirement = ", '#{d.requirement}'"
|
38
|
-
group = ", :
|
39
|
-
source = ", :
|
38
|
+
group = ", group: #{d.groups.inspect}" if d.groups != Array(:default)
|
39
|
+
source = ", source: '#{d.source}'" unless d.source.nil?
|
40
40
|
%(gem #{name}#{requirement}#{group}#{source})
|
41
41
|
end.join("\n"))
|
42
42
|
else
|
data/lib/bundler/cli/issue.rb
CHANGED
@@ -10,7 +10,7 @@ module Bundler
|
|
10
10
|
be sure to check out these resources:
|
11
11
|
|
12
12
|
1. Check out our troubleshooting guide for quick fixes to common issues:
|
13
|
-
https://github.com/rubygems/rubygems/blob/master/bundler/
|
13
|
+
https://github.com/rubygems/rubygems/blob/master/doc/bundler/TROUBLESHOOTING.md
|
14
14
|
|
15
15
|
2. Instructions for common Bundler uses can be found on the documentation
|
16
16
|
site: https://bundler.io/
|
data/lib/bundler/cli/lock.rb
CHANGED
@@ -44,7 +44,8 @@ module Bundler
|
|
44
44
|
|
45
45
|
Bundler::CLI::Common.configure_gem_version_promoter(definition, options) if options[:update]
|
46
46
|
|
47
|
-
options["remove-platform"].each do |
|
47
|
+
options["remove-platform"].each do |platform_string|
|
48
|
+
platform = Gem::Platform.new(platform_string)
|
48
49
|
definition.remove_platform(platform)
|
49
50
|
end
|
50
51
|
|
data/lib/bundler/cli/outdated.rb
CHANGED
@@ -26,13 +26,15 @@ module Bundler
|
|
26
26
|
def run
|
27
27
|
check_for_deployment_mode!
|
28
28
|
|
29
|
-
gems.each do |gem_name|
|
30
|
-
Bundler::CLI::Common.select_spec(gem_name)
|
31
|
-
end
|
32
|
-
|
33
29
|
Bundler.definition.validate_runtime!
|
34
30
|
current_specs = Bundler.ui.silence { Bundler.definition.resolve }
|
35
31
|
|
32
|
+
gems.each do |gem_name|
|
33
|
+
if current_specs[gem_name].empty?
|
34
|
+
raise GemNotFound, "Could not find gem '#{gem_name}'."
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
36
38
|
current_dependencies = Bundler.ui.silence do
|
37
39
|
Bundler.load.dependencies.map {|dep| [dep.name, dep] }.to_h
|
38
40
|
end
|
data/lib/bundler/cli/show.rb
CHANGED
@@ -24,7 +24,7 @@ module Bundler
|
|
24
24
|
return unless spec
|
25
25
|
path = spec.full_gem_path
|
26
26
|
unless File.directory?(path)
|
27
|
-
return Bundler.ui.warn "The gem #{gem_name}
|
27
|
+
return Bundler.ui.warn "The gem #{gem_name} is missing. It should be installed at #{path}, but was not found"
|
28
28
|
end
|
29
29
|
end
|
30
30
|
return Bundler.ui.info(path)
|
@@ -37,7 +37,8 @@ module Bundler
|
|
37
37
|
file.digests = parse_digests(response)
|
38
38
|
# server may ignore Range and return the full response
|
39
39
|
if response.is_a?(Gem::Net::HTTPPartialContent)
|
40
|
-
|
40
|
+
tail = response.body.byteslice(1..-1)
|
41
|
+
break false unless tail && file.append(tail)
|
41
42
|
else
|
42
43
|
file.write(response.body)
|
43
44
|
end
|
data/lib/bundler/current_ruby.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "rubygems_ext"
|
4
|
+
|
3
5
|
module Bundler
|
4
6
|
# Returns current version of Ruby
|
5
7
|
#
|
@@ -9,38 +11,25 @@ module Bundler
|
|
9
11
|
end
|
10
12
|
|
11
13
|
class CurrentRuby
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
KNOWN_PLATFORMS = %w[
|
32
|
-
jruby
|
33
|
-
maglev
|
34
|
-
mingw
|
35
|
-
mri
|
36
|
-
mswin
|
37
|
-
mswin64
|
38
|
-
rbx
|
39
|
-
ruby
|
40
|
-
truffleruby
|
41
|
-
windows
|
42
|
-
x64_mingw
|
43
|
-
].freeze
|
14
|
+
ALL_RUBY_VERSIONS = (18..27).to_a.concat((30..35).to_a).freeze
|
15
|
+
KNOWN_MINOR_VERSIONS = ALL_RUBY_VERSIONS.map {|v| v.digits.reverse.join(".") }.freeze
|
16
|
+
KNOWN_MAJOR_VERSIONS = ALL_RUBY_VERSIONS.map {|v| v.digits.last.to_s }.uniq.freeze
|
17
|
+
PLATFORM_MAP = {
|
18
|
+
ruby: [Gem::Platform::RUBY, CurrentRuby::ALL_RUBY_VERSIONS],
|
19
|
+
mri: [Gem::Platform::RUBY, CurrentRuby::ALL_RUBY_VERSIONS],
|
20
|
+
rbx: [Gem::Platform::RUBY],
|
21
|
+
truffleruby: [Gem::Platform::RUBY],
|
22
|
+
jruby: [Gem::Platform::JAVA, [18, 19]],
|
23
|
+
windows: [Gem::Platform::WINDOWS, CurrentRuby::ALL_RUBY_VERSIONS],
|
24
|
+
# deprecated
|
25
|
+
mswin: [Gem::Platform::MSWIN, CurrentRuby::ALL_RUBY_VERSIONS],
|
26
|
+
mswin64: [Gem::Platform::MSWIN64, CurrentRuby::ALL_RUBY_VERSIONS - [18]],
|
27
|
+
mingw: [Gem::Platform::UNIVERSAL_MINGW, CurrentRuby::ALL_RUBY_VERSIONS],
|
28
|
+
x64_mingw: [Gem::Platform::UNIVERSAL_MINGW, CurrentRuby::ALL_RUBY_VERSIONS - [18, 19]],
|
29
|
+
}.each_with_object({}) do |(platform, spec), hash|
|
30
|
+
hash[platform] = spec[0]
|
31
|
+
spec[1]&.each {|version| hash[:"#{platform}_#{version}"] = spec[0] }
|
32
|
+
end.freeze
|
44
33
|
|
45
34
|
def ruby?
|
46
35
|
return true if Bundler::GemHelpers.generic_local_platform_is_ruby?
|
@@ -82,7 +71,8 @@ module Bundler
|
|
82
71
|
RUBY_VERSION.start_with?("#{version}.")
|
83
72
|
end
|
84
73
|
|
85
|
-
|
74
|
+
all_platforms = PLATFORM_MAP.keys << "maglev"
|
75
|
+
all_platforms.each do |platform|
|
86
76
|
define_method(:"#{platform}_#{trimmed_version}?") do
|
87
77
|
send(:"#{platform}?") && send(:"on_#{trimmed_version}?")
|
88
78
|
end
|