bundler 1.17.2 → 2.2.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2095 -1251
- data/LICENSE.md +18 -19
- data/README.md +10 -11
- data/bundler.gemspec +10 -28
- data/exe/bundle +22 -3
- data/lib/bundler/build_metadata.rb +4 -12
- data/lib/bundler/capistrano.rb +4 -4
- data/lib/bundler/cli/add.rb +28 -16
- data/lib/bundler/cli/binstubs.rb +6 -2
- data/lib/bundler/cli/cache.rb +24 -17
- data/lib/bundler/cli/check.rb +4 -2
- data/lib/bundler/cli/clean.rb +1 -1
- data/lib/bundler/cli/common.rb +39 -13
- data/lib/bundler/cli/config.rb +161 -86
- data/lib/bundler/cli/console.rb +1 -1
- data/lib/bundler/cli/doctor.rb +20 -9
- data/lib/bundler/cli/exec.rb +8 -25
- data/lib/bundler/cli/fund.rb +36 -0
- data/lib/bundler/cli/gem.rb +213 -32
- data/lib/bundler/cli/info.rb +42 -7
- data/lib/bundler/cli/init.rb +2 -2
- data/lib/bundler/cli/inject.rb +1 -1
- data/lib/bundler/cli/install.rb +34 -44
- data/lib/bundler/cli/issue.rb +8 -7
- data/lib/bundler/cli/list.rb +19 -11
- data/lib/bundler/cli/lock.rb +5 -1
- data/lib/bundler/cli/open.rb +11 -8
- data/lib/bundler/cli/outdated.rb +142 -118
- data/lib/bundler/cli/plugin.rb +19 -2
- data/lib/bundler/cli/pristine.rb +6 -1
- data/lib/bundler/cli/remove.rb +1 -2
- data/lib/bundler/cli/show.rb +2 -2
- data/lib/bundler/cli/update.rb +43 -16
- data/lib/bundler/cli.rb +211 -150
- data/lib/bundler/compact_index_client/cache.rb +6 -14
- data/lib/bundler/compact_index_client/gem_parser.rb +28 -0
- data/lib/bundler/compact_index_client/updater.rb +15 -28
- data/lib/bundler/compact_index_client.rb +28 -12
- data/lib/bundler/current_ruby.rb +14 -11
- data/lib/bundler/definition.rb +207 -368
- data/lib/bundler/dep_proxy.rb +16 -9
- data/lib/bundler/dependency.rb +19 -14
- data/lib/bundler/deployment.rb +1 -1
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/dsl.rb +81 -81
- data/lib/bundler/endpoint_specification.rb +1 -1
- data/lib/bundler/env.rb +9 -14
- data/lib/bundler/environment_preserver.rb +29 -3
- data/lib/bundler/errors.rb +20 -3
- data/lib/bundler/feature_flag.rb +14 -33
- data/lib/bundler/fetcher/base.rb +1 -1
- data/lib/bundler/fetcher/compact_index.rb +28 -14
- data/lib/bundler/fetcher/dependency.rb +1 -1
- data/lib/bundler/fetcher/downloader.rb +14 -8
- data/lib/bundler/fetcher/index.rb +8 -8
- data/lib/bundler/fetcher.rb +22 -17
- data/lib/bundler/friendly_errors.rb +29 -48
- data/lib/bundler/gem_helper.rb +79 -43
- data/lib/bundler/gem_helpers.rb +38 -29
- data/lib/bundler/gem_tasks.rb +1 -1
- data/lib/bundler/gem_version_promoter.rb +5 -5
- data/lib/bundler/graph.rb +3 -3
- data/lib/bundler/index.rb +9 -9
- data/lib/bundler/injector.rb +33 -13
- data/lib/bundler/inline.rb +41 -30
- data/lib/bundler/installer/gem_installer.rb +9 -18
- data/lib/bundler/installer/parallel_installer.rb +50 -33
- data/lib/bundler/installer/standalone.rb +30 -11
- data/lib/bundler/installer.rb +39 -66
- data/lib/bundler/lazy_specification.rb +63 -28
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +19 -52
- data/lib/bundler/{ssl_certs → man}/.document +0 -0
- data/{man → lib/bundler/man}/bundle-add.1 +10 -2
- data/{man/bundle-add.ronn → lib/bundler/man/bundle-add.1.ronn} +7 -1
- data/{man → lib/bundler/man}/bundle-binstubs.1 +6 -4
- data/{man/bundle-binstubs.ronn → lib/bundler/man/bundle-binstubs.1.ronn} +3 -5
- data/lib/bundler/man/bundle-cache.1 +55 -0
- data/{man/bundle-package.ronn → lib/bundler/man/bundle-cache.1.ronn} +15 -15
- data/{man → lib/bundler/man}/bundle-check.1 +1 -1
- data/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-clean.1 +1 -1
- data/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-config.1 +59 -60
- data/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +77 -78
- data/{man → lib/bundler/man}/bundle-doctor.1 +1 -1
- data/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-exec.1 +2 -2
- data/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +1 -1
- data/{man → lib/bundler/man}/bundle-gem.1 +38 -3
- data/{man/bundle-gem.ronn → lib/bundler/man/bundle-gem.1.ronn} +46 -7
- data/{man → lib/bundler/man}/bundle-info.1 +1 -1
- data/{man/bundle-info.ronn → lib/bundler/man/bundle-info.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-init.1 +2 -2
- data/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +1 -1
- data/{man → lib/bundler/man}/bundle-inject.1 +1 -1
- data/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-install.1 +37 -7
- data/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +34 -7
- data/{man → lib/bundler/man}/bundle-list.1 +7 -7
- data/{man/bundle-list.ronn → lib/bundler/man/bundle-list.1.ronn} +6 -6
- data/{man → lib/bundler/man}/bundle-lock.1 +1 -1
- data/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-open.1 +1 -1
- data/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-outdated.1 +1 -1
- data/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-platform.1 +1 -1
- data/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-pristine.1 +1 -1
- data/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-remove.1 +1 -1
- data/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-show.1 +1 -1
- data/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-update.1 +7 -7
- data/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +6 -6
- data/{man → lib/bundler/man}/bundle-viz.1 +1 -1
- data/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle.1 +7 -3
- data/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +5 -2
- data/{man → lib/bundler/man}/gemfile.5 +44 -21
- data/{man → lib/bundler/man}/gemfile.5.ronn +24 -20
- data/{man → lib/bundler/man}/index.txt +1 -1
- data/lib/bundler/match_platform.rb +1 -1
- data/lib/bundler/mirror.rb +5 -5
- data/lib/bundler/plugin/api/source.rb +27 -7
- data/lib/bundler/plugin/api.rb +1 -1
- data/lib/bundler/plugin/dsl.rb +1 -1
- data/lib/bundler/plugin/index.rb +27 -4
- data/lib/bundler/plugin/installer/rubygems.rb +1 -1
- data/lib/bundler/plugin/installer.rb +35 -22
- data/lib/bundler/plugin/source_list.rb +5 -1
- data/lib/bundler/plugin.rb +100 -42
- data/lib/bundler/psyched_yaml.rb +0 -15
- data/lib/bundler/remote_specification.rb +5 -4
- data/lib/bundler/resolver/spec_group.rb +57 -53
- data/lib/bundler/resolver.rb +127 -113
- data/lib/bundler/retry.rb +4 -4
- data/lib/bundler/ruby_version.rb +5 -20
- data/lib/bundler/rubygems_ext.rb +103 -79
- data/lib/bundler/rubygems_gem_installer.rb +69 -8
- data/lib/bundler/rubygems_integration.rb +181 -446
- data/lib/bundler/runtime.rb +24 -34
- data/lib/bundler/settings.rb +159 -110
- data/lib/bundler/setup.rb +11 -12
- data/lib/bundler/shared_helpers.rb +56 -90
- data/lib/bundler/similarity_detector.rb +3 -3
- data/lib/bundler/source/git/git_proxy.rb +106 -105
- data/lib/bundler/source/git.rb +66 -39
- data/lib/bundler/source/metadata.rb +9 -9
- data/lib/bundler/source/path/installer.rb +10 -10
- data/lib/bundler/source/path.rb +23 -12
- data/lib/bundler/source/rubygems/remote.rb +3 -4
- data/lib/bundler/source/rubygems.rb +136 -120
- data/lib/bundler/source/rubygems_aggregate.rb +68 -0
- data/lib/bundler/source.rb +27 -6
- data/lib/bundler/source_list.rb +101 -66
- data/lib/bundler/source_map.rb +58 -0
- data/lib/bundler/spec_set.rb +49 -53
- data/lib/bundler/stub_specification.rb +40 -34
- data/lib/bundler/templates/Executable.bundler +24 -15
- data/lib/bundler/templates/Gemfile +1 -1
- data/lib/bundler/templates/gems.rb +1 -1
- data/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
- data/lib/bundler/templates/newgem/Gemfile.tt +19 -2
- data/lib/bundler/templates/newgem/README.md.tt +7 -5
- data/lib/bundler/templates/newgem/Rakefile.tt +23 -5
- data/lib/bundler/templates/newgem/bin/console.tt +1 -0
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +13 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +2 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +27 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +4 -2
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +29 -40
- data/lib/bundler/templates/newgem/rubocop.yml.tt +13 -0
- data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -1
- data/lib/bundler/templates/newgem/standard.yml.tt +2 -0
- data/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/newgem_test.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt +6 -0
- data/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- data/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- data/lib/bundler/templates/newgem/travis.yml.tt +0 -1
- data/lib/bundler/ui/rg_proxy.rb +1 -1
- data/lib/bundler/ui/shell.rb +7 -11
- data/lib/bundler/ui.rb +3 -3
- data/lib/bundler/uri_credentials_filter.rb +10 -4
- data/lib/bundler/vendor/.document +1 -0
- data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +174 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +57 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +126 -0
- data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +273 -147
- data/lib/bundler/vendor/molinillo/LICENSE +9 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +6 -6
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +3 -3
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +39 -11
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +38 -6
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +4 -4
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +12 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +53 -51
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +2 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +5 -6
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +40 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +53 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +79 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +302 -462
- data/lib/bundler/vendor/thor/LICENSE.md +20 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +3 -2
- data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +7 -17
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +20 -9
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +19 -8
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +28 -13
- data/lib/bundler/vendor/thor/lib/thor/base.rb +63 -43
- data/lib/bundler/vendor/thor/lib/thor/command.rb +21 -14
- data/lib/bundler/vendor/thor/lib/thor/error.rb +78 -0
- data/lib/bundler/vendor/thor/lib/thor/group.rb +3 -3
- data/lib/bundler/vendor/thor/lib/thor/invocation.rb +1 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +6 -6
- data/lib/bundler/vendor/thor/lib/thor/line_editor.rb +2 -2
- data/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +7 -3
- data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +20 -7
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +21 -5
- data/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -4
- data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +1 -0
- data/lib/bundler/vendor/thor/lib/thor/runner.rb +15 -14
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +65 -8
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +10 -2
- data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +3 -3
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +4 -4
- data/lib/bundler/vendor/thor/lib/thor/util.rb +18 -2
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor.rb +16 -9
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +154 -0
- data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
- data/lib/bundler/vendor/tsort/lib/tsort.rb +453 -0
- data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +744 -0
- data/lib/bundler/vendor/uri/lib/uri/file.rb +94 -0
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +1568 -0
- data/lib/bundler/vendor/uri/lib/uri/http.rb +88 -0
- data/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
- data/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
- data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +21 -0
- data/lib/bundler/vendor/uri/lib/uri/mailto.rb +294 -0
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +125 -0
- data/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
- data/lib/bundler/vendor/uri/lib/uri.rb +104 -0
- data/lib/bundler/vendored_fileutils.rb +1 -6
- data/lib/bundler/vendored_molinillo.rb +1 -1
- data/lib/bundler/vendored_persistent.rb +7 -12
- data/lib/bundler/vendored_thor.rb +2 -2
- data/lib/bundler/vendored_tmpdir.rb +4 -0
- data/lib/bundler/vendored_tsort.rb +4 -0
- data/lib/bundler/vendored_uri.rb +4 -0
- data/lib/bundler/version.rb +1 -20
- data/lib/bundler/version_ranges.rb +51 -5
- data/lib/bundler/vlad.rb +2 -2
- data/lib/bundler/worker.rb +21 -8
- data/lib/bundler/yaml_serializer.rb +3 -4
- data/lib/bundler.rb +248 -118
- metadata +115 -190
- data/exe/bundle_ruby +0 -60
- data/lib/bundler/cli/package.rb +0 -49
- data/lib/bundler/compatibility_guard.rb +0 -14
- data/lib/bundler/gem_remote_fetcher.rb +0 -43
- data/lib/bundler/ssl_certs/certificate_manager.rb +0 -66
- data/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +0 -21
- data/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
- data/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
- data/lib/bundler/templates/newgem/test/test_helper.rb.tt +0 -4
- data/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +0 -26
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb +0 -27
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb +0 -129
- data/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +0 -12
- data/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +0 -129
- data/man/bundle-add.1.txt +0 -52
- data/man/bundle-binstubs.1.txt +0 -48
- data/man/bundle-check.1.txt +0 -33
- data/man/bundle-clean.1.txt +0 -26
- data/man/bundle-config.1.txt +0 -529
- data/man/bundle-doctor.1.txt +0 -44
- data/man/bundle-exec.1.txt +0 -178
- data/man/bundle-gem.1.txt +0 -91
- data/man/bundle-info.1.txt +0 -21
- data/man/bundle-init.1.txt +0 -34
- data/man/bundle-inject.1.txt +0 -32
- data/man/bundle-install.1.txt +0 -396
- data/man/bundle-list.1.txt +0 -43
- data/man/bundle-lock.1.txt +0 -93
- data/man/bundle-open.1.txt +0 -29
- data/man/bundle-outdated.1.txt +0 -131
- data/man/bundle-package.1 +0 -55
- data/man/bundle-package.1.txt +0 -79
- data/man/bundle-platform.1.txt +0 -57
- data/man/bundle-pristine.1.txt +0 -44
- data/man/bundle-remove.1.txt +0 -34
- data/man/bundle-show.1.txt +0 -27
- data/man/bundle-update.1.txt +0 -391
- data/man/bundle-viz.1.txt +0 -39
- data/man/bundle.1.txt +0 -113
- data/man/gemfile.5.txt +0 -653
@@ -1,12 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "uri"
|
4
3
|
require "rubygems/user_interaction"
|
5
4
|
|
6
5
|
module Bundler
|
7
6
|
class Source
|
8
7
|
class Rubygems < Source
|
9
|
-
autoload :Remote, "
|
8
|
+
autoload :Remote, File.expand_path("rubygems/remote", __dir__)
|
10
9
|
|
11
10
|
# Use the API when installing less than X gems
|
12
11
|
API_REQUEST_LIMIT = 500
|
@@ -21,18 +20,38 @@ module Bundler
|
|
21
20
|
@dependency_names = []
|
22
21
|
@allow_remote = false
|
23
22
|
@allow_cached = false
|
23
|
+
@allow_local = options["allow_local"] || false
|
24
24
|
@caches = [cache_path, *Bundler.rubygems.gem_cache]
|
25
25
|
|
26
|
-
Array(options["remotes"]
|
26
|
+
Array(options["remotes"]).reverse_each {|r| add_remote(r) }
|
27
|
+
end
|
28
|
+
|
29
|
+
def local_only!
|
30
|
+
@specs = nil
|
31
|
+
@allow_local = true
|
32
|
+
@allow_cached = false
|
33
|
+
@allow_remote = false
|
34
|
+
end
|
35
|
+
|
36
|
+
def local!
|
37
|
+
return if @allow_local
|
38
|
+
|
39
|
+
@specs = nil
|
40
|
+
@allow_local = true
|
27
41
|
end
|
28
42
|
|
29
43
|
def remote!
|
44
|
+
return if @allow_remote
|
45
|
+
|
30
46
|
@specs = nil
|
31
47
|
@allow_remote = true
|
32
48
|
end
|
33
49
|
|
34
50
|
def cached!
|
51
|
+
return if @allow_cached
|
52
|
+
|
35
53
|
@specs = nil
|
54
|
+
@allow_local = true
|
36
55
|
@allow_cached = true
|
37
56
|
end
|
38
57
|
|
@@ -50,9 +69,17 @@ module Bundler
|
|
50
69
|
o.is_a?(Rubygems) && (o.credless_remotes - credless_remotes).empty?
|
51
70
|
end
|
52
71
|
|
72
|
+
def multiple_remotes?
|
73
|
+
@remotes.size > 1
|
74
|
+
end
|
75
|
+
|
76
|
+
def no_remotes?
|
77
|
+
@remotes.size == 0
|
78
|
+
end
|
79
|
+
|
53
80
|
def can_lock?(spec)
|
54
|
-
return super
|
55
|
-
spec.source
|
81
|
+
return super unless multiple_remotes?
|
82
|
+
include?(spec.source)
|
56
83
|
end
|
57
84
|
|
58
85
|
def options
|
@@ -74,12 +101,27 @@ module Bundler
|
|
74
101
|
def to_s
|
75
102
|
if remotes.empty?
|
76
103
|
"locally installed gems"
|
77
|
-
|
78
|
-
|
104
|
+
elsif @allow_remote && @allow_cached && @allow_local
|
105
|
+
"rubygems repository #{remote_names}, cached gems or installed locally"
|
106
|
+
elsif @allow_remote && @allow_local
|
79
107
|
"rubygems repository #{remote_names} or installed locally"
|
108
|
+
elsif @allow_remote
|
109
|
+
"rubygems repository #{remote_names}"
|
110
|
+
elsif @allow_cached && @allow_local
|
111
|
+
"cached gems or installed locally"
|
112
|
+
else
|
113
|
+
"locally installed gems"
|
80
114
|
end
|
81
115
|
end
|
82
|
-
|
116
|
+
|
117
|
+
def identifier
|
118
|
+
if remotes.empty?
|
119
|
+
"locally installed gems"
|
120
|
+
else
|
121
|
+
"rubygems repository #{remote_names}"
|
122
|
+
end
|
123
|
+
end
|
124
|
+
alias_method :name, :identifier
|
83
125
|
|
84
126
|
def specs
|
85
127
|
@specs ||= begin
|
@@ -88,7 +130,7 @@ module Bundler
|
|
88
130
|
# small_idx.use large_idx.
|
89
131
|
idx = @allow_remote ? remote_specs.dup : Index.new
|
90
132
|
idx.use(cached_specs, :override_dupes) if @allow_cached || @allow_remote
|
91
|
-
idx.use(installed_specs, :override_dupes)
|
133
|
+
idx.use(installed_specs, :override_dupes) if @allow_local
|
92
134
|
idx
|
93
135
|
end
|
94
136
|
end
|
@@ -97,7 +139,7 @@ module Bundler
|
|
97
139
|
force = opts[:force]
|
98
140
|
ensure_builtin_gems_cached = opts[:ensure_builtin_gems_cached]
|
99
141
|
|
100
|
-
if ensure_builtin_gems_cached &&
|
142
|
+
if ensure_builtin_gems_cached && spec.default_gem?
|
101
143
|
if !cached_path(spec)
|
102
144
|
cached_built_in_gem(spec) unless spec.remote
|
103
145
|
force = true
|
@@ -120,8 +162,14 @@ module Bundler
|
|
120
162
|
uris.uniq!
|
121
163
|
Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
|
122
164
|
|
123
|
-
|
124
|
-
|
165
|
+
path = fetch_gem(spec)
|
166
|
+
begin
|
167
|
+
s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
|
168
|
+
spec.__swap__(s)
|
169
|
+
rescue Gem::Package::FormatError
|
170
|
+
Bundler.rm_rf(path)
|
171
|
+
raise
|
172
|
+
end
|
125
173
|
end
|
126
174
|
|
127
175
|
unless Bundler.settings[:no_install]
|
@@ -130,6 +178,7 @@ module Bundler
|
|
130
178
|
Bundler.ui.confirm message
|
131
179
|
|
132
180
|
path = cached_gem(spec)
|
181
|
+
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
|
133
182
|
if requires_sudo?
|
134
183
|
install_path = Bundler.tmp(spec.full_name)
|
135
184
|
bin_path = install_path.join("bin")
|
@@ -140,20 +189,19 @@ module Bundler
|
|
140
189
|
|
141
190
|
Bundler.mkdir_p bin_path, :no_sudo => true unless spec.executables.empty? || Bundler.rubygems.provides?(">= 2.7.5")
|
142
191
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
end
|
192
|
+
require_relative "../rubygems_gem_installer"
|
193
|
+
|
194
|
+
installed_spec = Bundler::RubyGemsGemInstaller.at(
|
195
|
+
path,
|
196
|
+
:install_dir => install_path.to_s,
|
197
|
+
:bin_dir => bin_path.to_s,
|
198
|
+
:ignore_dependencies => true,
|
199
|
+
:wrappers => true,
|
200
|
+
:env_shebang => true,
|
201
|
+
:build_args => opts[:build_args],
|
202
|
+
:bundler_expected_checksum => spec.respond_to?(:checksum) && spec.checksum,
|
203
|
+
:bundler_extension_cache_path => extension_cache_path(spec)
|
204
|
+
).install
|
157
205
|
spec.full_gem_path = installed_spec.full_gem_path
|
158
206
|
|
159
207
|
# SUDO HAX
|
@@ -190,12 +238,8 @@ module Bundler
|
|
190
238
|
end
|
191
239
|
|
192
240
|
def cache(spec, custom_path = nil)
|
193
|
-
|
194
|
-
|
195
|
-
else
|
196
|
-
cached_path = cached_gem(spec)
|
197
|
-
end
|
198
|
-
raise GemNotFound, "Missing gem file '#{spec.full_name}.gem'." unless cached_path
|
241
|
+
cached_path = cached_gem(spec)
|
242
|
+
raise GemNotFound, "Missing gem file '#{spec.file_name}'." unless cached_path
|
199
243
|
return if File.dirname(cached_path) == Bundler.app_cache.to_s
|
200
244
|
Bundler.ui.info " * #{File.basename(cached_path)}"
|
201
245
|
FileUtils.cp(cached_path, Bundler.app_cache(custom_path))
|
@@ -222,25 +266,16 @@ module Bundler
|
|
222
266
|
@remotes.unshift(uri) unless @remotes.include?(uri)
|
223
267
|
end
|
224
268
|
|
225
|
-
def
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
return false if other_remotes == @remotes
|
231
|
-
|
232
|
-
equivalent = allow_equivalent && equivalent_remotes?(other_remotes)
|
233
|
-
|
234
|
-
@remotes = []
|
235
|
-
other_remotes.reverse_each do |r|
|
236
|
-
add_remote r.to_s
|
269
|
+
def spec_names
|
270
|
+
if @allow_remote && dependency_api_available?
|
271
|
+
remote_specs.spec_names
|
272
|
+
else
|
273
|
+
[]
|
237
274
|
end
|
238
|
-
|
239
|
-
!equivalent
|
240
275
|
end
|
241
276
|
|
242
277
|
def unmet_deps
|
243
|
-
if @allow_remote &&
|
278
|
+
if @allow_remote && dependency_api_available?
|
244
279
|
remote_specs.unmet_dependency_names
|
245
280
|
else
|
246
281
|
[]
|
@@ -256,7 +291,7 @@ module Bundler
|
|
256
291
|
|
257
292
|
def double_check_for(unmet_dependency_names)
|
258
293
|
return unless @allow_remote
|
259
|
-
return unless
|
294
|
+
return unless dependency_api_available?
|
260
295
|
|
261
296
|
unmet_dependency_names = unmet_dependency_names.call
|
262
297
|
unless unmet_dependency_names.nil?
|
@@ -278,21 +313,32 @@ module Bundler
|
|
278
313
|
remote_specs.each do |spec|
|
279
314
|
case spec
|
280
315
|
when EndpointSpecification, Gem::Specification, StubSpecification, LazySpecification
|
281
|
-
names.concat(spec.runtime_dependencies)
|
316
|
+
names.concat(spec.runtime_dependencies.map(&:name))
|
282
317
|
when RemoteSpecification # from the full index
|
283
318
|
return nil
|
284
319
|
else
|
285
320
|
raise "unhandled spec type (#{spec.inspect})"
|
286
321
|
end
|
287
322
|
end
|
288
|
-
names.map!(&:name) if names
|
289
323
|
names
|
290
324
|
end
|
291
325
|
|
292
|
-
|
326
|
+
def dependency_api_available?
|
327
|
+
api_fetchers.any?
|
328
|
+
end
|
329
|
+
|
330
|
+
protected
|
331
|
+
|
332
|
+
def remote_names
|
333
|
+
remotes.map(&:to_s).join(", ")
|
334
|
+
end
|
293
335
|
|
294
336
|
def credless_remotes
|
295
|
-
|
337
|
+
if Bundler.settings[:allow_deployment_source_credential_changes]
|
338
|
+
remotes.map(&method(:remove_auth))
|
339
|
+
else
|
340
|
+
remotes.map(&method(:suppress_configured_credentials))
|
341
|
+
end
|
296
342
|
end
|
297
343
|
|
298
344
|
def remotes_for_spec(spec)
|
@@ -307,14 +353,17 @@ module Bundler
|
|
307
353
|
end
|
308
354
|
|
309
355
|
def cached_gem(spec)
|
310
|
-
|
311
|
-
|
312
|
-
|
356
|
+
if spec.default_gem?
|
357
|
+
cached_built_in_gem(spec)
|
358
|
+
else
|
359
|
+
cached_path(spec)
|
313
360
|
end
|
314
|
-
cached_gem
|
315
361
|
end
|
316
362
|
|
317
363
|
def cached_path(spec)
|
364
|
+
global_cache_path = download_cache_path(spec)
|
365
|
+
@caches << global_cache_path if global_cache_path
|
366
|
+
|
318
367
|
possibilities = @caches.map {|p| "#{p}/#{spec.file_name}" }
|
319
368
|
possibilities.find {|p| File.exist?(p) }
|
320
369
|
end
|
@@ -322,9 +371,10 @@ module Bundler
|
|
322
371
|
def normalize_uri(uri)
|
323
372
|
uri = uri.to_s
|
324
373
|
uri = "#{uri}/" unless uri =~ %r{/$}
|
325
|
-
|
374
|
+
require_relative "../vendored_uri"
|
375
|
+
uri = Bundler::URI(uri)
|
326
376
|
raise ArgumentError, "The source must be an absolute URI. For example:\n" \
|
327
|
-
"source 'https://rubygems.org'" if !uri.absolute? || (uri.is_a?(URI::HTTP) && uri.host.nil?)
|
377
|
+
"source 'https://rubygems.org'" if !uri.absolute? || (uri.is_a?(Bundler::URI::HTTP) && uri.host.nil?)
|
328
378
|
uri
|
329
379
|
end
|
330
380
|
|
@@ -348,7 +398,6 @@ module Bundler
|
|
348
398
|
def installed_specs
|
349
399
|
@installed_specs ||= Index.build do |idx|
|
350
400
|
Bundler.rubygems.all_specs.reverse_each do |spec|
|
351
|
-
next if spec.name == "bundler"
|
352
401
|
spec.source = self
|
353
402
|
if Bundler.rubygems.spec_missing_extensions?(spec, false)
|
354
403
|
Bundler.ui.debug "Source #{self} is ignoring #{spec} because it is missing extensions"
|
@@ -361,16 +410,12 @@ module Bundler
|
|
361
410
|
|
362
411
|
def cached_specs
|
363
412
|
@cached_specs ||= begin
|
364
|
-
idx = installed_specs.dup
|
413
|
+
idx = @allow_local ? installed_specs.dup : Index.new
|
365
414
|
|
366
415
|
Dir["#{cache_path}/*.gem"].each do |gemfile|
|
367
416
|
next if gemfile =~ /^bundler\-[\d\.]+?\.gem/
|
368
417
|
s ||= Bundler.rubygems.spec_from_gem(gemfile)
|
369
418
|
s.source = self
|
370
|
-
if Bundler.rubygems.spec_missing_extensions?(s, false)
|
371
|
-
Bundler.ui.debug "Source #{self} is ignoring #{s} because it is missing extensions"
|
372
|
-
next
|
373
|
-
end
|
374
419
|
idx << s
|
375
420
|
end
|
376
421
|
|
@@ -403,11 +448,11 @@ module Bundler
|
|
403
448
|
def fetch_names(fetchers, dependency_names, index, override_dupes)
|
404
449
|
fetchers.each do |f|
|
405
450
|
if dependency_names
|
406
|
-
Bundler.ui.info "Fetching gem metadata from #{f.uri}", Bundler.ui.debug?
|
451
|
+
Bundler.ui.info "Fetching gem metadata from #{URICredentialsFilter.credential_filtered_uri(f.uri)}", Bundler.ui.debug?
|
407
452
|
index.use f.specs_with_retry(dependency_names, self), override_dupes
|
408
453
|
Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
|
409
454
|
else
|
410
|
-
Bundler.ui.info "Fetching source index from #{f.uri}"
|
455
|
+
Bundler.ui.info "Fetching source index from #{URICredentialsFilter.credential_filtered_uri(f.uri)}"
|
411
456
|
index.use f.specs_with_retry(nil, self), override_dupes
|
412
457
|
end
|
413
458
|
end
|
@@ -418,19 +463,26 @@ module Bundler
|
|
418
463
|
|
419
464
|
spec.fetch_platform
|
420
465
|
|
421
|
-
|
422
|
-
gem_path = "#{
|
466
|
+
cache_path = download_cache_path(spec) || default_cache_path_for(rubygems_dir)
|
467
|
+
gem_path = "#{cache_path}/#{spec.file_name}"
|
468
|
+
|
469
|
+
if requires_sudo?
|
470
|
+
download_path = Bundler.tmp(spec.full_name)
|
471
|
+
download_cache_path = default_cache_path_for(download_path)
|
472
|
+
else
|
473
|
+
download_cache_path = cache_path
|
474
|
+
end
|
423
475
|
|
424
|
-
SharedHelpers.filesystem_access(
|
476
|
+
SharedHelpers.filesystem_access(download_cache_path) do |p|
|
425
477
|
FileUtils.mkdir_p(p)
|
426
478
|
end
|
427
|
-
download_gem(spec,
|
479
|
+
download_gem(spec, download_cache_path)
|
428
480
|
|
429
481
|
if requires_sudo?
|
430
|
-
SharedHelpers.filesystem_access(
|
482
|
+
SharedHelpers.filesystem_access(cache_path) do |p|
|
431
483
|
Bundler.mkdir_p(p)
|
432
484
|
end
|
433
|
-
Bundler.sudo "mv #{
|
485
|
+
Bundler.sudo "mv #{download_cache_path}/#{spec.file_name} #{gem_path}"
|
434
486
|
end
|
435
487
|
|
436
488
|
gem_path
|
@@ -438,16 +490,8 @@ module Bundler
|
|
438
490
|
Bundler.rm_rf(download_path) if requires_sudo?
|
439
491
|
end
|
440
492
|
|
441
|
-
def builtin_gem?(spec)
|
442
|
-
# Ruby 2.1, where all included gems have this summary
|
443
|
-
return true if spec.summary =~ /is bundled with Ruby/
|
444
|
-
|
445
|
-
# Ruby 2.0, where gemspecs are stored in specifications/default/
|
446
|
-
spec.loaded_from && spec.loaded_from.include?("specifications/default/")
|
447
|
-
end
|
448
|
-
|
449
493
|
def installed?(spec)
|
450
|
-
installed_specs[spec].any?
|
494
|
+
installed_specs[spec].any? && !spec.deleted_gem?
|
451
495
|
end
|
452
496
|
|
453
497
|
def requires_sudo?
|
@@ -458,11 +502,15 @@ module Bundler
|
|
458
502
|
Bundler.rubygems.gem_dir
|
459
503
|
end
|
460
504
|
|
505
|
+
def default_cache_path_for(dir)
|
506
|
+
"#{dir}/cache"
|
507
|
+
end
|
508
|
+
|
461
509
|
def cache_path
|
462
510
|
Bundler.app_cache
|
463
511
|
end
|
464
512
|
|
465
|
-
|
513
|
+
private
|
466
514
|
|
467
515
|
# Checks if the requested spec exists in the global cache. If it does,
|
468
516
|
# we copy it to the download path, and if it does not, we download it.
|
@@ -470,45 +518,13 @@ module Bundler
|
|
470
518
|
# @param [Specification] spec
|
471
519
|
# the spec we want to download or retrieve from the cache.
|
472
520
|
#
|
473
|
-
# @param [String]
|
521
|
+
# @param [String] download_cache_path
|
474
522
|
# the local directory the .gem will end up in.
|
475
523
|
#
|
476
|
-
def download_gem(spec,
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
SharedHelpers.filesystem_access(local_path) do
|
481
|
-
FileUtils.cp(cache_path, local_path)
|
482
|
-
end
|
483
|
-
else
|
484
|
-
uri = spec.remote.uri
|
485
|
-
Bundler.ui.confirm("Fetching #{version_message(spec)}")
|
486
|
-
rubygems_local_path = Bundler.rubygems.download_gem(spec, uri, download_path)
|
487
|
-
if rubygems_local_path != local_path
|
488
|
-
FileUtils.mv(rubygems_local_path, local_path)
|
489
|
-
end
|
490
|
-
cache_globally(spec, local_path)
|
491
|
-
end
|
492
|
-
end
|
493
|
-
|
494
|
-
# Checks if the requested spec exists in the global cache. If it does
|
495
|
-
# not, we create the relevant global cache subdirectory if it does not
|
496
|
-
# exist and copy the spec from the local cache to the global cache.
|
497
|
-
#
|
498
|
-
# @param [Specification] spec
|
499
|
-
# the spec we want to copy to the global cache.
|
500
|
-
#
|
501
|
-
# @param [String] local_cache_path
|
502
|
-
# the local directory from which we want to copy the .gem.
|
503
|
-
#
|
504
|
-
def cache_globally(spec, local_cache_path)
|
505
|
-
return unless cache_path = download_cache_path(spec)
|
506
|
-
return if cache_path.exist?
|
507
|
-
|
508
|
-
SharedHelpers.filesystem_access(cache_path.dirname, &:mkpath)
|
509
|
-
SharedHelpers.filesystem_access(cache_path) do
|
510
|
-
FileUtils.cp(local_cache_path, cache_path)
|
511
|
-
end
|
524
|
+
def download_gem(spec, download_cache_path)
|
525
|
+
uri = spec.remote.uri
|
526
|
+
Bundler.ui.confirm("Fetching #{version_message(spec)}")
|
527
|
+
Bundler.rubygems.download_gem(spec, uri, download_cache_path)
|
512
528
|
end
|
513
529
|
|
514
530
|
# Returns the global cache path of the calling Rubygems::Source object.
|
@@ -527,7 +543,7 @@ module Bundler
|
|
527
543
|
return unless remote = spec.remote
|
528
544
|
return unless cache_slug = remote.cache_slug
|
529
545
|
|
530
|
-
Bundler.user_cache.join("gems", cache_slug
|
546
|
+
Bundler.user_cache.join("gems", cache_slug)
|
531
547
|
end
|
532
548
|
|
533
549
|
def extension_cache_slug(spec)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bundler
|
4
|
+
class Source
|
5
|
+
class RubygemsAggregate
|
6
|
+
attr_reader :source_map, :sources
|
7
|
+
|
8
|
+
def initialize(sources, source_map)
|
9
|
+
@sources = sources
|
10
|
+
@source_map = source_map
|
11
|
+
|
12
|
+
@index = build_index
|
13
|
+
end
|
14
|
+
|
15
|
+
def specs
|
16
|
+
@index
|
17
|
+
end
|
18
|
+
|
19
|
+
def identifier
|
20
|
+
to_s
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_s
|
24
|
+
"any of the sources"
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def build_index
|
30
|
+
Index.build do |idx|
|
31
|
+
dependency_names = source_map.pinned_spec_names
|
32
|
+
|
33
|
+
sources.all_sources.each do |source|
|
34
|
+
source.dependency_names = dependency_names - source_map.pinned_spec_names(source)
|
35
|
+
idx.add_source source.specs
|
36
|
+
dependency_names.concat(source.unmet_deps).uniq!
|
37
|
+
end
|
38
|
+
|
39
|
+
double_check_for_index(idx, dependency_names)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Suppose the gem Foo depends on the gem Bar. Foo exists in Source A. Bar has some versions that exist in both
|
44
|
+
# sources A and B. At this point, the API request will have found all the versions of Bar in source A,
|
45
|
+
# but will not have found any versions of Bar from source B, which is a problem if the requested version
|
46
|
+
# of Foo specifically depends on a version of Bar that is only found in source B. This ensures that for
|
47
|
+
# each spec we found, we add all possible versions from all sources to the index.
|
48
|
+
def double_check_for_index(idx, dependency_names)
|
49
|
+
pinned_names = source_map.pinned_spec_names
|
50
|
+
|
51
|
+
names = :names # do this so we only have to traverse to get dependency_names from the index once
|
52
|
+
unmet_dependency_names = lambda do
|
53
|
+
return names unless names == :names
|
54
|
+
new_names = sources.all_sources.map(&:dependency_names_to_double_check)
|
55
|
+
return names = nil if new_names.compact!
|
56
|
+
names = new_names.flatten(1).concat(dependency_names)
|
57
|
+
names.uniq!
|
58
|
+
names -= pinned_names
|
59
|
+
names
|
60
|
+
end
|
61
|
+
|
62
|
+
sources.all_sources.each do |source|
|
63
|
+
source.double_check_for(unmet_dependency_names)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/lib/bundler/source.rb
CHANGED
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
module Bundler
|
4
4
|
class Source
|
5
|
-
autoload :Gemspec, "
|
6
|
-
autoload :Git, "
|
7
|
-
autoload :Metadata, "
|
8
|
-
autoload :Path, "
|
9
|
-
autoload :Rubygems, "
|
5
|
+
autoload :Gemspec, File.expand_path("source/gemspec", __dir__)
|
6
|
+
autoload :Git, File.expand_path("source/git", __dir__)
|
7
|
+
autoload :Metadata, File.expand_path("source/metadata", __dir__)
|
8
|
+
autoload :Path, File.expand_path("source/path", __dir__)
|
9
|
+
autoload :Rubygems, File.expand_path("source/rubygems", __dir__)
|
10
|
+
autoload :RubygemsAggregate, File.expand_path("source/rubygems_aggregate", __dir__)
|
10
11
|
|
11
12
|
attr_accessor :dependency_names
|
12
13
|
|
@@ -33,6 +34,18 @@ module Bundler
|
|
33
34
|
spec.source == self
|
34
35
|
end
|
35
36
|
|
37
|
+
def local!; end
|
38
|
+
|
39
|
+
def local_only!; end
|
40
|
+
|
41
|
+
def cached!; end
|
42
|
+
|
43
|
+
def remote!; end
|
44
|
+
|
45
|
+
def add_dependency_names(names)
|
46
|
+
@dependency_names = Array(dependency_names) | Array(names)
|
47
|
+
end
|
48
|
+
|
36
49
|
# it's possible that gems from one source depend on gems from some
|
37
50
|
# other source, so now we download gemspecs and iterate over those
|
38
51
|
# dependencies, looking for gems we don't have info on yet.
|
@@ -42,6 +55,10 @@ module Bundler
|
|
42
55
|
specs.dependency_names
|
43
56
|
end
|
44
57
|
|
58
|
+
def spec_names
|
59
|
+
specs.spec_names
|
60
|
+
end
|
61
|
+
|
45
62
|
def include?(other)
|
46
63
|
other == self
|
47
64
|
end
|
@@ -50,6 +67,10 @@ module Bundler
|
|
50
67
|
"#<#{self.class}:0x#{object_id} #{self}>"
|
51
68
|
end
|
52
69
|
|
70
|
+
def identifier
|
71
|
+
to_s
|
72
|
+
end
|
73
|
+
|
53
74
|
def path?
|
54
75
|
instance_of?(Bundler::Source::Path)
|
55
76
|
end
|
@@ -63,7 +84,7 @@ module Bundler
|
|
63
84
|
)
|
64
85
|
end
|
65
86
|
|
66
|
-
|
87
|
+
private
|
67
88
|
|
68
89
|
def version_color(spec_version, locked_spec_version)
|
69
90
|
if Gem::Version.correct?(spec_version) && Gem::Version.correct?(locked_spec_version)
|