bundler 2.2.33 → 2.4.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +682 -1
- data/README.md +3 -6
- data/bundler.gemspec +8 -10
- data/exe/bundle +12 -24
- data/exe/bundler +1 -1
- data/lib/bundler/.document +1 -0
- data/lib/bundler/build_metadata.rb +3 -3
- data/lib/bundler/cli/add.rb +1 -1
- data/lib/bundler/cli/binstubs.rb +5 -1
- data/lib/bundler/cli/check.rb +1 -1
- data/lib/bundler/cli/common.rb +4 -2
- data/lib/bundler/cli/config.rb +10 -1
- data/lib/bundler/cli/console.rb +2 -2
- data/lib/bundler/cli/doctor.rb +7 -1
- data/lib/bundler/cli/gem.rb +73 -41
- data/lib/bundler/cli/info.rb +11 -2
- data/lib/bundler/cli/init.rb +6 -2
- data/lib/bundler/cli/install.rb +15 -33
- data/lib/bundler/cli/lock.rb +8 -5
- data/lib/bundler/cli/open.rb +6 -4
- data/lib/bundler/cli/outdated.rb +13 -6
- data/lib/bundler/cli/platform.rb +2 -2
- data/lib/bundler/cli/show.rb +1 -1
- data/lib/bundler/cli/update.rb +6 -2
- data/lib/bundler/cli/viz.rb +1 -1
- data/lib/bundler/cli.rb +63 -20
- data/lib/bundler/compact_index_client/cache.rb +1 -10
- data/lib/bundler/compact_index_client/updater.rb +53 -39
- data/lib/bundler/compact_index_client.rb +0 -6
- data/lib/bundler/constants.rb +1 -1
- data/lib/bundler/current_ruby.rb +18 -6
- data/lib/bundler/definition.rb +289 -165
- data/lib/bundler/dependency.rb +24 -71
- data/lib/bundler/digest.rb +1 -1
- data/lib/bundler/dsl.rb +13 -45
- data/lib/bundler/endpoint_specification.rb +15 -13
- data/lib/bundler/env.rb +2 -2
- data/lib/bundler/environment_preserver.rb +3 -2
- data/lib/bundler/errors.rb +15 -15
- data/lib/bundler/feature_flag.rb +0 -2
- data/lib/bundler/fetcher/base.rb +6 -8
- data/lib/bundler/fetcher/compact_index.rb +18 -25
- data/lib/bundler/fetcher/dependency.rb +2 -6
- data/lib/bundler/fetcher/downloader.rb +2 -5
- data/lib/bundler/fetcher/index.rb +0 -26
- data/lib/bundler/fetcher.rb +22 -29
- data/lib/bundler/force_platform.rb +18 -0
- data/lib/bundler/friendly_errors.rb +21 -7
- data/lib/bundler/gem_helper.rb +2 -2
- data/lib/bundler/gem_helpers.rb +9 -2
- data/lib/bundler/gem_version_promoter.rb +53 -98
- data/lib/bundler/graph.rb +3 -3
- data/lib/bundler/index.rb +13 -51
- data/lib/bundler/injector.rb +18 -4
- data/lib/bundler/inline.rb +9 -21
- data/lib/bundler/installer/gem_installer.rb +13 -5
- data/lib/bundler/installer/parallel_installer.rb +3 -33
- data/lib/bundler/installer/standalone.rb +42 -11
- data/lib/bundler/installer.rb +21 -45
- data/lib/bundler/lazy_specification.rb +55 -54
- data/lib/bundler/lockfile_generator.rb +3 -3
- data/lib/bundler/lockfile_parser.rb +29 -27
- data/lib/bundler/man/bundle-add.1 +21 -5
- data/lib/bundler/man/bundle-add.1.ronn +16 -4
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +9 -3
- data/lib/bundler/man/bundle-cache.1.ronn +9 -2
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +2 -2
- data/lib/bundler/man/bundle-clean.1.ronn +1 -1
- data/lib/bundler/man/bundle-config.1 +32 -16
- data/lib/bundler/man/bundle-config.1.ronn +29 -20
- data/lib/bundler/man/bundle-console.1 +53 -0
- data/lib/bundler/man/bundle-console.1.ronn +44 -0
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +6 -6
- data/lib/bundler/man/bundle-exec.1.ronn +6 -6
- data/lib/bundler/man/bundle-gem.1 +27 -37
- data/lib/bundler/man/bundle-gem.1.ronn +5 -5
- data/lib/bundler/man/bundle-help.1 +13 -0
- data/lib/bundler/man/bundle-help.1.ronn +12 -0
- data/lib/bundler/man/bundle-info.1 +1 -1
- data/lib/bundler/man/bundle-init.1 +5 -1
- data/lib/bundler/man/bundle-init.1.ronn +2 -0
- data/lib/bundler/man/bundle-inject.1 +5 -2
- data/lib/bundler/man/bundle-inject.1.ronn +3 -1
- data/lib/bundler/man/bundle-install.1 +6 -31
- data/lib/bundler/man/bundle-install.1.ronn +8 -31
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-open.1 +22 -2
- data/lib/bundler/man/bundle-open.1.ronn +9 -1
- data/lib/bundler/man/bundle-outdated.1 +15 -18
- data/lib/bundler/man/bundle-outdated.1.ronn +13 -19
- data/lib/bundler/man/bundle-platform.1 +16 -6
- data/lib/bundler/man/bundle-platform.1.ronn +14 -7
- data/lib/bundler/man/bundle-plugin.1 +81 -0
- data/lib/bundler/man/bundle-plugin.1.ronn +59 -0
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +1 -1
- data/lib/bundler/man/bundle-show.1 +1 -1
- data/lib/bundler/man/bundle-update.1 +2 -2
- data/lib/bundler/man/bundle-update.1.ronn +2 -1
- data/lib/bundler/man/bundle-version.1 +35 -0
- data/lib/bundler/man/bundle-version.1.ronn +24 -0
- data/lib/bundler/man/bundle-viz.1 +4 -1
- data/lib/bundler/man/bundle-viz.1.ronn +2 -0
- data/lib/bundler/man/bundle.1 +15 -10
- data/lib/bundler/man/bundle.1.ronn +12 -7
- data/lib/bundler/man/gemfile.5 +94 -83
- data/lib/bundler/man/gemfile.5.ronn +100 -87
- data/lib/bundler/man/index.txt +4 -0
- data/lib/bundler/match_metadata.rb +13 -0
- data/lib/bundler/match_platform.rb +0 -1
- data/lib/bundler/match_remote_metadata.rb +29 -0
- data/lib/bundler/mirror.rb +5 -7
- data/lib/bundler/plugin/api/source.rb +3 -9
- data/lib/bundler/plugin/index.rb +4 -4
- data/lib/bundler/plugin/installer/git.rb +0 -4
- data/lib/bundler/plugin/installer/rubygems.rb +0 -8
- data/lib/bundler/plugin/installer.rb +6 -3
- data/lib/bundler/plugin.rb +3 -1
- data/lib/bundler/process_lock.rb +1 -1
- data/lib/bundler/remote_specification.rb +7 -5
- data/lib/bundler/resolver/base.rb +107 -0
- data/lib/bundler/resolver/candidate.rb +94 -0
- data/lib/bundler/resolver/incompatibility.rb +15 -0
- data/lib/bundler/resolver/package.rb +72 -0
- data/lib/bundler/resolver/root.rb +25 -0
- data/lib/bundler/resolver/spec_group.rb +43 -71
- data/lib/bundler/resolver.rb +342 -302
- data/lib/bundler/ruby_dsl.rb +1 -1
- data/lib/bundler/ruby_version.rb +6 -19
- data/lib/bundler/rubygems_ext.rb +149 -28
- data/lib/bundler/rubygems_gem_installer.rb +32 -20
- data/lib/bundler/rubygems_integration.rb +24 -95
- data/lib/bundler/runtime.rb +2 -7
- data/lib/bundler/safe_marshal.rb +31 -0
- data/lib/bundler/self_manager.rb +168 -0
- data/lib/bundler/settings.rb +7 -12
- data/lib/bundler/setup.rb +4 -1
- data/lib/bundler/shared_helpers.rb +15 -22
- data/lib/bundler/source/git/git_proxy.rb +237 -74
- data/lib/bundler/source/git.rb +54 -38
- data/lib/bundler/source/metadata.rb +3 -4
- data/lib/bundler/source/path/installer.rb +1 -22
- data/lib/bundler/source/path.rb +7 -7
- data/lib/bundler/source/rubygems.rb +85 -128
- data/lib/bundler/source.rb +4 -5
- data/lib/bundler/source_list.rb +12 -2
- data/lib/bundler/source_map.rb +15 -2
- data/lib/bundler/spec_set.rb +62 -34
- data/lib/bundler/stub_specification.rb +5 -3
- data/lib/bundler/templates/Executable +3 -5
- data/lib/bundler/templates/Executable.bundler +6 -11
- data/lib/bundler/templates/Executable.standalone +4 -4
- data/lib/bundler/templates/Gemfile +0 -2
- data/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
- data/lib/bundler/templates/newgem/Gemfile.tt +3 -0
- data/lib/bundler/templates/newgem/README.md.tt +7 -11
- data/lib/bundler/templates/newgem/Rakefile.tt +22 -2
- data/lib/bundler/templates/newgem/bin/console.tt +0 -4
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +1 -1
- data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +11 -1
- data/lib/bundler/templates/newgem/gitignore.tt +3 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +13 -4
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +11 -4
- data/lib/bundler/templates/newgem/standard.yml.tt +1 -0
- data/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
- data/lib/bundler/ui/shell.rb +36 -13
- data/lib/bundler/ui/silent.rb +21 -5
- data/lib/bundler/uri_normalizer.rb +23 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +3 -3
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +3 -1
- data/lib/bundler/vendor/fileutils/lib/fileutils.rb +1351 -409
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1 -1
- data/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +189 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +60 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +411 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +248 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
- data/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +6 -6
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +1 -2
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +6 -2
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +9 -4
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +19 -1
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +23 -5
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/tsort/lib/tsort.rb +318 -319
- data/lib/bundler/vendor/uri/lib/uri/common.rb +76 -91
- data/lib/bundler/vendor/uri/lib/uri/file.rb +7 -1
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +2 -2
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +32 -13
- data/lib/bundler/vendor/uri/lib/uri/http.rb +40 -3
- data/lib/bundler/vendor/uri/lib/uri/https.rb +2 -2
- data/lib/bundler/vendor/uri/lib/uri/ldap.rb +2 -2
- data/lib/bundler/vendor/uri/lib/uri/ldaps.rb +2 -1
- data/lib/bundler/vendor/uri/lib/uri/mailto.rb +2 -3
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +16 -23
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +12 -18
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
- data/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
- data/lib/bundler/vendor/uri/lib/uri.rb +3 -3
- data/lib/bundler/vendored_persistent.rb +1 -33
- data/lib/bundler/{vendored_tmpdir.rb → vendored_pub_grub.rb} +1 -1
- data/lib/bundler/version.rb +5 -1
- data/lib/bundler/worker.rb +5 -7
- data/lib/bundler.rb +47 -82
- metadata +52 -38
- data/lib/bundler/dep_proxy.rb +0 -55
- data/lib/bundler/gemdeps.rb +0 -29
- data/lib/bundler/psyched_yaml.rb +0 -22
- data/lib/bundler/templates/gems.rb +0 -8
- data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +0 -5
- data/lib/bundler/templates/newgem/travis.yml.tt +0 -6
- data/lib/bundler/vendor/molinillo/LICENSE +0 -9
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +0 -143
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +0 -58
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -11
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +0 -154
- data/lib/bundler/vendored_molinillo.rb +0 -4
- data/lib/bundler/version_ranges.rb +0 -122
data/README.md
CHANGED
@@ -38,20 +38,17 @@ Still stuck? Try [filing an issue](https://github.com/rubygems/rubygems/issues/n
|
|
38
38
|
|
39
39
|
To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANGELOG.md).
|
40
40
|
|
41
|
-
To get in touch with the Bundler core team and other Bundler users, please
|
41
|
+
To get in touch with the Bundler core team and other Bundler users, please join [the Bundler slack](https://slack.bundler.io).
|
42
42
|
|
43
43
|
### Contributing
|
44
44
|
|
45
45
|
If you'd like to contribute to Bundler, that's awesome, and we <3 you. We've put together [the Bundler contributor guide](https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/README.md) with all of the information you need to get started.
|
46
46
|
|
47
|
-
If you'd like to request a substantial change to Bundler or its documentation, refer to the [Bundler RFC process](https://github.com/
|
48
|
-
|
49
|
-
While some Bundler contributors are compensated by Ruby Together, the project maintainers make decisions independent of Ruby Together. As a project, we welcome contributions regardless of the author's affiliation with Ruby Together.
|
47
|
+
If you'd like to request a substantial change to Bundler or its documentation, refer to the [Bundler RFC process](https://github.com/rubygems/rfcs) for more information.
|
50
48
|
|
51
49
|
### Supporting
|
52
50
|
|
53
|
-
|
54
|
-
<a href="https://rubytogether.org/">Ruby Together</a> pays some Bundler maintainers for their ongoing work. As a grassroots initiative committed to supporting the critical Ruby infrastructure you rely on, Ruby Together is funded entirely by the Ruby community. Contribute today <a href="https://rubytogether.org/developers">as an individual</a> or (better yet) <a href="https://rubytogether.org/companies">as a company</a> to ensure that Bundler, RubyGems, and other shared tooling is around for years to come.
|
51
|
+
RubyGems is managed by [Ruby Central](https://rubycentral.org), a non-profit organization that supports the Ruby community through projects like this one, as well as [RubyConf](https://rubyconf.org), [RailsConf](https://railsconf.org), and [RubyGems.org](https://rubygems.org). You can support Ruby Central by attending or [sponsoring](sponsors@rubycentral.org) a conference, or by [joining as a supporting member](https://rubycentral.org/#/portal/signup).
|
55
52
|
|
56
53
|
### Code of Conduct
|
57
54
|
|
data/bundler.gemspec
CHANGED
@@ -22,17 +22,15 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.summary = "The best way to manage your application's dependencies"
|
23
23
|
s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably"
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
}
|
32
|
-
end
|
25
|
+
s.metadata = {
|
26
|
+
"bug_tracker_uri" => "https://github.com/rubygems/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler",
|
27
|
+
"changelog_uri" => "https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md",
|
28
|
+
"homepage_uri" => "https://bundler.io/",
|
29
|
+
"source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
|
30
|
+
}
|
33
31
|
|
34
|
-
s.required_ruby_version = ">= 2.
|
35
|
-
s.required_rubygems_version = ">=
|
32
|
+
s.required_ruby_version = ">= 2.6.0"
|
33
|
+
s.required_rubygems_version = ">= 3.0.1"
|
36
34
|
|
37
35
|
s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
|
38
36
|
|
data/exe/bundle
CHANGED
@@ -10,36 +10,24 @@ end
|
|
10
10
|
base_path = File.expand_path("../lib", __dir__)
|
11
11
|
|
12
12
|
if File.exist?(base_path)
|
13
|
-
|
14
|
-
else
|
15
|
-
require "bundler"
|
13
|
+
$LOAD_PATH.unshift(base_path)
|
16
14
|
end
|
17
15
|
|
18
|
-
|
19
|
-
gem "bundler", Bundler::VERSION if Gem.rubygems_version < Gem::Version.new("2.6.2")
|
20
|
-
|
21
|
-
# Check if an older version of bundler is installed
|
22
|
-
$LOAD_PATH.each do |path|
|
23
|
-
next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
|
24
|
-
err = String.new
|
25
|
-
err << "Looks like you have a version of bundler that's older than 0.9.\n"
|
26
|
-
err << "Please remove your old versions.\n"
|
27
|
-
err << "An easy way to do this is by running `gem cleanup bundler`."
|
28
|
-
abort(err)
|
29
|
-
end
|
16
|
+
require "bundler"
|
30
17
|
|
31
|
-
if
|
32
|
-
|
33
|
-
|
34
|
-
|
18
|
+
if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::Version.new("2.7.a") && !ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"]
|
19
|
+
Bundler.ui.warn \
|
20
|
+
"Your RubyGems version (#{Gem::VERSION}) has a bug that prevents " \
|
21
|
+
"`required_ruby_version` from working for Bundler. Any scripts that use " \
|
22
|
+
"`gem install bundler` will break as soon as Bundler drops support for " \
|
23
|
+
"your Ruby version. Please upgrade RubyGems to avoid future breakage " \
|
24
|
+
"and silence this warning by running `gem update --system 3.2.3`"
|
35
25
|
end
|
36
26
|
|
27
|
+
require "bundler/friendly_errors"
|
28
|
+
|
37
29
|
Bundler.with_friendly_errors do
|
38
|
-
|
39
|
-
require_relative "../lib/bundler/cli"
|
40
|
-
else
|
41
|
-
require "bundler/cli"
|
42
|
-
end
|
30
|
+
require "bundler/cli"
|
43
31
|
|
44
32
|
# Allow any command to use --help flag to show help for that command
|
45
33
|
help_flags = %w[--help -h]
|
data/exe/bundler
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
# not in RDoc
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2023-08-02".freeze
|
8
|
+
@git_commit_sha = "d2e3d8e3f4".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -29,7 +29,7 @@ module Bundler
|
|
29
29
|
|
30
30
|
# If Bundler has been installed without its .git directory and without a
|
31
31
|
# commit instance variable then we can't determine its commits SHA.
|
32
|
-
git_dir = File.
|
32
|
+
git_dir = File.expand_path("../../../.git", __dir__)
|
33
33
|
if File.directory?(git_dir)
|
34
34
|
return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
|
35
35
|
end
|
data/lib/bundler/cli/add.rb
CHANGED
@@ -40,7 +40,7 @@ module Bundler
|
|
40
40
|
raise InvalidOption, "Please specify gems to add." if gems.empty?
|
41
41
|
|
42
42
|
version.to_a.each do |v|
|
43
|
-
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN
|
43
|
+
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN.match?(v.to_s)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
data/lib/bundler/cli/binstubs.rb
CHANGED
@@ -40,7 +40,11 @@ module Bundler
|
|
40
40
|
end
|
41
41
|
|
42
42
|
if options[:standalone]
|
43
|
-
|
43
|
+
if gem_name == "bundler"
|
44
|
+
Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") unless options[:all]
|
45
|
+
next
|
46
|
+
end
|
47
|
+
|
44
48
|
Bundler.settings.temporary(:path => (Bundler.settings[:path] || Bundler.root)) do
|
45
49
|
installer.generate_standalone_bundler_executable_stubs(spec, installer_opts)
|
46
50
|
end
|
data/lib/bundler/cli/check.rb
CHANGED
@@ -17,7 +17,7 @@ module Bundler
|
|
17
17
|
begin
|
18
18
|
definition.resolve_only_locally!
|
19
19
|
not_installed = definition.missing_specs
|
20
|
-
rescue GemNotFound,
|
20
|
+
rescue GemNotFound, SolveFailure
|
21
21
|
Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
|
22
22
|
Bundler.ui.warn "Install missing gems with `bundle install`."
|
23
23
|
exit 1
|
data/lib/bundler/cli/common.rb
CHANGED
@@ -15,6 +15,7 @@ module Bundler
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.output_fund_metadata_summary
|
18
|
+
return if Bundler.settings["ignore_funding_requests"]
|
18
19
|
definition = Bundler.definition
|
19
20
|
current_dependencies = definition.requested_dependencies
|
20
21
|
current_specs = definition.specs
|
@@ -40,7 +41,7 @@ module Bundler
|
|
40
41
|
end
|
41
42
|
|
42
43
|
def self.verbalize_groups(groups)
|
43
|
-
groups.map!{|g| "'#{g}'" }
|
44
|
+
groups.map! {|g| "'#{g}'" }
|
44
45
|
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
|
45
46
|
reject {|s| s.to_s.empty? }.join(" and ")
|
46
47
|
group_str = groups.size == 1 ? "group" : "groups"
|
@@ -109,7 +110,8 @@ module Bundler
|
|
109
110
|
|
110
111
|
definition.gem_version_promoter.tap do |gvp|
|
111
112
|
gvp.level = patch_level.first || :major
|
112
|
-
gvp.strict = options[:strict] || options["
|
113
|
+
gvp.strict = options[:strict] || options["filter-strict"]
|
114
|
+
gvp.pre = options[:pre]
|
113
115
|
end
|
114
116
|
end
|
115
117
|
|
data/lib/bundler/cli/config.rb
CHANGED
@@ -180,7 +180,7 @@ module Bundler
|
|
180
180
|
scopes = %w[global local].select {|s| options[s] }
|
181
181
|
case scopes.size
|
182
182
|
when 0
|
183
|
-
@scope = "global"
|
183
|
+
@scope = inside_app? ? "local" : "global"
|
184
184
|
@explicit_scope = false
|
185
185
|
when 1
|
186
186
|
@scope = scopes.first
|
@@ -189,6 +189,15 @@ module Bundler
|
|
189
189
|
"The options #{scopes.join " and "} were specified. Please only use one of the switches at a time."
|
190
190
|
end
|
191
191
|
end
|
192
|
+
|
193
|
+
private
|
194
|
+
|
195
|
+
def inside_app?
|
196
|
+
Bundler.root
|
197
|
+
true
|
198
|
+
rescue GemfileNotFound
|
199
|
+
false
|
200
|
+
end
|
192
201
|
end
|
193
202
|
end
|
194
203
|
end
|
data/lib/bundler/cli/console.rb
CHANGED
data/lib/bundler/cli/doctor.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "rbconfig"
|
4
4
|
require "shellwords"
|
5
|
+
require "fiddle"
|
5
6
|
|
6
7
|
module Bundler
|
7
8
|
class CLI::Doctor
|
@@ -71,7 +72,12 @@ module Bundler
|
|
71
72
|
|
72
73
|
definition.specs.each do |spec|
|
73
74
|
bundles_for_gem(spec).each do |bundle|
|
74
|
-
bad_paths = dylibs(bundle).select
|
75
|
+
bad_paths = dylibs(bundle).select do |f|
|
76
|
+
Fiddle.dlopen(f)
|
77
|
+
false
|
78
|
+
rescue Fiddle::DLError
|
79
|
+
true
|
80
|
+
end
|
75
81
|
if bad_paths.any?
|
76
82
|
broken_links[spec] ||= []
|
77
83
|
broken_links[spec].concat(bad_paths)
|
data/lib/bundler/cli/gem.rb
CHANGED
@@ -15,7 +15,7 @@ module Bundler
|
|
15
15
|
"test-unit" => "3.0",
|
16
16
|
}.freeze
|
17
17
|
|
18
|
-
attr_reader :options, :gem_name, :thor, :name, :target
|
18
|
+
attr_reader :options, :gem_name, :thor, :name, :target, :extension
|
19
19
|
|
20
20
|
def initialize(options, gem_name, thor)
|
21
21
|
@options = options
|
@@ -28,7 +28,11 @@ module Bundler
|
|
28
28
|
@name = @gem_name
|
29
29
|
@target = SharedHelpers.pwd.join(gem_name)
|
30
30
|
|
31
|
-
|
31
|
+
@extension = options[:ext]
|
32
|
+
|
33
|
+
validate_ext_name if @extension
|
34
|
+
validate_rust_builder_rubygems_version if @extension == "rust"
|
35
|
+
travis_removal_info
|
32
36
|
end
|
33
37
|
|
34
38
|
def run
|
@@ -38,6 +42,7 @@ module Bundler
|
|
38
42
|
namespaced_path = name.tr("-", "/")
|
39
43
|
constant_name = name.gsub(/-[_-]*(?![_-]|$)/) { "::" }.gsub(/([_-]+|(::)|^)(.|$)/) { $2.to_s + $3.upcase }
|
40
44
|
constant_array = constant_name.split("::")
|
45
|
+
minitest_constant_name = constant_array.clone.tap {|a| a[-1] = "Test#{a[-1]}" }.join("::") # Foo::Bar => Foo::TestBar
|
41
46
|
|
42
47
|
use_git = Bundler.git_present? && options[:git]
|
43
48
|
|
@@ -54,21 +59,23 @@ module Bundler
|
|
54
59
|
end
|
55
60
|
|
56
61
|
config = {
|
57
|
-
:name
|
62
|
+
:name => name,
|
58
63
|
:underscored_name => underscored_name,
|
59
|
-
:namespaced_path
|
60
|
-
:makefile_path
|
61
|
-
:constant_name
|
62
|
-
:constant_array
|
63
|
-
:author
|
64
|
-
:email
|
65
|
-
:test
|
66
|
-
:ext
|
67
|
-
:exe
|
68
|
-
:bundler_version
|
69
|
-
:git
|
70
|
-
:github_username
|
64
|
+
:namespaced_path => namespaced_path,
|
65
|
+
:makefile_path => "#{underscored_name}/#{underscored_name}",
|
66
|
+
:constant_name => constant_name,
|
67
|
+
:constant_array => constant_array,
|
68
|
+
:author => git_author_name.empty? ? "TODO: Write your name" : git_author_name,
|
69
|
+
:email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
|
70
|
+
:test => options[:test],
|
71
|
+
:ext => extension,
|
72
|
+
:exe => options[:exe],
|
73
|
+
:bundler_version => bundler_dependency_version,
|
74
|
+
:git => use_git,
|
75
|
+
:github_username => github_username.empty? ? "[USERNAME]" : github_username,
|
71
76
|
:required_ruby_version => required_ruby_version,
|
77
|
+
:rust_builder_required_rubygems_version => rust_builder_required_rubygems_version,
|
78
|
+
:minitest_constant_name => minitest_constant_name,
|
72
79
|
}
|
73
80
|
ensure_safe_gem_name(name, constant_array)
|
74
81
|
|
@@ -104,9 +111,17 @@ module Bundler
|
|
104
111
|
)
|
105
112
|
config[:test_task] = :spec
|
106
113
|
when "minitest"
|
114
|
+
# Generate path for minitest target file (FileList["test/**/test_*.rb"])
|
115
|
+
# foo => test/test_foo.rb
|
116
|
+
# foo-bar => test/foo/test_bar.rb
|
117
|
+
# foo_bar => test/test_foo_bar.rb
|
118
|
+
paths = namespaced_path.rpartition("/")
|
119
|
+
paths[2] = "test_#{paths[2]}"
|
120
|
+
minitest_namespaced_path = paths.join("")
|
121
|
+
|
107
122
|
templates.merge!(
|
108
123
|
"test/minitest/test_helper.rb.tt" => "test/test_helper.rb",
|
109
|
-
"test/minitest/
|
124
|
+
"test/minitest/test_newgem.rb.tt" => "test/#{minitest_namespaced_path}.rb"
|
110
125
|
)
|
111
126
|
config[:test_task] = :test
|
112
127
|
when "test-unit"
|
@@ -122,8 +137,6 @@ module Bundler
|
|
122
137
|
case config[:ci]
|
123
138
|
when "github"
|
124
139
|
templates.merge!("github/workflows/main.yml.tt" => ".github/workflows/main.yml")
|
125
|
-
when "travis"
|
126
|
-
templates.merge!("travis.yml.tt" => ".travis.yml")
|
127
140
|
when "gitlab"
|
128
141
|
templates.merge!("gitlab-ci.yml.tt" => ".gitlab-ci.yml")
|
129
142
|
when "circle"
|
@@ -178,14 +191,23 @@ module Bundler
|
|
178
191
|
|
179
192
|
templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]
|
180
193
|
|
181
|
-
if
|
194
|
+
if extension == "c"
|
182
195
|
templates.merge!(
|
183
|
-
"ext/newgem/extconf.rb.tt" => "ext/#{name}/extconf.rb",
|
196
|
+
"ext/newgem/extconf-c.rb.tt" => "ext/#{name}/extconf.rb",
|
184
197
|
"ext/newgem/newgem.h.tt" => "ext/#{name}/#{underscored_name}.h",
|
185
198
|
"ext/newgem/newgem.c.tt" => "ext/#{name}/#{underscored_name}.c"
|
186
199
|
)
|
187
200
|
end
|
188
201
|
|
202
|
+
if extension == "rust"
|
203
|
+
templates.merge!(
|
204
|
+
"Cargo.toml.tt" => "Cargo.toml",
|
205
|
+
"ext/newgem/Cargo.toml.tt" => "ext/#{name}/Cargo.toml",
|
206
|
+
"ext/newgem/extconf-rust.rb.tt" => "ext/#{name}/extconf.rb",
|
207
|
+
"ext/newgem/src/lib.rs.tt" => "ext/#{name}/src/lib.rs",
|
208
|
+
)
|
209
|
+
end
|
210
|
+
|
189
211
|
if target.exist? && !target.directory?
|
190
212
|
Bundler.ui.error "Couldn't create a new gem named `#{gem_name}` because there's an existing file named `#{gem_name}`."
|
191
213
|
exit Bundler::BundlerError.all_errors[Bundler::GenericSystemCallError]
|
@@ -260,7 +282,7 @@ module Bundler
|
|
260
282
|
Bundler.ui.info hint_text("test")
|
261
283
|
|
262
284
|
result = Bundler.ui.ask "Enter a test framework. rspec/minitest/test-unit/(none):"
|
263
|
-
if
|
285
|
+
if /rspec|minitest|test-unit/.match?(result)
|
264
286
|
test_framework = result
|
265
287
|
else
|
266
288
|
test_framework = false
|
@@ -296,12 +318,11 @@ module Bundler
|
|
296
318
|
"* CircleCI: https://circleci.com/\n" \
|
297
319
|
"* GitHub Actions: https://github.com/features/actions\n" \
|
298
320
|
"* GitLab CI: https://docs.gitlab.com/ee/ci/\n" \
|
299
|
-
"* Travis CI: https://travis-ci.org/\n" \
|
300
321
|
"\n"
|
301
322
|
Bundler.ui.info hint_text("ci")
|
302
323
|
|
303
|
-
result = Bundler.ui.ask "Enter a CI service. github/
|
304
|
-
if
|
324
|
+
result = Bundler.ui.ask "Enter a CI service. github/gitlab/circle/(none):"
|
325
|
+
if /github|gitlab|circle/.match?(result)
|
305
326
|
ci_template = result
|
306
327
|
else
|
307
328
|
ci_template = false
|
@@ -332,7 +353,7 @@ module Bundler
|
|
332
353
|
Bundler.ui.info hint_text("linter")
|
333
354
|
|
334
355
|
result = Bundler.ui.ask "Enter a linter. rubocop/standard/(none):"
|
335
|
-
if
|
356
|
+
if /rubocop|standard/.match?(result)
|
336
357
|
linter_template = result
|
337
358
|
else
|
338
359
|
linter_template = false
|
@@ -379,7 +400,7 @@ module Bundler
|
|
379
400
|
end
|
380
401
|
|
381
402
|
def ensure_safe_gem_name(name, constant_array)
|
382
|
-
if
|
403
|
+
if /^\d/.match?(name)
|
383
404
|
Bundler.ui.error "Invalid gem name #{name} Please give a name which does not start with numbers."
|
384
405
|
exit 1
|
385
406
|
end
|
@@ -405,28 +426,39 @@ module Bundler
|
|
405
426
|
thor.run(%(#{editor} "#{file}"))
|
406
427
|
end
|
407
428
|
|
429
|
+
def rust_builder_required_rubygems_version
|
430
|
+
"3.3.11"
|
431
|
+
end
|
432
|
+
|
408
433
|
def required_ruby_version
|
409
|
-
|
410
|
-
elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "2.4.0"
|
411
|
-
elsif Gem.ruby_version < Gem::Version.new("2.6.a") then "2.5.0"
|
412
|
-
else
|
413
|
-
"2.6.0"
|
414
|
-
end
|
434
|
+
"2.6.0"
|
415
435
|
end
|
416
436
|
|
417
437
|
def rubocop_version
|
418
|
-
|
419
|
-
elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.12"
|
420
|
-
else
|
421
|
-
"1.21"
|
422
|
-
end
|
438
|
+
"1.21"
|
423
439
|
end
|
424
440
|
|
425
441
|
def standard_version
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
442
|
+
"1.3"
|
443
|
+
end
|
444
|
+
|
445
|
+
# TODO: remove at next minor release
|
446
|
+
def travis_removal_info
|
447
|
+
if options[:ci] == "travis"
|
448
|
+
Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator."
|
449
|
+
exit 1
|
450
|
+
end
|
451
|
+
|
452
|
+
if Bundler.settings["gem.ci"] == "travis"
|
453
|
+
Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator, but it is present in bundle config. Please configure another provider using `bundle config set gem.ci SERVICE` (where SERVICE is one of github/gitlab/circle) or unset configuration using `bundle config unset gem.ci`."
|
454
|
+
exit 1
|
455
|
+
end
|
456
|
+
end
|
457
|
+
|
458
|
+
def validate_rust_builder_rubygems_version
|
459
|
+
if Gem::Version.new(rust_builder_required_rubygems_version) > Gem.rubygems_version
|
460
|
+
Bundler.ui.error "Your RubyGems version (#{Gem.rubygems_version}) is too old to build Rust extension. Please update your RubyGems using `gem update --system` or any other way and try again."
|
461
|
+
exit 1
|
430
462
|
end
|
431
463
|
end
|
432
464
|
end
|
data/lib/bundler/cli/info.rb
CHANGED
@@ -47,7 +47,7 @@ module Bundler
|
|
47
47
|
def print_gem_path(spec)
|
48
48
|
name = spec.name
|
49
49
|
if name == "bundler"
|
50
|
-
path = File.expand_path("
|
50
|
+
path = File.expand_path("../../..", __dir__)
|
51
51
|
else
|
52
52
|
path = spec.full_gem_path
|
53
53
|
if spec.deleted_gem?
|
@@ -73,7 +73,8 @@ module Bundler
|
|
73
73
|
gem_info << "\tBug Tracker: #{metadata["bug_tracker_uri"]}\n" if metadata.key?("bug_tracker_uri")
|
74
74
|
gem_info << "\tMailing List: #{metadata["mailing_list_uri"]}\n" if metadata.key?("mailing_list_uri")
|
75
75
|
gem_info << "\tPath: #{spec.full_gem_path}\n"
|
76
|
-
gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
|
76
|
+
gem_info << "\tDefault Gem: yes\n" if spec.respond_to?(:default_gem?) && spec.default_gem?
|
77
|
+
gem_info << "\tReverse Dependencies: \n\t\t#{gem_dependencies.join("\n\t\t")}" if gem_dependencies.any?
|
77
78
|
|
78
79
|
if name != "bundler" && spec.deleted_gem?
|
79
80
|
return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
|
@@ -81,5 +82,13 @@ module Bundler
|
|
81
82
|
|
82
83
|
Bundler.ui.info gem_info
|
83
84
|
end
|
85
|
+
|
86
|
+
def gem_dependencies
|
87
|
+
@gem_dependencies ||= Bundler.definition.specs.map do |spec|
|
88
|
+
dependency = spec.dependencies.find {|dep| dep.name == gem_name }
|
89
|
+
next unless dependency
|
90
|
+
"#{spec.name} (#{spec.version}) depends on #{gem_name} (#{dependency.requirements_list.join(", ")})"
|
91
|
+
end.compact.sort
|
92
|
+
end
|
84
93
|
end
|
85
94
|
end
|
data/lib/bundler/cli/init.rb
CHANGED
@@ -32,7 +32,11 @@ module Bundler
|
|
32
32
|
file << spec.to_gemfile
|
33
33
|
end
|
34
34
|
else
|
35
|
-
|
35
|
+
File.open(File.expand_path("../templates/Gemfile", __dir__), "r") do |template|
|
36
|
+
File.open(gemfile, "wb") do |destination|
|
37
|
+
IO.copy_stream(template, destination)
|
38
|
+
end
|
39
|
+
end
|
36
40
|
end
|
37
41
|
|
38
42
|
puts "Writing new #{gemfile} to #{SharedHelpers.pwd}/#{gemfile}"
|
@@ -41,7 +45,7 @@ module Bundler
|
|
41
45
|
private
|
42
46
|
|
43
47
|
def gemfile
|
44
|
-
@gemfile ||= Bundler.preferred_gemfile_name
|
48
|
+
@gemfile ||= options[:gemfile] || Bundler.preferred_gemfile_name
|
45
49
|
end
|
46
50
|
end
|
47
51
|
end
|
data/lib/bundler/cli/install.rb
CHANGED
@@ -12,6 +12,8 @@ module Bundler
|
|
12
12
|
|
13
13
|
warn_if_root
|
14
14
|
|
15
|
+
Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
|
16
|
+
|
15
17
|
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
|
16
18
|
|
17
19
|
# Disable color in deployment mode
|
@@ -92,9 +94,8 @@ module Bundler
|
|
92
94
|
|
93
95
|
def warn_if_root
|
94
96
|
return if Bundler.settings[:silence_root_warning] || Gem.win_platform? || !Process.uid.zero?
|
95
|
-
Bundler.ui.warn "Don't run Bundler as root.
|
96
|
-
|
97
|
-
"application for all non-root users on this machine.", :wrap => true
|
97
|
+
Bundler.ui.warn "Don't run Bundler as root. Installing your bundle as root " \
|
98
|
+
"will break this application for all non-root users on this machine.", :wrap => true
|
98
99
|
end
|
99
100
|
|
100
101
|
def dependencies_count_for(definition)
|
@@ -133,42 +134,23 @@ module Bundler
|
|
133
134
|
end
|
134
135
|
|
135
136
|
def normalize_groups
|
136
|
-
options[:with] &&= options[:with].join(":").tr(" ", ":").split(":")
|
137
|
-
options[:without] &&= options[:without].join(":").tr(" ", ":").split(":")
|
138
|
-
|
139
137
|
check_for_group_conflicts_in_cli_options
|
140
138
|
|
141
|
-
|
142
|
-
Bundler.settings.set_command_option :without, nil
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
with -= options[:without] if options[:without]
|
147
|
-
|
148
|
-
without = options.fetch(:without, [])
|
149
|
-
without |= Bundler.settings[:without].map(&:to_s)
|
150
|
-
without -= options[:with] if options[:with]
|
151
|
-
|
152
|
-
options[:with] = with
|
153
|
-
options[:without] = without
|
154
|
-
|
155
|
-
unless Bundler.settings[:without] == options[:without] && Bundler.settings[:with] == options[:with]
|
156
|
-
# need to nil them out first to get around validation for backwards compatibility
|
157
|
-
Bundler.settings.set_command_option :without, nil
|
158
|
-
Bundler.settings.set_command_option :with, nil
|
159
|
-
Bundler.settings.set_command_option :without, options[:without] - options[:with]
|
160
|
-
Bundler.settings.set_command_option :with, options[:with]
|
161
|
-
end
|
139
|
+
# need to nil them out first to get around validation for backwards compatibility
|
140
|
+
Bundler.settings.set_command_option :without, nil
|
141
|
+
Bundler.settings.set_command_option :with, nil
|
142
|
+
Bundler.settings.set_command_option :without, options[:without]
|
143
|
+
Bundler.settings.set_command_option :with, options[:with]
|
162
144
|
end
|
163
145
|
|
164
146
|
def normalize_settings
|
165
147
|
Bundler.settings.set_command_option :path, nil if options[:system]
|
166
|
-
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
167
|
-
Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil?
|
168
|
-
end
|
169
148
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
170
|
-
|
171
|
-
|
149
|
+
|
150
|
+
if options["standalone"] && Bundler.settings[:path].nil? && !options["local"]
|
151
|
+
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
152
|
+
Bundler.settings.set_command_option :path, "bundle"
|
153
|
+
end
|
172
154
|
end
|
173
155
|
|
174
156
|
bin_option = options["binstubs"]
|
@@ -185,7 +167,7 @@ module Bundler
|
|
185
167
|
|
186
168
|
Bundler.settings.set_command_option_if_given :clean, options["clean"]
|
187
169
|
|
188
|
-
normalize_groups
|
170
|
+
normalize_groups if options[:without] || options[:with]
|
189
171
|
|
190
172
|
options[:force] = options[:redownload]
|
191
173
|
end
|
data/lib/bundler/cli/lock.rb
CHANGED
@@ -15,19 +15,22 @@ module Bundler
|
|
15
15
|
end
|
16
16
|
|
17
17
|
print = options[:print]
|
18
|
-
|
19
|
-
Bundler.ui =
|
18
|
+
previous_ui_level = Bundler.ui.level
|
19
|
+
Bundler.ui.level = "silent" if print
|
20
20
|
|
21
21
|
Bundler::Fetcher.disable_endpoint = options["full-index"]
|
22
22
|
|
23
23
|
update = options[:update]
|
24
24
|
conservative = options[:conservative]
|
25
|
+
bundler = options[:bundler]
|
25
26
|
|
26
27
|
if update.is_a?(Array) # unlocking specific gems
|
27
28
|
Bundler::CLI::Common.ensure_all_gems_in_lockfile!(update)
|
28
29
|
update = { :gems => update, :conservative => conservative }
|
29
|
-
elsif update
|
30
|
-
update = { :conservative => conservative }
|
30
|
+
elsif update && conservative
|
31
|
+
update = { :conservative => conservative }
|
32
|
+
elsif update && bundler
|
33
|
+
update = { :bundler => bundler }
|
31
34
|
end
|
32
35
|
definition = Bundler.definition(update)
|
33
36
|
|
@@ -61,7 +64,7 @@ module Bundler
|
|
61
64
|
definition.lock(file)
|
62
65
|
end
|
63
66
|
|
64
|
-
Bundler.ui =
|
67
|
+
Bundler.ui.level = previous_ui_level
|
65
68
|
end
|
66
69
|
end
|
67
70
|
end
|