rubygems-update 3.2.17 → 3.2.20
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 +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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-CACHE" "1" "
|
|
4
|
+
.TH "BUNDLE\-CACHE" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-CHECK" "1" "
|
|
4
|
+
.TH "BUNDLE\-CHECK" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-CONFIG" "1" "
|
|
4
|
+
.TH "BUNDLE\-CONFIG" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-config\fR \- Set bundler configuration options
|
|
@@ -56,9 +56,6 @@ Executing \fBbundle config unset \-\-local <name> <value>\fR will delete the con
|
|
|
56
56
|
.P
|
|
57
57
|
Executing bundle with the \fBBUNDLE_IGNORE_CONFIG\fR environment variable set will cause it to ignore all configuration\.
|
|
58
58
|
.
|
|
59
|
-
.P
|
|
60
|
-
Executing \fBbundle config set \-\-local disable_multisource true\fR upgrades the warning about the Gemfile containing multiple primary sources to an error\. Executing \fBbundle config unset disable_multisource\fR downgrades this error to a warning\.
|
|
61
|
-
.
|
|
62
59
|
.SH "REMEMBERING OPTIONS"
|
|
63
60
|
Flags passed to \fBbundle install\fR or the Bundler runtime, such as \fB\-\-path foo\fR or \fB\-\-without production\fR, are remembered between commands and saved to your local application\'s configuration (normally, \fB\./\.bundle/config\fR)\.
|
|
64
61
|
.
|
|
@@ -184,9 +181,6 @@ The following is a list of all configuration keys and their purpose\. You can le
|
|
|
184
181
|
\fBdisable_local_revision_check\fR (\fBBUNDLE_DISABLE_LOCAL_REVISION_CHECK\fR): Allow Bundler to use a local git override without checking if the revision present in the lockfile is present in the repository\.
|
|
185
182
|
.
|
|
186
183
|
.IP "\(bu" 4
|
|
187
|
-
\fBdisable_multisource\fR (\fBBUNDLE_DISABLE_MULTISOURCE\fR): When set, Gemfiles containing multiple sources will produce errors instead of warnings\. Use \fBbundle config unset disable_multisource\fR to unset\.
|
|
188
|
-
.
|
|
189
|
-
.IP "\(bu" 4
|
|
190
184
|
\fBdisable_shared_gems\fR (\fBBUNDLE_DISABLE_SHARED_GEMS\fR): Stop Bundler from accessing gems installed to RubyGems\' normal location\.
|
|
191
185
|
.
|
|
192
186
|
.IP "\(bu" 4
|
|
@@ -47,10 +47,6 @@ configuration only from the local application.
|
|
|
47
47
|
Executing bundle with the `BUNDLE_IGNORE_CONFIG` environment variable set will
|
|
48
48
|
cause it to ignore all configuration.
|
|
49
49
|
|
|
50
|
-
Executing `bundle config set --local disable_multisource true` upgrades the warning about
|
|
51
|
-
the Gemfile containing multiple primary sources to an error. Executing `bundle
|
|
52
|
-
config unset disable_multisource` downgrades this error to a warning.
|
|
53
|
-
|
|
54
50
|
## REMEMBERING OPTIONS
|
|
55
51
|
|
|
56
52
|
Flags passed to `bundle install` or the Bundler runtime, such as `--path foo` or
|
|
@@ -178,10 +174,6 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
|
|
|
178
174
|
* `disable_local_revision_check` (`BUNDLE_DISABLE_LOCAL_REVISION_CHECK`):
|
|
179
175
|
Allow Bundler to use a local git override without checking if the revision
|
|
180
176
|
present in the lockfile is present in the repository.
|
|
181
|
-
* `disable_multisource` (`BUNDLE_DISABLE_MULTISOURCE`):
|
|
182
|
-
When set, Gemfiles containing multiple sources will produce errors
|
|
183
|
-
instead of warnings.
|
|
184
|
-
Use `bundle config unset disable_multisource` to unset.
|
|
185
177
|
* `disable_shared_gems` (`BUNDLE_DISABLE_SHARED_GEMS`):
|
|
186
178
|
Stop Bundler from accessing gems installed to RubyGems' normal location.
|
|
187
179
|
* `disable_version_check` (`BUNDLE_DISABLE_VERSION_CHECK`):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-INJECT" "1" "
|
|
4
|
+
.TH "BUNDLE\-INJECT" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-INSTALL" "1" "
|
|
4
|
+
.TH "BUNDLE\-INSTALL" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-OUTDATED" "1" "
|
|
4
|
+
.TH "BUNDLE\-OUTDATED" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-PLATFORM" "1" "
|
|
4
|
+
.TH "BUNDLE\-PLATFORM" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-platform\fR \- Displays platform compatibility information
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
|
4
|
+
.TH "BUNDLE\-PRISTINE" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-SHOW" "1" "
|
|
4
|
+
.TH "BUNDLE\-SHOW" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "BUNDLE\-UPDATE" "1" "
|
|
4
|
+
.TH "BUNDLE\-UPDATE" "1" "May 2021" "" ""
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
|
@@ -244,6 +244,20 @@ module Bundler
|
|
|
244
244
|
specs.unmet_dependency_names
|
|
245
245
|
end
|
|
246
246
|
|
|
247
|
+
# Used by definition.
|
|
248
|
+
#
|
|
249
|
+
# Note: Do not override if you don't know what you are doing.
|
|
250
|
+
def spec_names
|
|
251
|
+
specs.spec_names
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Used by definition.
|
|
255
|
+
#
|
|
256
|
+
# Note: Do not override if you don't know what you are doing.
|
|
257
|
+
def add_dependency_names(names)
|
|
258
|
+
@dependencies |= Array(names)
|
|
259
|
+
end
|
|
260
|
+
|
|
247
261
|
# Note: Do not override if you don't know what you are doing.
|
|
248
262
|
def can_lock?(spec)
|
|
249
263
|
spec.source == self
|
|
@@ -21,17 +21,11 @@ module Bundler
|
|
|
21
21
|
base = SpecSet.new(base) unless base.is_a?(SpecSet)
|
|
22
22
|
resolver = new(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
|
|
23
23
|
result = resolver.start(requirements)
|
|
24
|
-
SpecSet.new(result)
|
|
24
|
+
SpecSet.new(result).for(requirements.reject{|dep| dep.name.end_with?("\0") })
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
|
|
28
28
|
@source_requirements = source_requirements
|
|
29
|
-
|
|
30
|
-
@index_requirements = source_requirements.each_with_object({}) do |source_requirement, index_requirements|
|
|
31
|
-
name, source = source_requirement
|
|
32
|
-
index_requirements[name] = name == :global ? source : source.specs
|
|
33
|
-
end
|
|
34
|
-
|
|
35
29
|
@base = base
|
|
36
30
|
@resolver = Molinillo::Resolver.new(self, self)
|
|
37
31
|
@search_for = {}
|
|
@@ -45,10 +39,6 @@ module Bundler
|
|
|
45
39
|
@resolving_only_for_ruby = platforms == [Gem::Platform::RUBY]
|
|
46
40
|
@gem_version_promoter = gem_version_promoter
|
|
47
41
|
@use_gvp = Bundler.feature_flag.use_gem_version_promoter_for_major_updates? || !@gem_version_promoter.major?
|
|
48
|
-
@no_aggregate_global_source = @source_requirements[:global].nil?
|
|
49
|
-
|
|
50
|
-
@variant_specific_names = []
|
|
51
|
-
@generic_names = ["Ruby\0", "RubyGems\0"]
|
|
52
42
|
end
|
|
53
43
|
|
|
54
44
|
def start(requirements)
|
|
@@ -58,7 +48,6 @@ module Bundler
|
|
|
58
48
|
verify_gemfile_dependencies_are_found!(requirements)
|
|
59
49
|
dg = @resolver.resolve(requirements, @base_dg)
|
|
60
50
|
dg.
|
|
61
|
-
tap {|resolved| validate_resolved_specs!(resolved) }.
|
|
62
51
|
map(&:payload).
|
|
63
52
|
reject {|sg| sg.name.end_with?("\0") }.
|
|
64
53
|
map(&:to_specs).
|
|
@@ -112,24 +101,14 @@ module Bundler
|
|
|
112
101
|
include Molinillo::SpecificationProvider
|
|
113
102
|
|
|
114
103
|
def dependencies_for(specification)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if @variant_specific_names.include?(specification.name)
|
|
118
|
-
@variant_specific_names |= all_dependencies.map(&:name) - @generic_names
|
|
119
|
-
else
|
|
120
|
-
generic_names, variant_specific_names = specification.partitioned_dependency_names_for_activated_platforms
|
|
121
|
-
@variant_specific_names |= variant_specific_names - @generic_names
|
|
122
|
-
@generic_names |= generic_names
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
all_dependencies
|
|
104
|
+
specification.dependencies_for_activated_platforms
|
|
126
105
|
end
|
|
127
106
|
|
|
128
107
|
def search_for(dependency_proxy)
|
|
129
108
|
platform = dependency_proxy.__platform
|
|
130
109
|
dependency = dependency_proxy.dep
|
|
131
110
|
name = dependency.name
|
|
132
|
-
|
|
111
|
+
@search_for[dependency_proxy] ||= begin
|
|
133
112
|
results = results_for(dependency, @base[name])
|
|
134
113
|
|
|
135
114
|
if vertex = @base_dg.vertex_named(name)
|
|
@@ -181,35 +160,14 @@ module Bundler
|
|
|
181
160
|
@gem_version_promoter.sort_versions(dependency, spec_groups)
|
|
182
161
|
end
|
|
183
162
|
end
|
|
184
|
-
|
|
185
|
-
unless search_result.empty?
|
|
186
|
-
specific_dependency = @variant_specific_names.include?(name)
|
|
187
|
-
return search_result unless specific_dependency
|
|
188
|
-
|
|
189
|
-
search_result.each do |sg|
|
|
190
|
-
if @generic_names.include?(name)
|
|
191
|
-
@variant_specific_names -= [name]
|
|
192
|
-
sg.activate_all_platforms!
|
|
193
|
-
else
|
|
194
|
-
sg.activate_platform!(platform)
|
|
195
|
-
end
|
|
196
|
-
end
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
search_result
|
|
200
163
|
end
|
|
201
164
|
|
|
202
165
|
def index_for(dependency)
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
dependency.all_sources.each {|s| idx.add_source(s.specs) }
|
|
209
|
-
end
|
|
210
|
-
else
|
|
211
|
-
@index_requirements[:global]
|
|
212
|
-
end
|
|
166
|
+
source_for(dependency.name).specs
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def source_for(name)
|
|
170
|
+
@source_requirements[name] || @source_requirements[:default]
|
|
213
171
|
end
|
|
214
172
|
|
|
215
173
|
def results_for(dependency, base)
|
|
@@ -240,23 +198,10 @@ module Bundler
|
|
|
240
198
|
dependencies.map(&:dep) == other_dependencies.map(&:dep)
|
|
241
199
|
end
|
|
242
200
|
|
|
243
|
-
def relevant_sources_for_vertex(vertex)
|
|
244
|
-
if vertex.root?
|
|
245
|
-
[@source_requirements[vertex.name]]
|
|
246
|
-
elsif @no_aggregate_global_source
|
|
247
|
-
vertex.recursive_predecessors.map do |v|
|
|
248
|
-
@source_requirements[v.name]
|
|
249
|
-
end.compact << @source_requirements[:default]
|
|
250
|
-
else
|
|
251
|
-
[]
|
|
252
|
-
end
|
|
253
|
-
end
|
|
254
|
-
|
|
255
201
|
def sort_dependencies(dependencies, activated, conflicts)
|
|
256
202
|
dependencies.sort_by do |dependency|
|
|
257
203
|
name = name_for(dependency)
|
|
258
204
|
vertex = activated.vertex_named(name)
|
|
259
|
-
dependency.all_sources = relevant_sources_for_vertex(vertex)
|
|
260
205
|
[
|
|
261
206
|
@base_dg.vertex_named(name) ? 0 : 1,
|
|
262
207
|
vertex.payload ? 0 : 1,
|
|
@@ -398,7 +343,7 @@ module Bundler
|
|
|
398
343
|
if other_bundler_required
|
|
399
344
|
o << "\n\n"
|
|
400
345
|
|
|
401
|
-
candidate_specs =
|
|
346
|
+
candidate_specs = source_for(:default_bundler).specs.search(conflict_dependency)
|
|
402
347
|
if candidate_specs.any?
|
|
403
348
|
target_version = candidate_specs.last.version
|
|
404
349
|
new_command = [File.basename($PROGRAM_NAME), "_#{target_version}_", *ARGV].join(" ")
|
|
@@ -415,11 +360,7 @@ module Bundler
|
|
|
415
360
|
elsif !conflict.existing
|
|
416
361
|
o << "\n"
|
|
417
362
|
|
|
418
|
-
|
|
419
|
-
[conflict.requirement.source]
|
|
420
|
-
else
|
|
421
|
-
conflict.requirement.all_sources
|
|
422
|
-
end.compact.map(&:to_s).uniq.sort
|
|
363
|
+
relevant_source = conflict.requirement.source || source_for(name)
|
|
423
364
|
|
|
424
365
|
metadata_requirement = name.end_with?("\0")
|
|
425
366
|
|
|
@@ -432,12 +373,10 @@ module Bundler
|
|
|
432
373
|
end
|
|
433
374
|
o << " "
|
|
434
375
|
|
|
435
|
-
o << if
|
|
436
|
-
"
|
|
437
|
-
elsif metadata_requirement
|
|
438
|
-
"is not available in #{relevant_sources.join(" or ")}"
|
|
376
|
+
o << if metadata_requirement
|
|
377
|
+
"is not available in #{relevant_source}"
|
|
439
378
|
else
|
|
440
|
-
"in
|
|
379
|
+
"in #{relevant_source}.\n"
|
|
441
380
|
end
|
|
442
381
|
end
|
|
443
382
|
end,
|
|
@@ -451,27 +390,5 @@ module Bundler
|
|
|
451
390
|
end
|
|
452
391
|
)
|
|
453
392
|
end
|
|
454
|
-
|
|
455
|
-
def validate_resolved_specs!(resolved_specs)
|
|
456
|
-
resolved_specs.each do |v|
|
|
457
|
-
name = v.name
|
|
458
|
-
sources = relevant_sources_for_vertex(v)
|
|
459
|
-
next unless sources.any?
|
|
460
|
-
if default_index = sources.index(@source_requirements[:default])
|
|
461
|
-
sources.delete_at(default_index)
|
|
462
|
-
end
|
|
463
|
-
sources.reject! {|s| s.specs.search(name).empty? }
|
|
464
|
-
sources.uniq!
|
|
465
|
-
next if sources.size <= 1
|
|
466
|
-
|
|
467
|
-
msg = ["The gem '#{name}' was found in multiple relevant sources."]
|
|
468
|
-
msg.concat sources.map {|s| " * #{s}" }.sort
|
|
469
|
-
msg << "You #{@no_aggregate_global_source ? :must : :should} add this gem to the source block for the source you wish it to be installed from."
|
|
470
|
-
msg = msg.join("\n")
|
|
471
|
-
|
|
472
|
-
raise SecurityError, msg if @no_aggregate_global_source
|
|
473
|
-
Bundler.ui.warn "Warning: #{msg}"
|
|
474
|
-
end
|
|
475
|
-
end
|
|
476
393
|
end
|
|
477
394
|
end
|