rubygems-update 3.2.17 → 3.2.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/Manifest.txt +3 -0
- data/Rakefile +1 -6
- data/bundler/CHANGELOG.md +39 -0
- data/bundler/bundler.gemspec +2 -3
- data/bundler/lib/bundler.rb +1 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli.rb +13 -33
- data/bundler/lib/bundler/cli/check.rb +4 -2
- data/bundler/lib/bundler/cli/outdated.rb +9 -10
- data/bundler/lib/bundler/definition.rb +20 -75
- data/bundler/lib/bundler/feature_flag.rb +0 -1
- data/bundler/lib/bundler/fetcher/index.rb +0 -1
- data/bundler/lib/bundler/friendly_errors.rb +2 -4
- data/bundler/lib/bundler/index.rb +1 -2
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -7
- data/bundler/lib/bundler/man/bundle-config.1.ronn +0 -8
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/plugin/api/source.rb +14 -0
- data/bundler/lib/bundler/resolver.rb +13 -96
- data/bundler/lib/bundler/resolver/spec_group.rb +0 -24
- data/bundler/lib/bundler/rubygems_ext.rb +2 -2
- data/bundler/lib/bundler/rubygems_integration.rb +4 -3
- data/bundler/lib/bundler/settings.rb +14 -2
- data/bundler/lib/bundler/source.rb +11 -0
- data/bundler/lib/bundler/source/rubygems.rb +21 -8
- data/bundler/lib/bundler/source/rubygems_aggregate.rb +64 -0
- data/bundler/lib/bundler/source_list.rb +33 -10
- data/bundler/lib/bundler/source_map.rb +58 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/command.rb +2 -0
- data/lib/rubygems/commands/build_command.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +4 -4
- data/lib/rubygems/installer.rb +4 -0
- data/lib/rubygems/specification.rb +0 -2
- data/lib/rubygems/specification_policy.rb +5 -4
- data/lib/rubygems/test_case.rb +106 -18
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem +0 -0
- data/test/rubygems/test_bundled_ca.rb +2 -2
- data/test/rubygems/test_deprecate.rb +3 -3
- data/test/rubygems/test_gem.rb +33 -31
- data/test/rubygems/test_gem_bundler_version_finder.rb +3 -5
- data/test/rubygems/test_gem_command.rb +13 -1
- data/test/rubygems/test_gem_command_manager.rb +5 -5
- data/test/rubygems/test_gem_commands_build_command.rb +10 -10
- data/test/rubygems/test_gem_commands_cert_command.rb +36 -36
- data/test/rubygems/test_gem_commands_check_command.rb +5 -5
- data/test/rubygems/test_gem_commands_cleanup_command.rb +24 -24
- data/test/rubygems/test_gem_commands_contents_command.rb +3 -3
- data/test/rubygems/test_gem_commands_dependency_command.rb +2 -2
- data/test/rubygems/test_gem_commands_environment_command.rb +1 -1
- data/test/rubygems/test_gem_commands_fetch_command.rb +9 -9
- data/test/rubygems/test_gem_commands_help_command.rb +8 -1
- data/test/rubygems/test_gem_commands_install_command.rb +60 -60
- data/test/rubygems/test_gem_commands_list_command.rb +1 -1
- data/test/rubygems/test_gem_commands_lock_command.rb +1 -1
- data/test/rubygems/test_gem_commands_open_command.rb +8 -9
- data/test/rubygems/test_gem_commands_owner_command.rb +3 -3
- data/test/rubygems/test_gem_commands_pristine_command.rb +14 -14
- data/test/rubygems/test_gem_commands_push_command.rb +6 -6
- data/test/rubygems/test_gem_commands_query_command.rb +7 -7
- data/test/rubygems/test_gem_commands_server_command.rb +2 -2
- data/test/rubygems/test_gem_commands_setup_command.rb +21 -21
- data/test/rubygems/test_gem_commands_signin_command.rb +6 -6
- data/test/rubygems/test_gem_commands_sources_command.rb +5 -5
- data/test/rubygems/test_gem_commands_specification_command.rb +6 -6
- data/test/rubygems/test_gem_commands_uninstall_command.rb +4 -4
- data/test/rubygems/test_gem_commands_unpack_command.rb +2 -2
- data/test/rubygems/test_gem_commands_update_command.rb +10 -10
- data/test/rubygems/test_gem_commands_which_command.rb +3 -3
- data/test/rubygems/test_gem_commands_yank_command.rb +1 -1
- data/test/rubygems/test_gem_config_file.rb +9 -9
- data/test/rubygems/test_gem_dependency.rb +12 -6
- data/test/rubygems/test_gem_dependency_installer.rb +4 -4
- data/test/rubygems/test_gem_doctor.rb +30 -30
- data/test/rubygems/test_gem_ext_builder.rb +20 -20
- data/test/rubygems/test_gem_ext_cmake_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_configure_builder.rb +4 -4
- data/test/rubygems/test_gem_ext_ext_conf_builder.rb +14 -13
- data/test/rubygems/test_gem_ext_rake_builder.rb +1 -1
- data/test/rubygems/test_gem_gemcutter_utilities.rb +8 -8
- data/test/rubygems/test_gem_install_update_options.rb +9 -9
- data/test/rubygems/test_gem_installer.rb +162 -140
- data/test/rubygems/test_gem_local_remote_options.rb +1 -1
- data/test/rubygems/test_gem_package.rb +48 -48
- data/test/rubygems/test_gem_package_old.rb +9 -9
- data/test/rubygems/test_gem_package_tar_header.rb +5 -5
- data/test/rubygems/test_gem_package_tar_reader_entry.rb +8 -8
- data/test/rubygems/test_gem_package_tar_writer.rb +18 -20
- data/test/rubygems/test_gem_package_task.rb +2 -2
- data/test/rubygems/test_gem_path_support.rb +1 -1
- data/test/rubygems/test_gem_rdoc.rb +9 -9
- data/test/rubygems/test_gem_remote_fetcher.rb +17 -18
- data/test/rubygems/test_gem_request.rb +2 -2
- data/test/rubygems/test_gem_request_connection_pools.rb +1 -1
- data/test/rubygems/test_gem_request_set.rb +15 -14
- data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +16 -16
- data/test/rubygems/test_gem_request_set_lockfile.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_parser.rb +3 -3
- data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +4 -4
- data/test/rubygems/test_gem_requirement.rb +13 -13
- data/test/rubygems/test_gem_resolver.rb +11 -11
- data/test/rubygems/test_gem_resolver_best_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_set.rb +1 -1
- data/test/rubygems/test_gem_resolver_git_specification.rb +2 -2
- data/test/rubygems/test_gem_resolver_index_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_installer_set.rb +4 -4
- data/test/rubygems/test_gem_resolver_local_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_specification.rb +1 -1
- data/test/rubygems/test_gem_resolver_vendor_set.rb +2 -2
- data/test/rubygems/test_gem_security.rb +5 -5
- data/test/rubygems/test_gem_security_policy.rb +27 -27
- data/test/rubygems/test_gem_security_signer.rb +7 -7
- data/test/rubygems/test_gem_security_trust_dir.rb +4 -4
- data/test/rubygems/test_gem_server.rb +2 -2
- data/test/rubygems/test_gem_silent_ui.rb +9 -9
- data/test/rubygems/test_gem_source.rb +2 -2
- data/test/rubygems/test_gem_source_fetch_problem.rb +1 -1
- data/test/rubygems/test_gem_source_git.rb +11 -11
- data/test/rubygems/test_gem_source_specific_file.rb +1 -1
- data/test/rubygems/test_gem_spec_fetcher.rb +1 -1
- data/test/rubygems/test_gem_specification.rb +86 -106
- data/test/rubygems/test_gem_stream_ui.rb +1 -1
- data/test/rubygems/test_gem_stub_specification.rb +4 -4
- data/test/rubygems/test_gem_uninstaller.rb +16 -16
- data/test/rubygems/test_gem_util.rb +8 -6
- data/test/rubygems/test_gem_version.rb +4 -13
- data/test/rubygems/test_kernel.rb +6 -4
- data/test/rubygems/test_project_sanity.rb +1 -1
- data/test/rubygems/test_remote_fetch_error.rb +1 -1
- data/test/rubygems/test_require.rb +13 -13
- data/test/test_changelog_generator.rb +1 -2
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: beb9904852db18bc2cb58e157631c112d2951ea7df0bac7f63a1838ffba5ddbc
|
4
|
+
data.tar.gz: a987e2d21ffd319e2dc0c0ae4d913b5f1d3ad6480783addbc4faaee5ad540b86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc88c86f3691d8b07ce12056d0f1e762de188fe3775d3f80a83c2912020ed039b34ce50e95e118bfe8f6077cdb6ced949cb9c6147699292c6f45e3703b5e0087
|
7
|
+
data.tar.gz: a91aa086be326926df974bbf2734c94e9ee1dfebc1e1b0a23474d64156c46249448e398baaf38fa4fedbdb2e006fd40ef94949112271842a89a1adc2a1b952a9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,28 @@
|
|
1
|
+
# 3.2.20 / 2021-06-11
|
2
|
+
|
3
|
+
## Security fixes:
|
4
|
+
|
5
|
+
* Verify plaform before installing to avoid potential remote code
|
6
|
+
execution. Pull request #4667 by sonalkr132
|
7
|
+
|
8
|
+
## Enhancements:
|
9
|
+
|
10
|
+
* Add better specification policy error description. Pull request #4658 by
|
11
|
+
ceritium
|
12
|
+
|
13
|
+
# 3.2.19 / 2021-05-31
|
14
|
+
|
15
|
+
## Enhancements:
|
16
|
+
|
17
|
+
* Fix `gem help build` output format. Pull request #4613 by tnir
|
18
|
+
|
19
|
+
# 3.2.18 / 2021-05-25
|
20
|
+
|
21
|
+
## Enhancements:
|
22
|
+
|
23
|
+
* Don't leave temporary directory around when building extensions to
|
24
|
+
improve build reproducibility. Pull request #4610 by baloo
|
25
|
+
|
1
26
|
# 3.2.17 / 2021-05-05
|
2
27
|
|
3
28
|
## Enhancements:
|
data/Manifest.txt
CHANGED
@@ -180,7 +180,9 @@ bundler/lib/bundler/source/path.rb
|
|
180
180
|
bundler/lib/bundler/source/path/installer.rb
|
181
181
|
bundler/lib/bundler/source/rubygems.rb
|
182
182
|
bundler/lib/bundler/source/rubygems/remote.rb
|
183
|
+
bundler/lib/bundler/source/rubygems_aggregate.rb
|
183
184
|
bundler/lib/bundler/source_list.rb
|
185
|
+
bundler/lib/bundler/source_map.rb
|
184
186
|
bundler/lib/bundler/spec_set.rb
|
185
187
|
bundler/lib/bundler/stub_specification.rb
|
186
188
|
bundler/lib/bundler/templates/.document
|
@@ -536,6 +538,7 @@ test/rubygems/invalidchild_cert.pem
|
|
536
538
|
test/rubygems/invalidchild_cert_32.pem
|
537
539
|
test/rubygems/invalidchild_key.pem
|
538
540
|
test/rubygems/packages/ascii_binder-0.1.10.1.gem
|
541
|
+
test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem
|
539
542
|
test/rubygems/plugin/exception/rubygems_plugin.rb
|
540
543
|
test/rubygems/plugin/load/rubygems_plugin.rb
|
541
544
|
test/rubygems/plugin/standarderror/rubygems_plugin.rb
|
data/Rakefile
CHANGED
@@ -86,11 +86,6 @@ end
|
|
86
86
|
|
87
87
|
task rubocop: %w[rubocop:rubygems rubocop:bundler]
|
88
88
|
|
89
|
-
desc "Run a test suite bisection"
|
90
|
-
task(:bisect) do
|
91
|
-
sh "util/bisect"
|
92
|
-
end
|
93
|
-
|
94
89
|
# --------------------------------------------------------------------
|
95
90
|
# Creating a release
|
96
91
|
|
@@ -254,7 +249,7 @@ end
|
|
254
249
|
|
255
250
|
directory '../blog.rubygems.org' do
|
256
251
|
sh 'git', 'clone',
|
257
|
-
'git@github.com:rubygems/rubygems.github.
|
252
|
+
'git@github.com:rubygems/rubygems.github.io.git',
|
258
253
|
'../blog.rubygems.org'
|
259
254
|
end
|
260
255
|
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,42 @@
|
|
1
|
+
# 2.2.20 (June 11, 2021)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Don't print bug report template on server side errors [#4663](https://github.com/rubygems/rubygems/pull/4663)
|
6
|
+
- Don't load `resolv` unnecessarily [#4640](https://github.com/rubygems/rubygems/pull/4640)
|
7
|
+
|
8
|
+
## Bug fixes:
|
9
|
+
|
10
|
+
- Fix `bundle outdated` edge case [#4648](https://github.com/rubygems/rubygems/pull/4648)
|
11
|
+
- Fix `bundle check` with scoped rubygems sources [#4639](https://github.com/rubygems/rubygems/pull/4639)
|
12
|
+
|
13
|
+
## Performance:
|
14
|
+
|
15
|
+
- Don't use `extra_rdoc_files` with md files in gemspec to make installing bundler with docs faster [#4628](https://github.com/rubygems/rubygems/pull/4628)
|
16
|
+
|
17
|
+
# 2.2.19 (May 31, 2021)
|
18
|
+
|
19
|
+
## Bug fixes:
|
20
|
+
|
21
|
+
- Restore support for configuration keys with dashes [#4582](https://github.com/rubygems/rubygems/pull/4582)
|
22
|
+
- Fix some cached gems being unintentionally ignored when using rubygems 3.2.18 [#4623](https://github.com/rubygems/rubygems/pull/4623)
|
23
|
+
|
24
|
+
# 2.2.18 (May 25, 2021)
|
25
|
+
|
26
|
+
## Security fixes:
|
27
|
+
|
28
|
+
- Fix dependency confusion issues with implicit dependencies [#4609](https://github.com/rubygems/rubygems/pull/4609)
|
29
|
+
|
30
|
+
## Enhancements:
|
31
|
+
|
32
|
+
- Use simpler notation for generated `required_ruby_version` [#4598](https://github.com/rubygems/rubygems/pull/4598)
|
33
|
+
- Undeprecate bundle show [#4586](https://github.com/rubygems/rubygems/pull/4586)
|
34
|
+
- Make sure link to new issue uses the proper template [#4592](https://github.com/rubygems/rubygems/pull/4592)
|
35
|
+
|
36
|
+
## Bug fixes:
|
37
|
+
|
38
|
+
- Fix platform specific gems being removed from the lockfile [#4580](https://github.com/rubygems/rubygems/pull/4580)
|
39
|
+
|
1
40
|
# 2.2.17 (May 5, 2021)
|
2
41
|
|
3
42
|
## Enhancements:
|
data/bundler/bundler.gemspec
CHANGED
@@ -34,13 +34,12 @@ 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("{
|
37
|
+
s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
|
38
38
|
|
39
|
-
# Include the CHANGELOG.md, LICENSE.md, README.md manually
|
40
|
-
s.files += %w[CHANGELOG.md LICENSE.md README.md]
|
41
39
|
# include the gemspec itself because warbler breaks w/o it
|
42
40
|
s.files += %w[bundler.gemspec]
|
43
41
|
|
42
|
+
s.files += %w[CHANGELOG.md LICENSE.md README.md]
|
44
43
|
s.bindir = "exe"
|
45
44
|
s.executables = %w[bundle bundler]
|
46
45
|
s.require_paths = ["lib"]
|
data/bundler/lib/bundler.rb
CHANGED
@@ -69,6 +69,7 @@ module Bundler
|
|
69
69
|
autoload :SharedHelpers, File.expand_path("bundler/shared_helpers", __dir__)
|
70
70
|
autoload :Source, File.expand_path("bundler/source", __dir__)
|
71
71
|
autoload :SourceList, File.expand_path("bundler/source_list", __dir__)
|
72
|
+
autoload :SourceMap, File.expand_path("bundler/source_map", __dir__)
|
72
73
|
autoload :SpecSet, File.expand_path("bundler/spec_set", __dir__)
|
73
74
|
autoload :StubSpecification, File.expand_path("bundler/stub_specification", __dir__)
|
74
75
|
autoload :UI, File.expand_path("bundler/ui", __dir__)
|
@@ -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 = "2021-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2021-06-11".freeze
|
8
|
+
@git_commit_sha = "4c510a34a4".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
data/bundler/lib/bundler/cli.rb
CHANGED
@@ -308,39 +308,19 @@ module Bundler
|
|
308
308
|
end
|
309
309
|
end
|
310
310
|
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
if flag = rest.find{|arg| ["--verbose", "--outdated"].include?(arg) }
|
326
|
-
Bundler::SharedHelpers.major_deprecation(2, "the `#{flag}` flag to `bundle show` was undocumented and will be removed without replacement")
|
327
|
-
else
|
328
|
-
new_command = rest.find {|arg| !arg.start_with?("--") } ? "info" : "list"
|
329
|
-
|
330
|
-
new_arguments = rest.map do |arg|
|
331
|
-
next arg if arg != "--paths"
|
332
|
-
next "--path" if new_command == "info"
|
333
|
-
end
|
334
|
-
|
335
|
-
old_argv = ARGV.join(" ")
|
336
|
-
new_argv = [new_command, *new_arguments.compact].join(" ")
|
337
|
-
|
338
|
-
Bundler::SharedHelpers.major_deprecation(2, "use `bundle #{new_argv}` instead of `bundle #{old_argv}`")
|
339
|
-
end
|
340
|
-
end
|
341
|
-
require_relative "cli/show"
|
342
|
-
Show.new(options, gem_name).run
|
343
|
-
end
|
311
|
+
desc "show GEM [OPTIONS]", "Shows all gems that are part of the bundle, or the path to a given gem"
|
312
|
+
long_desc <<-D
|
313
|
+
Show lists the names and versions of all gems that are required by your Gemfile.
|
314
|
+
Calling show with [GEM] will list the exact location of that gem on your machine.
|
315
|
+
D
|
316
|
+
method_option "paths", :type => :boolean,
|
317
|
+
:banner => "List the paths of all gems that are required by your Gemfile."
|
318
|
+
method_option "outdated", :type => :boolean,
|
319
|
+
:banner => "Show verbose output including whether gems are outdated."
|
320
|
+
def show(gem_name = nil)
|
321
|
+
SharedHelpers.major_deprecation(2, "the `--outdated` flag to `bundle show` was undocumented and will be removed without replacement") if ARGV.include?("--outdated")
|
322
|
+
require_relative "cli/show"
|
323
|
+
Show.new(options, gem_name).run
|
344
324
|
end
|
345
325
|
|
346
326
|
desc "list", "List all gems in the bundle"
|
@@ -11,9 +11,11 @@ module Bundler
|
|
11
11
|
def run
|
12
12
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
13
13
|
|
14
|
+
definition = Bundler.definition
|
15
|
+
definition.validate_runtime!
|
16
|
+
|
14
17
|
begin
|
15
|
-
definition
|
16
|
-
definition.validate_runtime!
|
18
|
+
definition.resolve_only_locally!
|
17
19
|
not_installed = definition.missing_specs
|
18
20
|
rescue GemNotFound, VersionConflict
|
19
21
|
Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
|
@@ -146,17 +146,16 @@ module Bundler
|
|
146
146
|
end
|
147
147
|
|
148
148
|
def retrieve_active_spec(definition, current_spec)
|
149
|
-
|
150
|
-
|
151
|
-
else
|
152
|
-
active_specs = definition.find_indexed_specs(current_spec)
|
153
|
-
if !current_spec.version.prerelease? && !options[:pre] && active_specs.size > 1
|
154
|
-
active_specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
|
155
|
-
end
|
156
|
-
active_spec = active_specs.last
|
157
|
-
end
|
149
|
+
active_spec = definition.resolve.find_by_name_and_platform(current_spec.name, current_spec.platform)
|
150
|
+
return unless active_spec
|
158
151
|
|
159
|
-
active_spec
|
152
|
+
return active_spec if strict
|
153
|
+
|
154
|
+
active_specs = active_spec.source.specs.search(current_spec.name).select {|spec| spec.match_platform(current_spec.platform) }.sort_by(&:version)
|
155
|
+
if !current_spec.version.prerelease? && !options[:pre] && active_specs.size > 1
|
156
|
+
active_specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
|
157
|
+
end
|
158
|
+
active_specs.last
|
160
159
|
end
|
161
160
|
|
162
161
|
def print_gems(gems_list)
|
@@ -160,6 +160,12 @@ module Bundler
|
|
160
160
|
@disable_multisource
|
161
161
|
end
|
162
162
|
|
163
|
+
def resolve_only_locally!
|
164
|
+
@remote = false
|
165
|
+
sources.local_only!
|
166
|
+
resolve
|
167
|
+
end
|
168
|
+
|
163
169
|
def resolve_with_cache!
|
164
170
|
sources.cached!
|
165
171
|
resolve
|
@@ -219,7 +225,6 @@ module Bundler
|
|
219
225
|
Bundler.ui.debug "The definition is missing #{missing.map(&:full_name)}"
|
220
226
|
true
|
221
227
|
rescue BundlerError => e
|
222
|
-
@index = nil
|
223
228
|
@resolve = nil
|
224
229
|
@specs = nil
|
225
230
|
@gem_version_promoter = nil
|
@@ -282,50 +287,6 @@ module Bundler
|
|
282
287
|
end
|
283
288
|
end
|
284
289
|
|
285
|
-
def index
|
286
|
-
@index ||= Index.build do |idx|
|
287
|
-
dependency_names = @dependencies.map(&:name)
|
288
|
-
|
289
|
-
sources.all_sources.each do |source|
|
290
|
-
source.dependency_names = dependency_names - pinned_spec_names(source)
|
291
|
-
idx.add_source source.specs
|
292
|
-
dependency_names.concat(source.unmet_deps).uniq!
|
293
|
-
end
|
294
|
-
|
295
|
-
double_check_for_index(idx, dependency_names)
|
296
|
-
end
|
297
|
-
end
|
298
|
-
|
299
|
-
# Suppose the gem Foo depends on the gem Bar. Foo exists in Source A. Bar has some versions that exist in both
|
300
|
-
# sources A and B. At this point, the API request will have found all the versions of Bar in source A,
|
301
|
-
# but will not have found any versions of Bar from source B, which is a problem if the requested version
|
302
|
-
# of Foo specifically depends on a version of Bar that is only found in source B. This ensures that for
|
303
|
-
# each spec we found, we add all possible versions from all sources to the index.
|
304
|
-
def double_check_for_index(idx, dependency_names)
|
305
|
-
pinned_names = pinned_spec_names
|
306
|
-
loop do
|
307
|
-
idxcount = idx.size
|
308
|
-
|
309
|
-
names = :names # do this so we only have to traverse to get dependency_names from the index once
|
310
|
-
unmet_dependency_names = lambda do
|
311
|
-
return names unless names == :names
|
312
|
-
new_names = sources.all_sources.map(&:dependency_names_to_double_check)
|
313
|
-
return names = nil if new_names.compact!
|
314
|
-
names = new_names.flatten(1).concat(dependency_names)
|
315
|
-
names.uniq!
|
316
|
-
names -= pinned_names
|
317
|
-
names
|
318
|
-
end
|
319
|
-
|
320
|
-
sources.all_sources.each do |source|
|
321
|
-
source.double_check_for(unmet_dependency_names)
|
322
|
-
end
|
323
|
-
|
324
|
-
break if idxcount == idx.size
|
325
|
-
end
|
326
|
-
end
|
327
|
-
private :double_check_for_index
|
328
|
-
|
329
290
|
def has_rubygems_remotes?
|
330
291
|
sources.rubygems_sources.any? {|s| s.remotes.any? }
|
331
292
|
end
|
@@ -532,14 +493,6 @@ module Bundler
|
|
532
493
|
end
|
533
494
|
end
|
534
495
|
|
535
|
-
def find_resolved_spec(current_spec)
|
536
|
-
specs.find_by_name_and_platform(current_spec.name, current_spec.platform)
|
537
|
-
end
|
538
|
-
|
539
|
-
def find_indexed_specs(current_spec)
|
540
|
-
index[current_spec.name].select {|spec| spec.match_platform(current_spec.platform) }.sort_by(&:version)
|
541
|
-
end
|
542
|
-
|
543
496
|
attr_reader :sources
|
544
497
|
private :sources
|
545
498
|
|
@@ -556,6 +509,10 @@ module Bundler
|
|
556
509
|
|
557
510
|
private
|
558
511
|
|
512
|
+
def precompute_source_requirements_for_indirect_dependencies?
|
513
|
+
sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && sources.no_aggregate_global_source?
|
514
|
+
end
|
515
|
+
|
559
516
|
def current_ruby_platform_locked?
|
560
517
|
return false unless generic_local_platform == Gem::Platform::RUBY
|
561
518
|
|
@@ -681,9 +638,9 @@ module Bundler
|
|
681
638
|
changes = false
|
682
639
|
|
683
640
|
# If there is a RubyGems source in both
|
684
|
-
locked_gem_sources.each do |
|
641
|
+
locked_gem_sources.each do |locked_gem_source|
|
685
642
|
# Merge the remotes from the Gemfile into the Gemfile.lock
|
686
|
-
changes |=
|
643
|
+
changes |= locked_gem_source.replace_remotes(actual_remotes, Bundler.settings[:allow_deployment_source_credential_changes])
|
687
644
|
end
|
688
645
|
|
689
646
|
changes
|
@@ -902,26 +859,22 @@ module Bundler
|
|
902
859
|
end
|
903
860
|
|
904
861
|
def source_requirements
|
905
|
-
# Load all specs from remote sources
|
906
|
-
index
|
907
|
-
|
908
862
|
# Record the specs available in each gem's source, so that those
|
909
863
|
# specs will be available later when the resolver knows where to
|
910
864
|
# look for that gemspec (or its dependencies)
|
911
|
-
source_requirements =
|
865
|
+
source_requirements = if precompute_source_requirements_for_indirect_dependencies?
|
866
|
+
{ :default => sources.default_source }.merge(source_map.all_requirements)
|
867
|
+
else
|
868
|
+
{ :default => Source::RubygemsAggregate.new(sources, source_map) }.merge(source_map.direct_requirements)
|
869
|
+
end
|
912
870
|
metadata_dependencies.each do |dep|
|
913
871
|
source_requirements[dep.name] = sources.metadata_source
|
914
872
|
end
|
915
|
-
source_requirements[:
|
916
|
-
source_requirements[:default_bundler] = source_requirements["bundler"] || source_requirements[:default]
|
873
|
+
source_requirements[:default_bundler] = source_requirements["bundler"] || sources.default_source
|
917
874
|
source_requirements["bundler"] = sources.metadata_source # needs to come last to override
|
918
875
|
source_requirements
|
919
876
|
end
|
920
877
|
|
921
|
-
def pinned_spec_names(skip = nil)
|
922
|
-
dependency_source_requirements.reject {|_, source| source == skip }.keys
|
923
|
-
end
|
924
|
-
|
925
878
|
def requested_groups
|
926
879
|
groups - Bundler.settings[:without] - @optional_groups + Bundler.settings[:with]
|
927
880
|
end
|
@@ -977,16 +930,8 @@ module Bundler
|
|
977
930
|
Bundler.settings[:allow_deployment_source_credential_changes] && source.equivalent_remotes?(sources.rubygems_remotes)
|
978
931
|
end
|
979
932
|
|
980
|
-
def
|
981
|
-
@
|
982
|
-
source_requirements = {}
|
983
|
-
default = sources.default_source
|
984
|
-
dependencies.each do |dep|
|
985
|
-
dep_source = dep.source || default
|
986
|
-
source_requirements[dep.name] = dep_source
|
987
|
-
end
|
988
|
-
source_requirements
|
989
|
-
end
|
933
|
+
def source_map
|
934
|
+
@source_map ||= SourceMap.new(sources, dependencies)
|
990
935
|
end
|
991
936
|
end
|
992
937
|
end
|
@@ -32,7 +32,6 @@ module Bundler
|
|
32
32
|
settings_flag(:cache_all) { bundler_3_mode? }
|
33
33
|
settings_flag(:default_install_uses_path) { bundler_3_mode? }
|
34
34
|
settings_flag(:deployment_means_frozen) { bundler_3_mode? }
|
35
|
-
settings_flag(:disable_multisource) { bundler_3_mode? }
|
36
35
|
settings_flag(:forget_cli_options) { bundler_3_mode? }
|
37
36
|
settings_flag(:global_gem_cache) { bundler_3_mode? }
|
38
37
|
settings_flag(:path_relative_to_cwd) { bundler_3_mode? }
|
@@ -49,8 +49,6 @@ module Bundler
|
|
49
49
|
"Alternatively, you can increase the amount of memory the JVM is able to use by running Bundler with jruby -J-Xmx1024m -S bundle (JRuby defaults to 500MB)."
|
50
50
|
else request_issue_report_for(error)
|
51
51
|
end
|
52
|
-
rescue StandardError
|
53
|
-
raise error
|
54
52
|
end
|
55
53
|
|
56
54
|
def exit_status(error)
|
@@ -111,8 +109,8 @@ module Bundler
|
|
111
109
|
First, try this link to see if there are any existing issue reports for this error:
|
112
110
|
#{issues_url(e)}
|
113
111
|
|
114
|
-
If there aren't any reports for this error yet, please
|
115
|
-
https://github.com/rubygems/rubygems/issues/new?labels=Bundler
|
112
|
+
If there aren't any reports for this error yet, please copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
|
113
|
+
https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md
|
116
114
|
EOS
|
117
115
|
end
|
118
116
|
|