rubygems-update 3.2.17 → 3.2.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/Manifest.txt +3 -0
- data/Rakefile +6 -6
- data/bundler/CHANGELOG.md +54 -0
- data/bundler/bundler.gemspec +2 -3
- data/bundler/lib/bundler.rb +2 -1
- 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/install.rb +6 -7
- data/bundler/lib/bundler/cli/outdated.rb +9 -10
- data/bundler/lib/bundler/definition.rb +29 -82
- data/bundler/lib/bundler/feature_flag.rb +0 -2
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -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/installer.rb +1 -8
- 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 +15 -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 +21 -3
- data/bundler/lib/bundler/source.rb +11 -0
- data/bundler/lib/bundler/source/rubygems.rb +24 -11
- data/bundler/lib/bundler/source/rubygems_aggregate.rb +64 -0
- data/bundler/lib/bundler/source_list.rb +35 -10
- data/bundler/lib/bundler/source_map.rb +58 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
- 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/config_file.rb +1 -1
- data/lib/rubygems/ext/ext_conf_builder.rb +4 -4
- data/lib/rubygems/installer.rb +4 -0
- data/lib/rubygems/request.rb +1 -1
- data/lib/rubygems/specification.rb +0 -2
- data/lib/rubygems/specification_policy.rb +5 -4
- data/lib/rubygems/test_case.rb +106 -18
- data/lib/rubygems/util/licenses.rb +107 -2
- data/rubygems-update.gemspec +1 -1
- data/setup.rb +1 -2
- 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 -11
- 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 +13 -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 -14
- 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 +12 -14
- 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: 7b503ab1ec419e166f305736955f0539fae884d2653b84d57147a5e6b63e484f
|
4
|
+
data.tar.gz: 0c1840cb14e65c6711aa0dee3baba49e4cbf725839faa2131c32647282eb5a0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bd0087496816b8814d90435c8401cba34779442f6830a9a247c50b2f39a1d7ac5accf515e7ba7ea84ea7739e619a57fa8ab06e7aacb9b7ede5029245fbb1c72
|
7
|
+
data.tar.gz: 3500016861f8abbd10d16e6d37d674430d4cfa709fd5769b12f0fdbfea8b2059dba86234968b49c4f66e1d74b784c570511c468ed6528bb87f3b09bb9b5f775a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,42 @@
|
|
1
|
+
# 3.2.21 / 2021-06-23
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Fix typo in OpenSSL detection. Pull request #4679 by osyoyu
|
6
|
+
* Add the most recent licenses from spdx.org. Pull request #4662 by nobu
|
7
|
+
* Simplify setup.rb code to allow installing rubygems from source on
|
8
|
+
truffleruby 21.0 and 21.1. Pull request #4624 by deivid-rodriguez
|
9
|
+
|
10
|
+
## Bug fixes:
|
11
|
+
|
12
|
+
* Create credentials folder when setting API keys if not there yet. Pull
|
13
|
+
request #4665 by deivid-rodriguez
|
14
|
+
|
15
|
+
# 3.2.20 / 2021-06-11
|
16
|
+
|
17
|
+
## Security fixes:
|
18
|
+
|
19
|
+
* Verify plaform before installing to avoid potential remote code
|
20
|
+
execution. Pull request #4667 by sonalkr132
|
21
|
+
|
22
|
+
## Enhancements:
|
23
|
+
|
24
|
+
* Add better specification policy error description. Pull request #4658 by
|
25
|
+
ceritium
|
26
|
+
|
27
|
+
# 3.2.19 / 2021-05-31
|
28
|
+
|
29
|
+
## Enhancements:
|
30
|
+
|
31
|
+
* Fix `gem help build` output format. Pull request #4613 by tnir
|
32
|
+
|
33
|
+
# 3.2.18 / 2021-05-25
|
34
|
+
|
35
|
+
## Enhancements:
|
36
|
+
|
37
|
+
* Don't leave temporary directory around when building extensions to
|
38
|
+
improve build reproducibility. Pull request #4610 by baloo
|
39
|
+
|
1
40
|
# 3.2.17 / 2021-05-05
|
2
41
|
|
3
42
|
## 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
|
|
@@ -388,6 +383,11 @@ task :check_manifest do
|
|
388
383
|
end
|
389
384
|
end
|
390
385
|
|
386
|
+
desc "Update License list from SPDX.org"
|
387
|
+
task :update_licenses do
|
388
|
+
load "util/generate_spdx_license_list.rb"
|
389
|
+
end
|
390
|
+
|
391
391
|
namespace :bundler do
|
392
392
|
task :build_metadata do
|
393
393
|
chdir('bundler') { sh "rake build_metadata" }
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,57 @@
|
|
1
|
+
# 2.2.21 (June 23, 2021)
|
2
|
+
|
3
|
+
## Security fixes:
|
4
|
+
|
5
|
+
- Auto-update insecure lockfile to split GEM source sections whenever possible [#4647](https://github.com/rubygems/rubygems/pull/4647)
|
6
|
+
|
7
|
+
## Enhancements:
|
8
|
+
|
9
|
+
- Use a more limited number of threads when fetching in parallel from the Compact Index API [#4670](https://github.com/rubygems/rubygems/pull/4670)
|
10
|
+
- Update TODO link in bundle gem template to https [#4671](https://github.com/rubygems/rubygems/pull/4671)
|
11
|
+
|
12
|
+
## Bug fixes:
|
13
|
+
|
14
|
+
- Fix `bundle install --local` hitting the network when `cache_all_platforms` configured [#4677](https://github.com/rubygems/rubygems/pull/4677)
|
15
|
+
|
16
|
+
# 2.2.20 (June 11, 2021)
|
17
|
+
|
18
|
+
## Enhancements:
|
19
|
+
|
20
|
+
- Don't print bug report template on server side errors [#4663](https://github.com/rubygems/rubygems/pull/4663)
|
21
|
+
- Don't load `resolv` unnecessarily [#4640](https://github.com/rubygems/rubygems/pull/4640)
|
22
|
+
|
23
|
+
## Bug fixes:
|
24
|
+
|
25
|
+
- Fix `bundle outdated` edge case [#4648](https://github.com/rubygems/rubygems/pull/4648)
|
26
|
+
- Fix `bundle check` with scoped rubygems sources [#4639](https://github.com/rubygems/rubygems/pull/4639)
|
27
|
+
|
28
|
+
## Performance:
|
29
|
+
|
30
|
+
- 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)
|
31
|
+
|
32
|
+
# 2.2.19 (May 31, 2021)
|
33
|
+
|
34
|
+
## Bug fixes:
|
35
|
+
|
36
|
+
- Restore support for configuration keys with dashes [#4582](https://github.com/rubygems/rubygems/pull/4582)
|
37
|
+
- Fix some cached gems being unintentionally ignored when using rubygems 3.2.18 [#4623](https://github.com/rubygems/rubygems/pull/4623)
|
38
|
+
|
39
|
+
# 2.2.18 (May 25, 2021)
|
40
|
+
|
41
|
+
## Security fixes:
|
42
|
+
|
43
|
+
- Fix dependency confusion issues with implicit dependencies [#4609](https://github.com/rubygems/rubygems/pull/4609)
|
44
|
+
|
45
|
+
## Enhancements:
|
46
|
+
|
47
|
+
- Use simpler notation for generated `required_ruby_version` [#4598](https://github.com/rubygems/rubygems/pull/4598)
|
48
|
+
- Undeprecate bundle show [#4586](https://github.com/rubygems/rubygems/pull/4586)
|
49
|
+
- Make sure link to new issue uses the proper template [#4592](https://github.com/rubygems/rubygems/pull/4592)
|
50
|
+
|
51
|
+
## Bug fixes:
|
52
|
+
|
53
|
+
- Fix platform specific gems being removed from the lockfile [#4580](https://github.com/rubygems/rubygems/pull/4580)
|
54
|
+
|
1
55
|
# 2.2.17 (May 5, 2021)
|
2
56
|
|
3
57
|
## 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__)
|
@@ -197,7 +198,7 @@ module Bundler
|
|
197
198
|
|
198
199
|
def frozen_bundle?
|
199
200
|
frozen = settings[:deployment]
|
200
|
-
frozen ||= settings[:frozen]
|
201
|
+
frozen ||= settings[:frozen]
|
201
202
|
frozen
|
202
203
|
end
|
203
204
|
|
@@ -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-23".freeze
|
8
|
+
@git_commit_sha = "0b5db72094".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."
|
@@ -33,12 +33,8 @@ module Bundler
|
|
33
33
|
|
34
34
|
options[:local] = true if Bundler.app_cache.exist?
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
else
|
39
|
-
Bundler.settings.set_command_option :deployment, true if options[:deployment]
|
40
|
-
Bundler.settings.set_command_option :frozen, true if options[:frozen]
|
41
|
-
end
|
36
|
+
Bundler.settings.set_command_option :deployment, true if options[:deployment]
|
37
|
+
Bundler.settings.set_command_option :frozen, true if options[:frozen]
|
42
38
|
end
|
43
39
|
|
44
40
|
# When install is called with --no-deployment, disable deployment mode
|
@@ -62,7 +58,10 @@ module Bundler
|
|
62
58
|
definition.validate_runtime!
|
63
59
|
|
64
60
|
installer = Installer.install(Bundler.root, definition, options)
|
65
|
-
|
61
|
+
|
62
|
+
Bundler.settings.temporary(:cache_all_platforms => options[:local] ? false : Bundler.settings[:cache_all_platforms]) do
|
63
|
+
Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
|
64
|
+
end
|
66
65
|
|
67
66
|
Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
|
68
67
|
Bundler::CLI::Common.output_without_groups_message(:install)
|
@@ -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)
|
@@ -107,12 +107,14 @@ module Bundler
|
|
107
107
|
end
|
108
108
|
|
109
109
|
@locked_gem_sources = @locked_sources.select {|s| s.is_a?(Source::Rubygems) }
|
110
|
-
@
|
110
|
+
@multisource_allowed = @locked_gem_sources.any?(&:multiple_remotes?) && (sources.aggregate_global_source? || Bundler.frozen_bundle?)
|
111
111
|
|
112
|
-
|
113
|
-
|
112
|
+
if @multisource_allowed
|
113
|
+
unless sources.aggregate_global_source?
|
114
|
+
msg = "Your lockfile contains a single rubygems source section with multiple remotes, which is insecure. Make sure you run `bundle install` in non frozen mode and commit the result to make your lockfile secure."
|
114
115
|
|
115
|
-
|
116
|
+
Bundler::SharedHelpers.major_deprecation 2, msg
|
117
|
+
end
|
116
118
|
|
117
119
|
@sources.merged_gem_lockfile_sections!
|
118
120
|
end
|
@@ -156,8 +158,14 @@ module Bundler
|
|
156
158
|
end
|
157
159
|
end
|
158
160
|
|
159
|
-
def
|
160
|
-
@
|
161
|
+
def multisource_allowed?
|
162
|
+
@multisource_allowed
|
163
|
+
end
|
164
|
+
|
165
|
+
def resolve_only_locally!
|
166
|
+
@remote = false
|
167
|
+
sources.local_only!
|
168
|
+
resolve
|
161
169
|
end
|
162
170
|
|
163
171
|
def resolve_with_cache!
|
@@ -219,7 +227,6 @@ module Bundler
|
|
219
227
|
Bundler.ui.debug "The definition is missing #{missing.map(&:full_name)}"
|
220
228
|
true
|
221
229
|
rescue BundlerError => e
|
222
|
-
@index = nil
|
223
230
|
@resolve = nil
|
224
231
|
@specs = nil
|
225
232
|
@gem_version_promoter = nil
|
@@ -282,50 +289,6 @@ module Bundler
|
|
282
289
|
end
|
283
290
|
end
|
284
291
|
|
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
292
|
def has_rubygems_remotes?
|
330
293
|
sources.rubygems_sources.any? {|s| s.remotes.any? }
|
331
294
|
end
|
@@ -532,14 +495,6 @@ module Bundler
|
|
532
495
|
end
|
533
496
|
end
|
534
497
|
|
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
498
|
attr_reader :sources
|
544
499
|
private :sources
|
545
500
|
|
@@ -556,6 +511,10 @@ module Bundler
|
|
556
511
|
|
557
512
|
private
|
558
513
|
|
514
|
+
def precompute_source_requirements_for_indirect_dependencies?
|
515
|
+
sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && !sources.aggregate_global_source?
|
516
|
+
end
|
517
|
+
|
559
518
|
def current_ruby_platform_locked?
|
560
519
|
return false unless generic_local_platform == Gem::Platform::RUBY
|
561
520
|
|
@@ -670,7 +629,7 @@ module Bundler
|
|
670
629
|
end
|
671
630
|
|
672
631
|
def converge_rubygems_sources
|
673
|
-
return false
|
632
|
+
return false unless multisource_allowed?
|
674
633
|
|
675
634
|
return false if locked_gem_sources.empty?
|
676
635
|
|
@@ -681,9 +640,9 @@ module Bundler
|
|
681
640
|
changes = false
|
682
641
|
|
683
642
|
# If there is a RubyGems source in both
|
684
|
-
locked_gem_sources.each do |
|
643
|
+
locked_gem_sources.each do |locked_gem_source|
|
685
644
|
# Merge the remotes from the Gemfile into the Gemfile.lock
|
686
|
-
changes |=
|
645
|
+
changes |= locked_gem_source.replace_remotes(actual_remotes, Bundler.settings[:allow_deployment_source_credential_changes])
|
687
646
|
end
|
688
647
|
|
689
648
|
changes
|
@@ -902,26 +861,22 @@ module Bundler
|
|
902
861
|
end
|
903
862
|
|
904
863
|
def source_requirements
|
905
|
-
# Load all specs from remote sources
|
906
|
-
index
|
907
|
-
|
908
864
|
# Record the specs available in each gem's source, so that those
|
909
865
|
# specs will be available later when the resolver knows where to
|
910
866
|
# look for that gemspec (or its dependencies)
|
911
|
-
source_requirements =
|
867
|
+
source_requirements = if precompute_source_requirements_for_indirect_dependencies?
|
868
|
+
{ :default => sources.default_source }.merge(source_map.all_requirements)
|
869
|
+
else
|
870
|
+
{ :default => Source::RubygemsAggregate.new(sources, source_map) }.merge(source_map.direct_requirements)
|
871
|
+
end
|
912
872
|
metadata_dependencies.each do |dep|
|
913
873
|
source_requirements[dep.name] = sources.metadata_source
|
914
874
|
end
|
915
|
-
source_requirements[:
|
916
|
-
source_requirements[:default_bundler] = source_requirements["bundler"] || source_requirements[:default]
|
875
|
+
source_requirements[:default_bundler] = source_requirements["bundler"] || sources.default_source
|
917
876
|
source_requirements["bundler"] = sources.metadata_source # needs to come last to override
|
918
877
|
source_requirements
|
919
878
|
end
|
920
879
|
|
921
|
-
def pinned_spec_names(skip = nil)
|
922
|
-
dependency_source_requirements.reject {|_, source| source == skip }.keys
|
923
|
-
end
|
924
|
-
|
925
880
|
def requested_groups
|
926
881
|
groups - Bundler.settings[:without] - @optional_groups + Bundler.settings[:with]
|
927
882
|
end
|
@@ -977,16 +932,8 @@ module Bundler
|
|
977
932
|
Bundler.settings[:allow_deployment_source_credential_changes] && source.equivalent_remotes?(sources.rubygems_remotes)
|
978
933
|
end
|
979
934
|
|
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
|
935
|
+
def source_map
|
936
|
+
@source_map ||= SourceMap.new(sources, dependencies)
|
990
937
|
end
|
991
938
|
end
|
992
939
|
end
|