summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-15 13:20:25 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-15 17:19:02 +0900
commitd386a58f6f1865aaa35eda5af55cff3ff3cca4ca (patch)
tree0665fe806540deae7f8e52095af6dba70f940aa3
parent7ffd14a18c341565afaf80d259f9fe5df8a13d29 (diff)
Merge bundler-2.2.0.rc.2
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3659
-rw-r--r--lib/bundler.rb9
-rw-r--r--lib/bundler/build_metadata.rb10
-rw-r--r--lib/bundler/cli.rb41
-rw-r--r--lib/bundler/cli/add.rb2
-rw-r--r--lib/bundler/cli/cache.rb8
-rw-r--r--lib/bundler/cli/clean.rb2
-rw-r--r--lib/bundler/cli/common.rb14
-rw-r--r--lib/bundler/cli/doctor.rb2
-rw-r--r--lib/bundler/cli/exec.rb2
-rw-r--r--lib/bundler/cli/fund.rb36
-rw-r--r--lib/bundler/cli/gem.rb2
-rw-r--r--lib/bundler/cli/info.rb3
-rw-r--r--lib/bundler/cli/init.rb2
-rw-r--r--lib/bundler/cli/inject.rb2
-rw-r--r--lib/bundler/cli/install.rb6
-rw-r--r--lib/bundler/cli/list.rb2
-rw-r--r--lib/bundler/cli/outdated.rb2
-rw-r--r--lib/bundler/cli/show.rb2
-rw-r--r--lib/bundler/cli/update.rb2
-rw-r--r--lib/bundler/compact_index_client.rb2
-rw-r--r--lib/bundler/compact_index_client/cache.rb2
-rw-r--r--lib/bundler/definition.rb65
-rw-r--r--lib/bundler/dep_proxy.rb2
-rw-r--r--lib/bundler/dsl.rb8
-rw-r--r--lib/bundler/endpoint_specification.rb2
-rw-r--r--lib/bundler/fetcher.rb6
-rw-r--r--lib/bundler/fetcher/base.rb2
-rw-r--r--lib/bundler/fetcher/compact_index.rb2
-rw-r--r--lib/bundler/fetcher/downloader.rb2
-rw-r--r--lib/bundler/fetcher/index.rb2
-rw-r--r--lib/bundler/friendly_errors.rb6
-rw-r--r--lib/bundler/gem_helper.rb26
-rw-r--r--lib/bundler/gem_helpers.rb7
-rw-r--r--lib/bundler/gem_version_promoter.rb2
-rw-r--r--lib/bundler/graph.rb2
-rw-r--r--lib/bundler/index.rb2
-rw-r--r--lib/bundler/injector.rb2
-rw-r--r--lib/bundler/installer.rb2
-rw-r--r--lib/bundler/installer/gem_installer.rb2
-rw-r--r--lib/bundler/installer/parallel_installer.rb2
-rw-r--r--lib/bundler/installer/standalone.rb4
-rw-r--r--lib/bundler/lazy_specification.rb6
-rw-r--r--lib/bundler/lockfile_generator.rb2
-rw-r--r--lib/bundler/lockfile_parser.rb2
-rw-r--r--lib/bundler/mirror.rb4
-rw-r--r--lib/bundler/plugin.rb11
-rw-r--r--lib/bundler/plugin/index.rb2
-rw-r--r--lib/bundler/plugin/installer.rb2
-rw-r--r--lib/bundler/plugin/installer/rubygems.rb2
-rw-r--r--lib/bundler/plugin/source_list.rb2
-rw-r--r--lib/bundler/remote_specification.rb2
-rw-r--r--lib/bundler/resolver.rb8
-rw-r--r--lib/bundler/resolver/spec_group.rb4
-rw-r--r--lib/bundler/retry.rb2
-rw-r--r--lib/bundler/ruby_version.rb2
-rw-r--r--lib/bundler/rubygems_ext.rb47
-rw-r--r--lib/bundler/rubygems_gem_installer.rb4
-rw-r--r--lib/bundler/rubygems_integration.rb24
-rw-r--r--lib/bundler/runtime.rb4
-rw-r--r--lib/bundler/settings.rb91
-rw-r--r--lib/bundler/shared_helpers.rb2
-rw-r--r--lib/bundler/similarity_detector.rb2
-rw-r--r--lib/bundler/source.rb2
-rw-r--r--lib/bundler/source/git.rb2
-rw-r--r--lib/bundler/source/git/git_proxy.rb6
-rw-r--r--lib/bundler/source/path.rb4
-rw-r--r--lib/bundler/source/path/installer.rb2
-rw-r--r--lib/bundler/source/rubygems.rb4
-rw-r--r--lib/bundler/source/rubygems/remote.rb2
-rw-r--r--lib/bundler/source_list.rb4
-rw-r--r--lib/bundler/spec_set.rb2
-rw-r--r--lib/bundler/stub_specification.rb2
-rw-r--r--lib/bundler/templates/newgem/README.md.tt2
-rw-r--r--lib/bundler/templates/newgem/spec/spec_helper.rb.tt1
-rw-r--r--lib/bundler/ui/shell.rb10
-rw-r--r--lib/bundler/uri_credentials_filter.rb2
-rw-r--r--lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb11
-rw-r--r--lib/bundler/version.rb2
-rw-r--r--lib/bundler/worker.rb2
-rw-r--r--lib/bundler/yaml_serializer.rb2
-rw-r--r--man/bundle-add.12
-rw-r--r--man/bundle-add.1.ronn (renamed from man/bundle-add.ronn)0
-rw-r--r--man/bundle-add.1.txt58
-rw-r--r--man/bundle-binstubs.18
-rw-r--r--man/bundle-binstubs.1.ronn (renamed from man/bundle-binstubs.ronn)6
-rw-r--r--man/bundle-binstubs.1.txt48
-rw-r--r--man/bundle-cache.12
-rw-r--r--man/bundle-cache.1.ronn (renamed from man/bundle-cache.ronn)0
-rw-r--r--man/bundle-cache.1.txt78
-rw-r--r--man/bundle-check.12
-rw-r--r--man/bundle-check.1.ronn (renamed from man/bundle-check.ronn)0
-rw-r--r--man/bundle-check.1.txt33
-rw-r--r--man/bundle-clean.12
-rw-r--r--man/bundle-clean.1.ronn (renamed from man/bundle-clean.ronn)0
-rw-r--r--man/bundle-clean.1.txt26
-rw-r--r--man/bundle-config.128
-rw-r--r--man/bundle-config.1.ronn (renamed from man/bundle-config.ronn)27
-rw-r--r--man/bundle-config.1.txt527
-rw-r--r--man/bundle-doctor.12
-rw-r--r--man/bundle-doctor.1.ronn (renamed from man/bundle-doctor.ronn)0
-rw-r--r--man/bundle-doctor.1.txt44
-rw-r--r--man/bundle-exec.12
-rw-r--r--man/bundle-exec.1.ronn (renamed from man/bundle-exec.ronn)0
-rw-r--r--man/bundle-exec.1.txt181
-rw-r--r--man/bundle-gem.12
-rw-r--r--man/bundle-gem.1.ronn (renamed from man/bundle-gem.ronn)0
-rw-r--r--man/bundle-gem.1.txt117
-rw-r--r--man/bundle-info.12
-rw-r--r--man/bundle-info.1.ronn (renamed from man/bundle-info.ronn)0
-rw-r--r--man/bundle-info.1.txt21
-rw-r--r--man/bundle-init.12
-rw-r--r--man/bundle-init.1.ronn (renamed from man/bundle-init.ronn)0
-rw-r--r--man/bundle-init.1.txt34
-rw-r--r--man/bundle-inject.12
-rw-r--r--man/bundle-inject.1.ronn (renamed from man/bundle-inject.ronn)0
-rw-r--r--man/bundle-inject.1.txt32
-rw-r--r--man/bundle-install.131
-rw-r--r--man/bundle-install.1.ronn (renamed from man/bundle-install.ronn)26
-rw-r--r--man/bundle-install.1.txt401
-rw-r--r--man/bundle-list.12
-rw-r--r--man/bundle-list.1.ronn (renamed from man/bundle-list.ronn)0
-rw-r--r--man/bundle-list.1.txt44
-rw-r--r--man/bundle-lock.12
-rw-r--r--man/bundle-lock.1.ronn (renamed from man/bundle-lock.ronn)0
-rw-r--r--man/bundle-lock.1.txt93
-rw-r--r--man/bundle-open.12
-rw-r--r--man/bundle-open.1.ronn (renamed from man/bundle-open.ronn)0
-rw-r--r--man/bundle-open.1.txt29
-rw-r--r--man/bundle-outdated.12
-rw-r--r--man/bundle-outdated.1.ronn (renamed from man/bundle-outdated.ronn)0
-rw-r--r--man/bundle-outdated.1.txt131
-rw-r--r--man/bundle-platform.12
-rw-r--r--man/bundle-platform.1.ronn (renamed from man/bundle-platform.ronn)0
-rw-r--r--man/bundle-platform.1.txt57
-rw-r--r--man/bundle-pristine.12
-rw-r--r--man/bundle-pristine.1.ronn (renamed from man/bundle-pristine.ronn)0
-rw-r--r--man/bundle-pristine.1.txt44
-rw-r--r--man/bundle-remove.12
-rw-r--r--man/bundle-remove.1.ronn (renamed from man/bundle-remove.ronn)0
-rw-r--r--man/bundle-remove.1.txt34
-rw-r--r--man/bundle-show.12
-rw-r--r--man/bundle-show.1.ronn (renamed from man/bundle-show.ronn)0
-rw-r--r--man/bundle-show.1.txt27
-rw-r--r--man/bundle-update.12
-rw-r--r--man/bundle-update.1.ronn (renamed from man/bundle-update.ronn)0
-rw-r--r--man/bundle-update.1.txt391
-rw-r--r--man/bundle-viz.12
-rw-r--r--man/bundle-viz.1.ronn (renamed from man/bundle-viz.ronn)0
-rw-r--r--man/bundle-viz.1.txt39
-rw-r--r--man/bundle.12
-rw-r--r--man/bundle.1.ronn (renamed from man/bundle.ronn)0
-rw-r--r--man/bundle.1.txt116
-rw-r--r--man/gemfile.58
-rw-r--r--man/gemfile.5.ronn8
-rw-r--r--man/gemfile.5.txt651
-rw-r--r--spec/bundler/bundler/cli_spec.rb16
-rw-r--r--spec/bundler/bundler/env_spec.rb2
-rw-r--r--spec/bundler/bundler/friendly_errors_spec.rb6
-rw-r--r--spec/bundler/bundler/gem_helper_spec.rb4
-rw-r--r--spec/bundler/bundler/source_list_spec.rb2
-rw-r--r--spec/bundler/bundler/source_spec.rb2
-rw-r--r--spec/bundler/cache/git_spec.rb26
-rw-r--r--spec/bundler/cache/path_spec.rb16
-rw-r--r--spec/bundler/commands/clean_spec.rb26
-rw-r--r--spec/bundler/commands/fund_spec.rb55
-rw-r--r--spec/bundler/commands/help_spec.rb8
-rw-r--r--spec/bundler/commands/info_spec.rb1
-rw-r--r--spec/bundler/commands/install_spec.rb28
-rw-r--r--spec/bundler/commands/newgem_spec.rb5
-rw-r--r--spec/bundler/commands/outdated_spec.rb4
-rw-r--r--spec/bundler/install/deploy_spec.rb10
-rw-r--r--spec/bundler/install/gemfile/git_spec.rb18
-rw-r--r--spec/bundler/install/gemfile/platform_spec.rb56
-rw-r--r--spec/bundler/install/gems/compact_index_spec.rb4
-rw-r--r--spec/bundler/install/gems/dependency_api_spec.rb2
-rw-r--r--spec/bundler/install/gems/fund_spec.rb110
-rw-r--r--spec/bundler/install/gems/resolving_spec.rb9
-rw-r--r--spec/bundler/install/gems/standalone_spec.rb4
-rw-r--r--spec/bundler/install/path_spec.rb14
-rw-r--r--spec/bundler/lock/lockfile_spec.rb2
-rw-r--r--spec/bundler/other/major_deprecation_spec.rb32
-rw-r--r--spec/bundler/plugins/command_spec.rb2
-rw-r--r--spec/bundler/plugins/install_spec.rb2
-rw-r--r--spec/bundler/quality_spec.rb8
-rw-r--r--spec/bundler/realworld/fixtures/warbler/Gemfile.lock4
-rw-r--r--spec/bundler/realworld/gemfile_source_header_spec.rb2
-rw-r--r--spec/bundler/runtime/gem_tasks_spec.rb12
-rw-r--r--spec/bundler/runtime/inline_spec.rb30
-rw-r--r--spec/bundler/runtime/setup_spec.rb20
-rw-r--r--spec/bundler/runtime/with_unbundled_env_spec.rb16
-rw-r--r--spec/bundler/spec_helper.rb1
-rw-r--r--spec/bundler/support/build_metadata.rb49
-rw-r--r--spec/bundler/support/builders.rb15
-rw-r--r--spec/bundler/support/filters.rb1
-rw-r--r--spec/bundler/support/hax.rb2
-rw-r--r--spec/bundler/support/helpers.rb23
-rw-r--r--spec/bundler/support/path.rb20
-rw-r--r--spec/bundler/support/rubygems_ext.rb2
-rw-r--r--spec/bundler/support/rubygems_version_manager.rb2
-rw-r--r--spec/bundler/update/gems/fund_spec.rb29
200 files changed, 1058 insertions, 3672 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 610cc484e3..f6ad7ccaef 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -353,7 +353,10 @@ EOF
env.delete_if {|k, _| k[0, 7] == "BUNDLE_" }
if env.key?("RUBYOPT")
- env["RUBYOPT"] = env["RUBYOPT"].sub "-rbundler/setup", ""
+ rubyopt = env["RUBYOPT"].split(" ")
+ rubyopt.delete("-r#{File.expand_path("bundler/setup", __dir__)}")
+ rubyopt.delete("-rbundler/setup")
+ env["RUBYOPT"] = rubyopt.join(" ")
end
if env.key?("RUBYLIB")
@@ -453,7 +456,7 @@ EOF
# system binaries. If you put '-n foo' in your .gemrc, RubyGems will
# install binstubs there instead. Unfortunately, RubyGems doesn't expose
# that directory at all, so rather than parse .gemrc ourselves, we allow
- # the directory to be set as well, via `bundle config set bindir foo`.
+ # the directory to be set as well, via `bundle config set --local bindir foo`.
Bundler.settings[:system_bindir] || Bundler.rubygems.gem_bindir
end
@@ -621,7 +624,7 @@ EOF
@rubygems = nil
end
- private
+ private
def eval_yaml_gemspec(path, contents)
require_relative "bundler/psyched_yaml"
diff --git a/lib/bundler/build_metadata.rb b/lib/bundler/build_metadata.rb
index 4dfad2f8d8..0846e82e06 100644
--- a/lib/bundler/build_metadata.rb
+++ b/lib/bundler/build_metadata.rb
@@ -27,19 +27,11 @@ module Bundler
# If Bundler has been installed without its .git directory and without a
# commit instance variable then we can't determine its commits SHA.
- git_dir = File.join(File.expand_path("../../..", __FILE__), ".git")
+ git_dir = File.join(File.expand_path("../../../..", __FILE__), ".git")
if File.directory?(git_dir)
return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
end
- # If Bundler is a submodule in RubyGems, get the submodule commit
- git_sub_dir = File.join(File.expand_path("../../../..", __FILE__), ".git")
- if File.directory?(git_sub_dir)
- return @git_commit_sha = Dir.chdir(git_sub_dir) do
- `git ls-tree --abbrev=8 HEAD bundler`.split(/\s/).fetch(2, "").strip.freeze
- end
- end
-
@git_commit_sha ||= "unknown"
end
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index e8193cef14..b4196621e5 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -134,7 +134,7 @@ module Bundler
if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+}
Kernel.exec "man #{man_page}"
else
- puts File.read("#{File.dirname(man_page)}/#{File.basename(man_page)}.txt")
+ puts File.read("#{File.dirname(man_page)}/#{File.basename(man_page)}.ronn")
end
elsif command_path = Bundler.which("bundler-#{cli}")
Kernel.exec(command_path, "--help")
@@ -439,11 +439,18 @@ module Bundler
Outdated.new(options, gems).run
end
- desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
- unless Bundler.feature_flag.cache_all?
- method_option "all", :type => :boolean,
- :banner => "Include all sources (including path and git)."
+ desc "fund [OPTIONS]", "Lists information about gems seeking funding assistance"
+ method_option "group", :aliases => "-g", :type => :array, :banner =>
+ "Fetch funding information for a specific group"
+ def fund
+ require_relative "cli/fund"
+ Fund.new(options).run
end
+
+ desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
+ method_option "all", :type => :boolean,
+ :default => Bundler.feature_flag.cache_all?,
+ :banner => "Include all sources (including path and git)."
method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one"
method_option "cache-path", :type => :string, :banner =>
"Specify a different cache path than the default (vendor/cache)."
@@ -462,6 +469,12 @@ module Bundler
bundle without having to download any additional gems.
D
def cache
+ SharedHelpers.major_deprecation 2,
+ "The `--all` flag is deprecated because it relies on being " \
+ "remembered across bundler invocations, which bundler will no longer " \
+ "do in future versions. Instead please use `bundle config set cache_all true`, " \
+ "and stop using this flag" if ARGV.include?("--all")
+
require_relative "cli/cache"
Cache.new(options).run
end
@@ -565,18 +578,18 @@ module Bundler
desc "gem NAME [OPTIONS]", "Creates a skeleton for creating a rubygem"
method_option :exe, :type => :boolean, :default => false, :aliases => ["--bin", "-b"], :desc => "Generate a binary executable for your library."
- method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config set gem.coc true`."
+ method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config set --global gem.coc true`."
method_option :edit, :type => :string, :aliases => "-e", :required => false, :banner => "EDITOR",
:lazy_default => [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? },
:desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
method_option :ext, :type => :boolean, :default => false, :desc => "Generate the boilerplate for C extension code"
method_option :git, :type => :boolean, :default => true, :desc => "Initialize a git repo inside your library."
- method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set gem.mit true`."
- method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set gem.rubocop true`."
+ method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
+ method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true`."
method_option :test, :type => :string, :lazy_default => Bundler.settings["gem.test"] || "", :aliases => "-t", :banner => "Use the specified test framework for your library",
- :desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set gem.test (rspec|minitest|test-unit)`."
+ :desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
method_option :ci, :type => :string, :lazy_default => Bundler.settings["gem.ci"] || "",
- :desc => "Generate CI configuration, either GitHub Actions, Travis CI, GitLab CI or CircleCI. Set a default with `bundle config set gem.ci (github|travis|gitlab|circle)`"
+ :desc => "Generate CI configuration, either GitHub Actions, Travis CI, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|travis|gitlab|circle)`"
def gem(name)
end
@@ -740,11 +753,11 @@ module Bundler
end
end
- private
+ private
# Automatically invoke `bundle install` and resume if
# Bundler.settings[:auto_install] exists. This is set through config cmd
- # `bundle config set auto_install 1`.
+ # `bundle config set --global auto_install 1`.
#
# Note that this method `nil`s out the global Definition object, so it
# should be called first, before you instantiate anything like an
@@ -839,10 +852,10 @@ module Bundler
value = options[name]
value = value.join(" ").to_s if option.type == :array
- Bundler::SharedHelpers.major_deprecation 2,\
+ Bundler::SharedHelpers.major_deprecation 2,
"The `#{flag_name}` flag is deprecated because it relies on being " \
"remembered across bundler invocations, which bundler will no longer " \
- "do in future versions. Instead please use `bundle config set #{name.tr("-", "_")} " \
+ "do in future versions. Instead please use `bundle config set --local #{name.tr("-", "_")} " \
"'#{value}'`, and stop using this flag"
end
end
diff --git a/lib/bundler/cli/add.rb b/lib/bundler/cli/add.rb
index 07b951f1ef..5bcf30d82d 100644
--- a/lib/bundler/cli/add.rb
+++ b/lib/bundler/cli/add.rb
@@ -17,7 +17,7 @@ module Bundler
perform_bundle_install unless options["skip-install"]
end
- private
+ private
def perform_bundle_install
Installer.install(Bundler.root, Bundler.definition)
diff --git a/lib/bundler/cli/cache.rb b/lib/bundler/cli/cache.rb
index 5e8420990f..c14c8877f0 100644
--- a/lib/bundler/cli/cache.rb
+++ b/lib/bundler/cli/cache.rb
@@ -24,7 +24,7 @@ module Bundler
end
end
- private
+ private
def install
require_relative "install"
@@ -37,12 +37,6 @@ module Bundler
all = options.fetch(:all, Bundler.feature_flag.cache_all? || nil)
Bundler.settings.set_command_option_if_given :cache_all, all
-
- if Bundler.definition.has_local_dependencies? && !Bundler.feature_flag.cache_all?
- Bundler.ui.warn "Your Gemfile contains path and git dependencies. If you want " \
- "to cache them as well, please pass the --all flag. This will be the default " \
- "on Bundler 3.0."
- end
end
end
end
diff --git a/lib/bundler/cli/clean.rb b/lib/bundler/cli/clean.rb
index 4a407fbae7..c6b0968e3e 100644
--- a/lib/bundler/cli/clean.rb
+++ b/lib/bundler/cli/clean.rb
@@ -13,7 +13,7 @@ module Bundler
Bundler.load.clean(options[:"dry-run"])
end
- protected
+ protected
def require_path_or_force
return unless Bundler.use_system_gems? && !options[:force]
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index cec7bcadb4..23ac78a103 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -14,6 +14,20 @@ module Bundler
Bundler.ui.info msg
end
+ def self.output_fund_metadata_summary
+ definition = Bundler.definition
+ current_dependencies = definition.requested_dependencies
+ current_specs = definition.specs
+
+ count = current_dependencies.count {|dep| current_specs[dep.name].first.metadata.key?("funding_uri") }
+
+ return if count.zero?
+
+ intro = count > 1 ? "#{count} installed gems you directly depend on are" : "#{count} installed gem you directly depend on is"
+ message = "#{intro} looking for funding.\n Run `bundle fund` for details"
+ Bundler.ui.info message
+ end
+
def self.output_without_groups_message(command)
return if Bundler.settings[:without].empty?
Bundler.ui.confirm without_groups_message(command)
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb
index fcf139ed1e..2986ddbc99 100644
--- a/lib/bundler/cli/doctor.rb
+++ b/lib/bundler/cli/doctor.rb
@@ -93,7 +93,7 @@ module Bundler
end
end
- private
+ private
def check_home_permissions
require "find"
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index 0a1edbdbbd..0412d3adb0 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -34,7 +34,7 @@ module Bundler
end
end
- private
+ private
def validate_cmd!
return unless cmd.nil?
diff --git a/lib/bundler/cli/fund.rb b/lib/bundler/cli/fund.rb
new file mode 100644
index 0000000000..52db5aef68
--- /dev/null
+++ b/lib/bundler/cli/fund.rb
@@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+module Bundler
+ class CLI::Fund
+ attr_reader :options
+
+ def initialize(options)
+ @options = options
+ end
+
+ def run
+ Bundler.definition.validate_runtime!
+
+ groups = Array(options[:group]).map(&:to_sym)
+
+ deps = if groups.any?
+ Bundler.definition.dependencies_for(groups)
+ else
+ Bundler.definition.current_dependencies
+ end
+
+ fund_info = deps.each_with_object([]) do |dep, arr|
+ spec = Bundler.definition.specs[dep.name].first
+ if spec.metadata.key?("funding_uri")
+ arr << "* #{spec.name} (#{spec.version})\n Funding: #{spec.metadata["funding_uri"]}"
+ end
+ end
+
+ if fund_info.empty?
+ Bundler.ui.info "None of the installed gems you directly depend on are looking for funding."
+ else
+ Bundler.ui.info fund_info.join("\n")
+ end
+ end
+ end
+end
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 5b4e436d99..8d26e4c1f4 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -192,7 +192,7 @@ module Bundler
raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.")
end
- private
+ private
def resolve_name(name)
SharedHelpers.pwd.join(name).basename.to_s
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 7f4ef0d03a..3111b64a33 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -22,7 +22,7 @@ module Bundler
end
end
- private
+ private
def spec_for_gem(gem_name)
spec = Bundler.definition.specs.find {|s| s.name == gem_name }
@@ -60,6 +60,7 @@ module Bundler
gem_info << "\tHomepage: #{spec.homepage}\n" if spec.homepage
gem_info << "\tDocumentation: #{metadata["documentation_uri"]}\n" if metadata.key?("documentation_uri")
gem_info << "\tSource Code: #{metadata["source_code_uri"]}\n" if metadata.key?("source_code_uri")
+ gem_info << "\tFunding: #{metadata["funding_uri"]}\n" if metadata.key?("funding_uri")
gem_info << "\tWiki: #{metadata["wiki_uri"]}\n" if metadata.key?("wiki_uri")
gem_info << "\tChangelog: #{metadata["changelog_uri"]}\n" if metadata.key?("changelog_uri")
gem_info << "\tBug Tracker: #{metadata["bug_tracker_uri"]}\n" if metadata.key?("bug_tracker_uri")
diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb
index f45871ce9c..d851d02d42 100644
--- a/lib/bundler/cli/init.rb
+++ b/lib/bundler/cli/init.rb
@@ -38,7 +38,7 @@ module Bundler
puts "Writing new #{gemfile} to #{SharedHelpers.pwd}/#{gemfile}"
end
- private
+ private
def gemfile
@gemfile ||= Bundler.preferred_gemfile_name
diff --git a/lib/bundler/cli/inject.rb b/lib/bundler/cli/inject.rb
index b00675d348..8093a85283 100644
--- a/lib/bundler/cli/inject.rb
+++ b/lib/bundler/cli/inject.rb
@@ -44,7 +44,7 @@ module Bundler
end
end
- private
+ private
def last_version_number
definition = Bundler.definition(true)
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 893ed59cdf..edf86fe1ba 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -53,7 +53,7 @@ module Bundler
if options["binstubs"]
Bundler::SharedHelpers.major_deprecation 2,
- "The --binstubs option will be removed in favor of `bundle binstubs`"
+ "The --binstubs option will be removed in favor of `bundle binstubs --all`"
end
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
@@ -82,6 +82,8 @@ module Bundler
require_relative "clean"
Bundler::CLI::Clean.new(options).run
end
+
+ Bundler::CLI::Common.output_fund_metadata_summary
rescue GemNotFound, VersionConflict => e
if options[:local] && Bundler.app_cache.exist?
Bundler.ui.warn "Some gems seem to be missing from your #{Bundler.settings.app_cache_path} directory."
@@ -100,7 +102,7 @@ module Bundler
raise e
end
- private
+ private
def warn_if_root
return if Bundler.settings[:silence_root_warning] || Bundler::WINDOWS || !Process.uid.zero?
diff --git a/lib/bundler/cli/list.rb b/lib/bundler/cli/list.rb
index c172e8d182..66abd32650 100644
--- a/lib/bundler/cli/list.rb
+++ b/lib/bundler/cli/list.rb
@@ -31,7 +31,7 @@ module Bundler
Bundler.ui.info "Use `bundle info` to print more detailed information about a gem"
end
- private
+ private
def verify_group_exists(groups)
(@without_group + @only_group).each do |group|
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 892c29c4d2..109c5f417f 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -127,7 +127,7 @@ module Bundler
end
end
- private
+ private
def groups_text(group_text, groups)
"#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\""
diff --git a/lib/bundler/cli/show.rb b/lib/bundler/cli/show.rb
index 3748c25b89..5eaaba1ef7 100644
--- a/lib/bundler/cli/show.rb
+++ b/lib/bundler/cli/show.rb
@@ -53,7 +53,7 @@ module Bundler
end
end
- private
+ private
def fetch_latest_specs
definition = Bundler.definition(true)
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index 529dd9c94d..ae908be65e 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -106,6 +106,8 @@ module Bundler
Bundler.ui.confirm "Bundle updated!"
Bundler::CLI::Common.output_without_groups_message(:update)
Bundler::CLI::Common.output_post_install_messages installer.post_install_messages
+
+ Bundler::CLI::Common.output_fund_metadata_summary
end
end
end
diff --git a/lib/bundler/compact_index_client.rb b/lib/bundler/compact_index_client.rb
index a5120dbba4..cf67f0e7a0 100644
--- a/lib/bundler/compact_index_client.rb
+++ b/lib/bundler/compact_index_client.rb
@@ -87,7 +87,7 @@ module Bundler
@parsed_checksums = true
end
- private
+ private
def update(local_path, remote_path)
Bundler::CompactIndexClient.debug { "update(#{local_path}, #{remote_path})" }
diff --git a/lib/bundler/compact_index_client/cache.rb b/lib/bundler/compact_index_client/cache.rb
index f6105d3bb3..8f73298fbe 100644
--- a/lib/bundler/compact_index_client/cache.rb
+++ b/lib/bundler/compact_index_client/cache.rb
@@ -83,7 +83,7 @@ module Bundler
gem_line ? parse_gem(gem_line) : nil
end
- private
+ private
def lines(path)
return [] unless path.file?
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index e668ac7953..1a4b703aa5 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -199,10 +199,6 @@ module Bundler
@locked_specs - specs
end
- def new_platform?
- @new_platform
- end
-
def missing_specs
missing = []
resolve.materialize(requested_dependencies, missing)
@@ -232,6 +228,12 @@ module Bundler
end
end
+ def requested_dependencies
+ groups = requested_groups
+ groups.map!(&:to_sym)
+ dependencies_for(groups)
+ end
+
def current_dependencies
dependencies.select do |d|
d.should_include? && !d.gem_platforms(@platforms).empty?
@@ -243,6 +245,12 @@ module Bundler
specs.for(expand_dependencies(deps))
end
+ def dependencies_for(groups)
+ current_dependencies.reject do |d|
+ (d.groups & groups).empty?
+ end
+ end
+
# Resolve all the dependencies specified in Gemfile. It ensures that
# dependencies that have been already resolved via locked file and are fresh
# are reused when resolving dependencies
@@ -318,10 +326,6 @@ module Bundler
sources.rubygems_sources.any? {|s| s.remotes.any? }
end
- def has_local_dependencies?
- !sources.path_sources.empty? || !sources.git_sources.empty?
- end
-
def spec_git_paths
sources.git_sources.map {|s| File.realpath(s.path) if File.exist?(s.path) }.compact
end
@@ -541,7 +545,7 @@ module Bundler
@unlocking
end
- private
+ private
def add_platforms
(@dependencies.flat_map(&:expanded_platforms) + current_platforms).uniq.each do |platform|
@@ -550,10 +554,9 @@ module Bundler
end
def current_platforms
- current_platform = Bundler.local_platform
[].tap do |platforms|
- platforms << current_platform if Bundler.feature_flag.specific_platform?
- platforms << generic(current_platform)
+ platforms << local_platform if Bundler.feature_flag.specific_platform?
+ platforms << generic_local_platform
end
end
@@ -821,7 +824,7 @@ module Bundler
end
resolve = SpecSet.new(converged)
- @locked_specs_incomplete_for_platform = !resolve.for(expand_dependencies(deps), @unlock[:gems], true, true)
+ @locked_specs_incomplete_for_platform = !resolve.for(expand_dependencies(requested_dependencies & deps), @unlock[:gems], true, true)
resolve = resolve.for(expand_dependencies(deps, true), @unlock[:gems], false, false, false)
diff = nil
@@ -859,11 +862,7 @@ module Bundler
def metadata_dependencies
@metadata_dependencies ||= begin
- ruby_versions = concat_ruby_version_requirements(@ruby_version)
- if ruby_versions.empty? || !@ruby_version.exact?
- concat_ruby_version_requirements(RubyVersion.system, ruby_versions)
- concat_ruby_version_requirements(locked_ruby_version_object, ruby_versions) unless @unlock[:ruby]
- end
+ ruby_versions = ruby_version_requirements(@ruby_version)
[
Dependency.new("Ruby\0", ruby_versions),
Dependency.new("RubyGems\0", Gem::VERSION),
@@ -871,47 +870,39 @@ module Bundler
end
end
- def concat_ruby_version_requirements(ruby_version, ruby_versions = [])
- return ruby_versions unless ruby_version
+ def ruby_version_requirements(ruby_version)
+ return [] unless ruby_version
if ruby_version.patchlevel
- ruby_versions << ruby_version.to_gem_version_with_patchlevel
+ [ruby_version.to_gem_version_with_patchlevel]
else
- ruby_versions.concat(ruby_version.versions.map do |version|
+ ruby_version.versions.map do |version|
requirement = Gem::Requirement.new(version)
if requirement.exact?
"~> #{version}.0"
else
requirement
end
- end)
+ end
end
end
def expand_dependencies(dependencies, remote = false)
- sorted_platforms = Resolver.sort_platforms(@platforms)
deps = []
dependencies.each do |dep|
dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
- next if !remote && !dep.current_platform?
- dep.gem_platforms(sorted_platforms).each do |p|
- deps << DepProxy.new(dep, p) if remote || p == generic_local_platform
- end
+ next unless remote || dep.current_platform?
+ target_platforms = dep.gem_platforms(remote ? Resolver.sort_platforms(@platforms) : [generic_local_platform])
+ deps += expand_dependency_with_platforms(dep, target_platforms)
end
deps
end
- def dependencies_for(groups)
- current_dependencies.reject do |d|
- (d.groups & groups).empty?
+ def expand_dependency_with_platforms(dep, platforms)
+ platforms.map do |p|
+ DepProxy.new(dep, p)
end
end
- def requested_dependencies
- groups = requested_groups
- groups.map!(&:to_sym)
- dependencies_for(groups)
- end
-
def source_requirements
# Load all specs from remote sources
index
diff --git a/lib/bundler/dep_proxy.rb b/lib/bundler/dep_proxy.rb
index 6c32179ac1..bb09fe9ea6 100644
--- a/lib/bundler/dep_proxy.rb
+++ b/lib/bundler/dep_proxy.rb
@@ -39,7 +39,7 @@ module Bundler
s
end
- private
+ private
def method_missing(*args, &blk)
@dep.send(*args, &blk)
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index dfc5254b2a..1cc7908b8a 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -63,7 +63,7 @@ module Bundler
development_group = opts[:development_group] || :development
expanded_path = gemfile_root.join(path)
- gemspecs = Dir[File.join(expanded_path, "{,*}.gemspec")].map {|g| Bundler.load_gemspec(g) }.compact
+ gemspecs = Gem::Util.glob_files_in_dir("{,*}.gemspec", expanded_path).map {|g| Bundler.load_gemspec(g) }.compact
gemspecs.reject! {|s| s.name != name } if name
Index.sort_specs(gemspecs)
specs_by_name_and_version = gemspecs.group_by {|s| [s.name, s.version] }
@@ -279,7 +279,7 @@ module Bundler
raise GemfileError, "Undefined local variable or method `#{name}' for Gemfile"
end
- private
+ private
def add_git_sources
git_source(:github) do |repo_name|
@@ -457,7 +457,7 @@ repo_name ||= user_name
"Using `source` more than once without a block is a security risk, and " \
"may result in installing unexpected gems. To resolve this warning, use " \
"a block to indicate which gems should come from the secondary source. " \
- "To upgrade this warning to an error, run `bundle config set " \
+ "To upgrade this warning to an error, run `bundle config set --local " \
"disable_multisource true`."
end
end
@@ -567,7 +567,7 @@ The :#{name} git source is deprecated, and will be removed in the future.#{addit
end
end
- private
+ private
def parse_line_number_from_description
description = self.description
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 9a00b64e0e..476151ae56 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -104,7 +104,7 @@ module Bundler
@remote_specification = spec
end
- private
+ private
def local_specification_path
"#{base_dir}/specifications/#{full_name}.gemspec"
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index abdf2a07fd..235eb9bbd3 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -47,7 +47,7 @@ module Bundler
remote_uri = filter_uri(remote_uri)
super "Authentication is required for #{remote_uri}.\n" \
"Please supply credentials for this source. You can do this by running:\n" \
- " bundle config set #{remote_uri} username:password"
+ " bundle config set --global #{remote_uri} username:password"
end
end
# This error is raised if HTTP authentication is provided, but incorrect.
@@ -216,7 +216,7 @@ module Bundler
"#<#{self.class}:0x#{object_id} uri=#{uri}>"
end
- private
+ private
FETCHERS = [CompactIndex, Dependency, Index].freeze
@@ -303,7 +303,7 @@ module Bundler
store
end
- private
+ private
def remote_uri
@remote.uri
diff --git a/lib/bundler/fetcher/base.rb b/lib/bundler/fetcher/base.rb
index 27987f670a..16cc98273a 100644
--- a/lib/bundler/fetcher/base.rb
+++ b/lib/bundler/fetcher/base.rb
@@ -38,7 +38,7 @@ module Bundler
false
end
- private
+ private
def log_specs(debug_msg)
if Bundler.ui.debug?
diff --git a/lib/bundler/fetcher/compact_index.rb b/lib/bundler/fetcher/compact_index.rb
index f36d76d4ae..0304155bdd 100644
--- a/lib/bundler/fetcher/compact_index.rb
+++ b/lib/bundler/fetcher/compact_index.rb
@@ -83,7 +83,7 @@ module Bundler
true
end
- private
+ private
def compact_index_client
@compact_index_client ||=
diff --git a/lib/bundler/fetcher/downloader.rb b/lib/bundler/fetcher/downloader.rb
index 498852c174..a2289aaaae 100644
--- a/lib/bundler/fetcher/downloader.rb
+++ b/lib/bundler/fetcher/downloader.rb
@@ -74,7 +74,7 @@ module Bundler
end
end
- private
+ private
def validate_uri_scheme!(uri)
return if uri.scheme =~ /\Ahttps?\z/
diff --git a/lib/bundler/fetcher/index.rb b/lib/bundler/fetcher/index.rb
index 034a225198..7e07eaea7b 100644
--- a/lib/bundler/fetcher/index.rb
+++ b/lib/bundler/fetcher/index.rb
@@ -42,7 +42,7 @@ module Bundler
"Your network or your gem server is probably having issues right now."
end
- private
+ private
# cached gem specification path, if one exists
def gemspec_cached_path(spec_file_name)
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index e5facd31ea..8273064699 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -4,7 +4,7 @@ require_relative "vendored_thor"
module Bundler
module FriendlyErrors
- module_function
+ module_function
def log_error(error)
case error
@@ -51,7 +51,7 @@ module Bundler
end
def request_issue_report_for(e)
- Bundler.ui.info <<-EOS.gsub(/^ {8}/, "")
+ Bundler.ui.error <<-EOS.gsub(/^ {8}/, ""), nil, nil
--- ERROR REPORT TEMPLATE -------------------------------------------------------
# Error Report
@@ -94,7 +94,7 @@ module Bundler
Bundler.ui.error "Unfortunately, an unexpected error occurred, and Bundler cannot continue."
- Bundler.ui.warn <<-EOS.gsub(/^ {8}/, "")
+ Bundler.ui.error <<-EOS.gsub(/^ {8}/, ""), nil, :yellow
First, try this link to see if there are any existing issue reports for this error:
#{issues_url(e)}
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 272e7ecb69..4ada36aef4 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -32,7 +32,7 @@ module Bundler
def initialize(base = nil, name = nil)
@base = File.expand_path(base || SharedHelpers.pwd)
- gemspecs = name ? [File.join(@base, "#{name}.gemspec")] : Dir[File.join(@base, "{,*}.gemspec")]
+ gemspecs = name ? [File.join(@base, "#{name}.gemspec")] : Gem::Util.glob_files_in_dir("{,*}.gemspec", @base)
raise "Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it." unless gemspecs.size == 1
@spec_path = gemspecs.first
@gemspec = Bundler.load_gemspec(@spec_path)
@@ -100,27 +100,35 @@ module Bundler
Bundler.ui.confirm "#{name} (#{version}) installed."
end
- protected
+ protected
def rubygem_push(path)
cmd = [*gem_command, "push", path]
cmd << "--key" << gem_key if gem_key
cmd << "--host" << allowed_push_host if allowed_push_host
- unless allowed_push_host || Bundler.user_home.join(".gem/credentials").file?
- raise "Your rubygems.org credentials aren't set. Run `gem signin` to set them."
- end
sh_with_input(cmd)
Bundler.ui.confirm "Pushed #{name} #{version} to #{gem_push_host}"
end
def built_gem_path
- Dir[File.join(base, "#{name}-*.gem")].sort_by {|f| File.mtime(f) }.last
+ Gem::Util.glob_files_in_dir("#{name}-*.gem", base).sort_by {|f| File.mtime(f) }.last
end
- def git_push(remote = "")
+ def git_push(remote = nil)
+ remote ||= default_remote
perform_git_push remote
- perform_git_push "#{remote} --tags"
- Bundler.ui.confirm "Pushed git commits and tags."
+ perform_git_push "#{remote} #{version_tag}"
+ Bundler.ui.confirm "Pushed git commits and release tag."
+ end
+
+ def default_remote
+ current_branch = sh(%w[git rev-parse --abbrev-ref HEAD]).strip
+ return "origin" if current_branch.empty?
+
+ remote_for_branch = sh(%W[git config --get branch.#{current_branch}.remote]).strip
+ return "origin" if remote_for_branch.empty?
+
+ remote_for_branch
end
def allowed_push_host
diff --git a/lib/bundler/gem_helpers.rb b/lib/bundler/gem_helpers.rb
index be047f4397..2a097375c0 100644
--- a/lib/bundler/gem_helpers.rb
+++ b/lib/bundler/gem_helpers.rb
@@ -24,10 +24,15 @@ module Bundler
module_function :generic
def generic_local_platform
- generic(Bundler.local_platform)
+ generic(local_platform)
end
module_function :generic_local_platform
+ def local_platform
+ Bundler.local_platform
+ end
+ module_function :local_platform
+
def platform_specificity_match(spec_platform, user_platform)
spec_platform = Gem::Platform.new(spec_platform)
return PlatformMatch::EXACT_MATCH if spec_platform == user_platform
diff --git a/lib/bundler/gem_version_promoter.rb b/lib/bundler/gem_version_promoter.rb
index 76912940ac..2e87b7d443 100644
--- a/lib/bundler/gem_version_promoter.rb
+++ b/lib/bundler/gem_version_promoter.rb
@@ -98,7 +98,7 @@ module Bundler
level == :minor
end
- private
+ private
def filter_dep_specs(spec_groups, locked_spec)
res = spec_groups.select do |spec_group|
diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb
index 5644e41079..8f52e2f0f0 100644
--- a/lib/bundler/graph.rb
+++ b/lib/bundler/graph.rb
@@ -27,7 +27,7 @@ module Bundler
GraphVizClient.new(self).run
end
- private
+ private
def _populate_relations
parent_dependencies = _groups.values.to_set.flatten
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index 9166a92738..fa48df738c 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -179,7 +179,7 @@ module Bundler
@sources.uniq! # need to use uniq! here instead of checking for the item before adding
end
- private
+ private
def specs_by_name(name)
@specs[name].values
diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb
index 6694642246..02c3e6189f 100644
--- a/lib/bundler/injector.rb
+++ b/lib/bundler/injector.rb
@@ -74,7 +74,7 @@ module Bundler
end
end
- private
+ private
def conservative_version(spec)
version = spec.version
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 8be4bb1189..e08cc9722b 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -196,7 +196,7 @@ module Bundler
end
end
- private
+ private
# the order that the resolver provides is significant, since
# dependencies might affect the installation of a gem.
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb
index b41b3fdf28..507fd1802c 100644
--- a/lib/bundler/installer/gem_installer.rb
+++ b/lib/bundler/installer/gem_installer.rb
@@ -27,7 +27,7 @@ module Bundler
return false, specific_failure_message(e)
end
- private
+ private
def specific_failure_message(e)
message = "#{e.class}: #{e.message}\n"
diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb
index ad34e4f484..a6d1de29e6 100644
--- a/lib/bundler/installer/parallel_installer.rb
+++ b/lib/bundler/installer/parallel_installer.rb
@@ -130,7 +130,7 @@ module Bundler
Bundler.ui.warn(warning.join("\n"))
end
- private
+ private
def failed_specs
@specs.select(&:failed?)
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb
index e1beb25ad1..0720d6d38a 100644
--- a/lib/bundler/installer/standalone.rb
+++ b/lib/bundler/installer/standalone.rb
@@ -16,12 +16,12 @@ module Bundler
file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
file.puts "path = File.expand_path('..', __FILE__)"
paths.each do |path|
- file.puts %($:.unshift "\#{path}/#{path}")
+ file.puts %($:.unshift File.expand_path("\#{path}/#{path}"))
end
end
end
- private
+ private
def paths
@specs.map do |spec|
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index ad8488d089..546b8d9b09 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -12,7 +12,7 @@ module Bundler
[name, version, platform_string] <=> [other.name, other.version, other.platform_string]
end
- protected
+ protected
def platform_string
platform_string = platform.to_s
@@ -89,7 +89,7 @@ module Bundler
if search && Gem::Platform.new(search.platform) != platform_object && !search.runtime_dependencies.-(dependencies.reject {|d| d.type == :development }).empty?
Bundler.ui.warn "Unable to use the platform-specific (#{search.platform}) version of #{name} (#{version}) " \
"because it has different dependencies from the #{platform} version. " \
- "To use the platform-specific version of the gem, run `bundle config set specific_platform true` and install again."
+ "To use the platform-specific version of the gem, run `bundle config set --local specific_platform true` and install again."
search = source.specs.search(self).last
end
search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
@@ -118,7 +118,7 @@ module Bundler
" #{source.revision[0..6]}"
end
- private
+ private
def to_ary
nil
diff --git a/lib/bundler/lockfile_generator.rb b/lib/bundler/lockfile_generator.rb
index 585077d18d..3bc6bd7339 100644
--- a/lib/bundler/lockfile_generator.rb
+++ b/lib/bundler/lockfile_generator.rb
@@ -25,7 +25,7 @@ module Bundler
out
end
- private
+ private
def add_sources
definition.send(:sources).lock_sources.each_with_index do |source, idx|
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index caabd524d4..f836737621 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -109,7 +109,7 @@ module Bundler
"bundler:#{bundler_version}#{prerelease_text}`.\n"
end
- private
+ private
TYPES = {
GIT => Bundler::Source::Git,
diff --git a/lib/bundler/mirror.rb b/lib/bundler/mirror.rb
index 0e554bcc3f..a63b45b47d 100644
--- a/lib/bundler/mirror.rb
+++ b/lib/bundler/mirror.rb
@@ -43,7 +43,7 @@ module Bundler
config.update_mirror(mirror)
end
- private
+ private
def fetch_valid_mirror_for(uri)
downcased = uri.to_s.downcase
@@ -158,7 +158,7 @@ module Bundler
end
end
- private
+ private
def wait_for_writtable_socket(socket, address, timeout)
if IO.select(nil, [socket], nil, timeout)
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb
index 2025e09b3d..da3f468da5 100644
--- a/lib/bundler/plugin.rb
+++ b/lib/bundler/plugin.rb
@@ -16,7 +16,7 @@ module Bundler
PLUGIN_FILE_NAME = "plugins.rb".freeze
- module_function
+ module_function
def reset!
instance_variables.each {|i| remove_instance_variable(i) }
@@ -39,12 +39,11 @@ module Bundler
save_plugins names, specs
rescue PluginError => e
- if specs
- specs_to_delete = Hash[specs.select {|k, _v| names.include?(k) && !index.commands.values.include?(k) }]
- specs_to_delete.values.each {|spec| Bundler.rm_rf(spec.full_gem_path) }
- end
+ specs_to_delete = specs.select {|k, _v| names.include?(k) && !index.commands.values.include?(k) }
+ specs_to_delete.each_value {|spec| Bundler.rm_rf(spec.full_gem_path) }
- Bundler.ui.error "Failed to install plugin #{name}: #{e.message}\n #{e.backtrace.join("\n ")}"
+ names_list = names.map {|name| "`#{name}`" }.join(", ")
+ Bundler.ui.error "Failed to install the following plugins: #{names_list}. The underlying error was: #{e.message}.\n #{e.backtrace.join("\n ")}"
end
# Uninstalls plugins by the given names
diff --git a/lib/bundler/plugin/index.rb b/lib/bundler/plugin/index.rb
index 8aea92ca0c..819bc60588 100644
--- a/lib/bundler/plugin/index.rb
+++ b/lib/bundler/plugin/index.rb
@@ -133,7 +133,7 @@ module Bundler
@hooks[event] || []
end
- private
+ private
# Reads the index file from the directory and initializes the instance
# variables.
diff --git a/lib/bundler/plugin/installer.rb b/lib/bundler/plugin/installer.rb
index bcea3f0e45..26cec4f18c 100644
--- a/lib/bundler/plugin/installer.rb
+++ b/lib/bundler/plugin/installer.rb
@@ -41,7 +41,7 @@ module Bundler
install_from_specs specs
end
- private
+ private
def check_sources_consistency!(options)
if options.key?(:git) && options.key?(:local_git)
diff --git a/lib/bundler/plugin/installer/rubygems.rb b/lib/bundler/plugin/installer/rubygems.rb
index 7ae74fa93b..e144c14b24 100644
--- a/lib/bundler/plugin/installer/rubygems.rb
+++ b/lib/bundler/plugin/installer/rubygems.rb
@@ -8,7 +8,7 @@ module Bundler
"#{spec.name} #{spec.version}"
end
- private
+ private
def requires_sudo?
false # Will change on implementation of project level plugins
diff --git a/lib/bundler/plugin/source_list.rb b/lib/bundler/plugin/source_list.rb
index f0e212205f..b90a331d28 100644
--- a/lib/bundler/plugin/source_list.rb
+++ b/lib/bundler/plugin/source_list.rb
@@ -17,7 +17,7 @@ module Bundler
path_sources + git_sources + rubygems_sources + [metadata_source]
end
- private
+ private
def rubygems_aggregate_class
Plugin::Installer::Rubygems
diff --git a/lib/bundler/remote_specification.rb b/lib/bundler/remote_specification.rb
index 00fe4da93f..89b69e1045 100644
--- a/lib/bundler/remote_specification.rb
+++ b/lib/bundler/remote_specification.rb
@@ -91,7 +91,7 @@ module Bundler
" #{source.revision[0..6]}"
end
- private
+ private
def to_ary
nil
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 61bb648598..926c08c4c9 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -158,10 +158,10 @@ module Bundler
# spec group.
sg_ruby = sg.copy_for(Gem::Platform::RUBY)
selected_sgs << sg_ruby if sg_ruby
- sg_all_platforms = nil
all_platforms = @platforms + [platform]
- sorted_all_platforms = self.class.sort_platforms(all_platforms)
- sorted_all_platforms.reverse_each do |other_platform|
+ next if all_platforms.to_a == [Gem::Platform::RUBY]
+ sg_all_platforms = nil
+ self.class.sort_platforms(all_platforms).reverse_each do |other_platform|
if sg_all_platforms.nil?
sg_all_platforms = sg.copy_for(other_platform)
else
@@ -250,7 +250,7 @@ module Bundler
["00", *platform.to_a.map {|part| part || "" }]
end
- private
+ private
# returns an integer \in (-\infty, 0]
# a number closer to 0 means the dependency is less constraining
diff --git a/lib/bundler/resolver/spec_group.rb b/lib/bundler/resolver/spec_group.rb
index d5d12f7a2d..8b5759cfad 100644
--- a/lib/bundler/resolver/spec_group.rb
+++ b/lib/bundler/resolver/spec_group.rb
@@ -87,13 +87,13 @@ module Bundler
name.hash ^ version.hash ^ sorted_activated_platforms.hash ^ source.hash
end
- protected
+ protected
def sorted_activated_platforms
@activated_platforms.sort_by(&:to_s)
end
- private
+ private
def __dependencies
@dependencies = Hash.new do |dependencies, platform|
diff --git a/lib/bundler/retry.rb b/lib/bundler/retry.rb
index d64958ba70..e95f15f7fb 100644
--- a/lib/bundler/retry.rb
+++ b/lib/bundler/retry.rb
@@ -32,7 +32,7 @@ module Bundler
end
alias_method :attempts, :attempt
- private
+ private
def run(&block)
@failed = false
diff --git a/lib/bundler/ruby_version.rb b/lib/bundler/ruby_version.rb
index 7e403ce6fc..491f8c55a4 100644
--- a/lib/bundler/ruby_version.rb
+++ b/lib/bundler/ruby_version.rb
@@ -123,7 +123,7 @@ module Bundler
@exact = versions.all? {|v| Gem::Requirement.create(v).exact? }
end
- private
+ private
def matches?(requirements, version)
# Handles RUBY_PATCHLEVEL of -1 for instances like ruby-head
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index 66f9a45cbd..0322b06d07 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -85,7 +85,7 @@ module Gem
dependencies - development_dependencies
end
- private
+ private
def dependencies_to_gemfile(dependencies, group = nil)
gemfile = String.new
@@ -129,6 +129,35 @@ module Gem
end
end
+ # comparison is done order independently since rubygems 3.2.0.rc.2
+ unless Gem::Requirement.new("> 1", "< 2") == Gem::Requirement.new("< 2", "> 1")
+ class Requirement
+ module OrderIndependentComparison
+ def ==(other)
+ if _requirements_sorted? && other._requirements_sorted?
+ super
+ else
+ _with_sorted_requirements == other._with_sorted_requirements
+ end
+ end
+
+ protected
+
+ def _requirements_sorted?
+ return @_are_requirements_sorted if defined?(@_are_requirements_sorted)
+ strings = as_list
+ @_are_requirements_sorted = strings == strings.sort
+ end
+
+ def _with_sorted_requirements
+ @_with_sorted_requirements ||= _requirements_sorted? ? self : self.class.new(as_list.sort)
+ end
+ end
+
+ prepend OrderIndependentComparison
+ end
+ end
+
class Platform
JAVA = Gem::Platform.new("java") unless defined?(JAVA)
MSWIN = Gem::Platform.new("mswin32") unless defined?(MSWIN)
@@ -144,6 +173,22 @@ module Gem
undef_method :eql? if method_defined? :eql?
alias_method :eql?, :==
end
+
+ require "rubygems/util"
+
+ Util.singleton_class.module_eval do
+ if Util.singleton_methods.include?(:glob_files_in_dir) # since 3.0.0.beta.2
+ remove_method :glob_files_in_dir
+ end
+
+ def glob_files_in_dir(glob, base_path)
+ if RUBY_VERSION >= "2.5"
+ Dir.glob(glob, :base => base_path).map! {|f| File.expand_path(f, base_path) }
+ else
+ Dir.glob(File.join(base_path.to_s.gsub(/[\[\]]/, '\\\\\\&'), glob)).map! {|f| File.expand_path(f) }
+ end
+ end
+ end
end
module Gem
diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb
index 8ce33c3953..cd5eb152f9 100644
--- a/lib/bundler/rubygems_gem_installer.rb
+++ b/lib/bundler/rubygems_gem_installer.rb
@@ -34,7 +34,7 @@ module Bundler
end
end
- private
+ private
def validate_bundler_checksum(checksum)
return true if Bundler.settings[:disable_checksum_validation]
@@ -60,7 +60,7 @@ module Bundler
If you wish to continue installing the downloaded gem, and are certain it does not pose a \
security issue despite the mismatching checksum, do the following:
- 1. run `bundle config set disable_checksum_validation true` to turn off checksum verification
+ 1. run `bundle config set --local disable_checksum_validation true` to turn off checksum verification
2. run `bundle install`
(More info: The expected SHA256 checksum was #{checksum.inspect}, but the \
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 9256fa274c..17402f16f2 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -313,8 +313,13 @@ module Bundler
end
message = if spec.nil?
+ target_file = begin
+ Bundler.default_gemfile.basename
+ rescue GemfileNotFound
+ "inline Gemfile"
+ end
"#{dep.name} is not part of the bundle." \
- " Add it to your #{Bundler.default_gemfile.basename}."
+ " Add it to your #{target_file}."
else
"can't activate #{dep}, already activated #{spec.full_name}. " \
"Make sure all dependencies are added to Gemfile."
@@ -406,6 +411,17 @@ module Bundler
# Replace or hook into RubyGems to provide a bundlerized view
# of the world.
def replace_entrypoints(specs)
+ specs_by_name = add_default_gems_to(specs)
+
+ replace_gem(specs, specs_by_name)
+ stub_rubygems(specs)
+ replace_bin_path(specs_by_name)
+
+ Gem.clear_paths
+ end
+
+ # Add default gems not already present in specs, and return them as a hash.
+ def add_default_gems_to(specs)
specs_by_name = specs.reduce({}) do |h, s|
h[s.name] = s
h
@@ -420,11 +436,7 @@ module Bundler
specs_by_name[default_spec_name] = default_spec
end
- replace_gem(specs, specs_by_name)
- stub_rubygems(specs)
- replace_bin_path(specs_by_name)
-
- Gem.clear_paths
+ specs_by_name
end
def undo_replacements
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index a58a8386e9..e259b590bf 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -155,7 +155,7 @@ module Bundler
spec_cache_paths = []
spec_gemspec_paths = []
spec_extension_paths = []
- specs.each do |spec|
+ Bundler.rubygems.add_default_gems_to(specs).values.each do |spec|
spec_gem_paths << spec.full_gem_path
# need to check here in case gems are nested like for the rails git repo
md = %r{(.+bundler/gems/.+-[a-f0-9]{7,12})}.match(spec.full_gem_path)
@@ -203,7 +203,7 @@ module Bundler
output
end
- private
+ private
def prune_gem_cache(resolve, cache_path)
cached = Dir["#{cache_path}/*.gem"]
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index d6962e5b6e..6ce81b5006 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -63,30 +63,25 @@ module Bundler
].freeze
DEFAULT_CONFIG = {
- :silence_deprecations => false,
- :disable_version_check => true,
- :prefer_patch => false,
- :redirect => 5,
- :retry => 3,
- :timeout => 10,
+ "BUNDLE_SILENCE_DEPRECATIONS" => false,
+ "BUNDLE_DISABLE_VERSION_CHECK" => true,
+ "BUNDLE_PREFER_PATCH" => false,
+ "BUNDLE_REDIRECT" => 5,
+ "BUNDLE_RETRY" => 3,
+ "BUNDLE_TIMEOUT" => 10,
}.freeze
def initialize(root = nil)
@root = root
@local_config = load_config(local_config_file)
+ @env_config = ENV.to_h.select {|key, _value| key =~ /\ABUNDLE_.+/ }
@global_config = load_config(global_config_file)
@temporary = {}
end
def [](name)
key = key_for(name)
- value = @temporary.fetch(key) do
- @local_config.fetch(key) do
- ENV.fetch(key) do
- @global_config.fetch(key) do
- DEFAULT_CONFIG.fetch(name) do
- nil
- end end end end end
+ value = configs.values.map {|config| config[key] }.compact.first
converted_value(value, name)
end
@@ -129,9 +124,7 @@ module Bundler
end
def all
- env_keys = ENV.keys.grep(/\ABUNDLE_.+/)
-
- keys = @temporary.keys | @global_config.keys | @local_config.keys | env_keys
+ keys = @temporary.keys | @global_config.keys | @local_config.keys | @env_config.keys
keys.map do |key|
key.sub(/^BUNDLE_/, "").gsub(/__/, ".").downcase
@@ -168,13 +161,11 @@ module Bundler
def locations(key)
key = key_for(key)
- locations = {}
- locations[:temporary] = @temporary[key] if @temporary.key?(key)
- locations[:local] = @local_config[key] if @local_config.key?(key)
- locations[:env] = ENV[key] if ENV[key]
- locations[:global] = @global_config[key] if @global_config.key?(key)
- locations[:default] = DEFAULT_CONFIG[key] if DEFAULT_CONFIG.key?(key)
- locations
+ configs.keys.inject({}) do |partial_locations, level|
+ value_on_level = configs[level][key]
+ partial_locations[level] = value_on_level unless value_on_level.nil?
+ partial_locations
+ end
end
def pretty_values_for(exposed_key)
@@ -182,20 +173,20 @@ module Bundler
locations = []
- if @temporary.key?(key)
- locations << "Set for the current command: #{converted_value(@temporary[key], exposed_key).inspect}"
+ if value = @temporary[key]
+ locations << "Set for the current command: #{converted_value(value, exposed_key).inspect}"
end
- if @local_config.key?(key)
- locations << "Set for your local app (#{local_config_file}): #{converted_value(@local_config[key], exposed_key).inspect}"
+ if value = @local_config[key]
+ locations << "Set for your local app (#{local_config_file}): #{converted_value(value, exposed_key).inspect}"
end
- if value = ENV[key]
+ if value = @env_config[key]
locations << "Set via #{key}: #{converted_value(value, exposed_key).inspect}"
end
- if @global_config.key?(key)
- locations << "Set for the current user (#{global_config_file}): #{converted_value(@global_config[key], exposed_key).inspect}"
+ if value = @global_config[key]
+ locations << "Set for the current user (#{global_config_file}): #{converted_value(value, exposed_key).inspect}"
end
return ["You have not configured a value for `#{exposed_key}`"] if locations.empty?
@@ -204,17 +195,19 @@ module Bundler
# for legacy reasons, in Bundler 2, we do not respect :disable_shared_gems
def path
- key = key_for(:path)
- path = ENV[key] || @global_config[key]
- if path && !@temporary.key?(key) && !@local_config.key?(key)
- return Path.new(path, false, false)
+ configs.each do |_level, settings|
+ path = value_for("path", settings)
+ path_system = value_for("path.system", settings)
+ disabled_shared_gems = value_for("disable_shared_gems", settings)
+ next if path.nil? && path_system.nil? && disabled_shared_gems.nil?
+ system_path = path_system || (disabled_shared_gems == false)
+ return Path.new(path, system_path)
end
- system_path = self["path.system"] || (self[:disable_shared_gems] == false)
- Path.new(self[:path], system_path, Bundler.feature_flag.default_install_uses_path?)
+ Path.new(nil, false)
end
- Path = Struct.new(:explicit_path, :system_path, :default_install_uses_path) do
+ Path = Struct.new(:explicit_path, :system_path) do
def path
path = base_path
path = File.join(path, Bundler.ruby_scope) unless use_system_gems?
@@ -224,7 +217,7 @@ module Bundler
def use_system_gems?
return true if system_path
return false if explicit_path
- !default_install_uses_path
+ !Bundler.feature_flag.default_install_uses_path?
end
def base_path
@@ -277,9 +270,9 @@ module Bundler
def validate!
all.each do |raw_key|
- [@local_config, ENV, @global_config].each do |settings|
- value = converted_value(settings[key_for(raw_key)], raw_key)
- Validator.validate!(raw_key, value, settings.to_hash.dup)
+ [@local_config, @env_config, @global_config].each do |settings|
+ value = value_for(raw_key, settings)
+ Validator.validate!(raw_key, value, settings.dup)
end
end
end
@@ -290,7 +283,21 @@ module Bundler
"BUNDLE_#{key}"
end
- private
+ private
+
+ def configs
+ {
+ :temporary => @temporary,
+ :local => @local_config,
+ :env => @env_config,
+ :global => @global_config,
+ :default => DEFAULT_CONFIG,
+ }
+ end
+
+ def value_for(name, config)
+ converted_value(config[key_for(name)], name)
+ end
def parent_setting_for(name)
split_specific_setting_for(name)[0]
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 19fab78cc3..ca0ab67fb8 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -212,7 +212,7 @@ module Bundler
filesystem_access(gemfile_path) {|g| File.open(g, "w") {|file| file.puts contents } }
end
- private
+ private
def validate_bundle_path
path_separator = Bundler.rubygems.path_separator
diff --git a/lib/bundler/similarity_detector.rb b/lib/bundler/similarity_detector.rb
index bd9971f884..50e66b9cab 100644
--- a/lib/bundler/similarity_detector.rb
+++ b/lib/bundler/similarity_detector.rb
@@ -26,7 +26,7 @@ module Bundler
end
end
- protected
+ protected
# https://www.informit.com/articles/article.aspx?p=683059&seqNum=36
def levenshtein_distance(this, that, ins = 2, del = 2, sub = 1)
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index 4b2e305bda..be00143f5a 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -63,7 +63,7 @@ module Bundler
)
end
- private
+ private
def version_color(spec_version, locked_spec_version)
if Gem::Version.correct?(spec_version) && Gem::Version.correct?(locked_spec_version)
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 0b4d76939b..0157995cb0 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -234,7 +234,7 @@ module Bundler
@local
end
- private
+ private
def serialize_gemspecs_in(destination)
destination = destination.expand_path(Bundler.root) if destination.relative?
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index da03efde0c..5dc1c8de32 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -136,11 +136,13 @@ module Bundler
if submodules
git_retry "submodule update --init --recursive", :dir => destination
elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0")
- git_retry "submodule deinit --all --force", :dir => destination
+ inner_command = "git -C $toplevel submodule deinit --force $sm_path"
+ inner_command = inner_command.gsub("$") { '\$' } unless Bundler::WINDOWS
+ git_retry "submodule foreach --quiet \"#{inner_command}\"", :dir => destination
end
end
- private
+ private
def git_null(command, dir: SharedHelpers.pwd)
check_allowed(command)
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index e73e33d922..2c2e9023b3 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -125,7 +125,7 @@ module Bundler
@expanded_original_path ||= expand(original_path)
end
- private
+ private
def expanded_path
@expanded_path ||= expand(path)
@@ -171,7 +171,7 @@ module Bundler
if File.directory?(expanded_path)
# We sort depth-first since `<<` will override the earlier-found specs
- Dir["#{expanded_path}/#{@glob}"].sort_by {|p| -p.split(File::SEPARATOR).size }.each do |file|
+ Gem::Util.glob_files_in_dir(@glob, expanded_path).sort_by {|p| -p.split(File::SEPARATOR).size }.each do |file|
next unless spec = load_gemspec(file)
spec.source = self
diff --git a/lib/bundler/source/path/installer.rb b/lib/bundler/source/path/installer.rb
index 909e248412..6be58e2087 100644
--- a/lib/bundler/source/path/installer.rb
+++ b/lib/bundler/source/path/installer.rb
@@ -40,7 +40,7 @@ module Bundler
Bundler.rm_rf(@tmp_dir) if Bundler.requires_sudo?
end
- private
+ private
def generate_bin
super
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index ee11feda5c..97f9808578 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -291,7 +291,7 @@ module Bundler
names
end
- protected
+ protected
def credless_remotes
remotes.map(&method(:suppress_configured_credentials))
@@ -465,7 +465,7 @@ module Bundler
Bundler.app_cache
end
- private
+ private
# Checks if the requested spec exists in the global cache. If it does,
# we copy it to the download path, and if it does not, we download it.
diff --git a/lib/bundler/source/rubygems/remote.rb b/lib/bundler/source/rubygems/remote.rb
index 45ea61acb2..82c850ffbb 100644
--- a/lib/bundler/source/rubygems/remote.rb
+++ b/lib/bundler/source/rubygems/remote.rb
@@ -39,7 +39,7 @@ module Bundler
"rubygems remote at #{anonymized_uri}"
end
- private
+ private
def apply_auth(uri, auth)
if auth && uri.userinfo.nil?
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb
index d3f649a12c..731a791531 100644
--- a/lib/bundler/source_list.rb
+++ b/lib/bundler/source_list.rb
@@ -116,7 +116,7 @@ module Bundler
@rubygems_aggregate.remotes
end
- private
+ private
def rubygems_aggregate_class
Source::Rubygems
@@ -147,7 +147,7 @@ module Bundler
if source.uri =~ /^git\:/
Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \
"which transmits data without encryption. Disable this warning with " \
- "`bundle config set git.allow_insecure true`, or switch to the `https` " \
+ "`bundle config set --local git.allow_insecure true`, or switch to the `https` " \
"protocol to keep your data secure."
end
end
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 463113ef8e..46e023de87 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -147,7 +147,7 @@ module Bundler
sorted.each(&b)
end
- private
+ private
def sorted
rake = @specs.find {|s| s.name == "rake" }
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index c87b66ee19..a45e28b8a7 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -83,7 +83,7 @@ module Bundler
stub.raw_require_paths
end
- private
+ private
def _remote_specification
@_remote_specification ||= begin
diff --git a/lib/bundler/templates/newgem/README.md.tt b/lib/bundler/templates/newgem/README.md.tt
index c2f5f9dca7..f81b85ca97 100644
--- a/lib/bundler/templates/newgem/README.md.tt
+++ b/lib/bundler/templates/newgem/README.md.tt
@@ -28,7 +28,7 @@ TODO: Write usage instructions here
After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:test].sub('mini', '').sub('rspec', 'spec') %>` to run the tests.<% end %> You can also run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the gem in this directory, ignoring other installed copies of this gem.<% end %>
-To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
+To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
diff --git a/lib/bundler/templates/newgem/spec/spec_helper.rb.tt b/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
index 0bb8e6f165..70c6d1fcde 100644
--- a/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
+++ b/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
@@ -1,6 +1,5 @@
# frozen_string_literal: true
-require "bundler/setup"
require "<%= config[:namespaced_path] %>"
RSpec.configure do |config|
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index 92476be7d2..17777af4ac 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -28,17 +28,17 @@ module Bundler
tell_me(msg, :green, newline) if level("confirm")
end
- def warn(msg, newline = nil)
+ def warn(msg, newline = nil, color = :yellow)
return unless level("warn")
return if @warning_history.include? msg
@warning_history << msg
- tell_err(msg, :yellow, newline)
+ tell_err(msg, color, newline)
end
- def error(msg, newline = nil)
+ def error(msg, newline = nil, color = :red)
return unless level("error")
- tell_err(msg, :red, newline)
+ tell_err(msg, color, newline)
end
def debug(msg, newline = nil)
@@ -92,7 +92,7 @@ module Bundler
[]
end
- private
+ private
# valimism
def tell_me(msg, color = nil, newline = nil)
diff --git a/lib/bundler/uri_credentials_filter.rb b/lib/bundler/uri_credentials_filter.rb
index 9b9e9c2799..3f49254e71 100644
--- a/lib/bundler/uri_credentials_filter.rb
+++ b/lib/bundler/uri_credentials_filter.rb
@@ -2,7 +2,7 @@
module Bundler
module URICredentialsFilter
- module_function
+ module_function
def credential_filtered_uri(uri_to_anonymize)
return uri_to_anonymize if uri_to_anonymize.nil?
diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
index d0ab956faf..847479a0af 100644
--- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
+++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
@@ -3,8 +3,6 @@ require_relative '../../../../uri/lib/uri'
require 'cgi' # for escaping
require_relative '../../../../connection_pool/lib/connection_pool'
-autoload :OpenSSL, 'openssl'
-
##
# Persistent connections for Net::HTTP
#
@@ -149,9 +147,14 @@ class Bundler::Persistent::Net::HTTP::Persistent
EPOCH = Time.at 0 # :nodoc:
##
- # Is OpenSSL available? This test works with autoload
+ # Is OpenSSL available?
- HAVE_OPENSSL = defined? OpenSSL::SSL # :nodoc:
+ HAVE_OPENSSL = begin # :nodoc:
+ require 'openssl'
+ true
+ rescue LoadError
+ false
+ end
##
# The default connection pool size is 1/4 the allowed open files
diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb
index 272fe85cab..4b2b0ec3c1 100644
--- a/lib/bundler/version.rb
+++ b/lib/bundler/version.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
module Bundler
- VERSION = "2.2.0.rc.1".freeze
+ VERSION = "2.2.0.rc.2".freeze
def self.bundler_major_version
@bundler_major_version ||= VERSION.split(".").first.to_i
diff --git a/lib/bundler/worker.rb b/lib/bundler/worker.rb
index 3471654b43..10139ed25b 100644
--- a/lib/bundler/worker.rb
+++ b/lib/bundler/worker.rb
@@ -48,7 +48,7 @@ module Bundler
stop_threads
end
- private
+ private
def process_queue(i)
loop do
diff --git a/lib/bundler/yaml_serializer.rb b/lib/bundler/yaml_serializer.rb
index 374b3bb5e3..d5ecbd4aef 100644
--- a/lib/bundler/yaml_serializer.rb
+++ b/lib/bundler/yaml_serializer.rb
@@ -3,7 +3,7 @@
module Bundler
# A stub yaml serializer that can handle only hashes and strings (as of now).
module YAMLSerializer
- module_function
+ module_function
def dump(hash)
yaml = String.new("---")
diff --git a/man/bundle-add.1 b/man/bundle-add.1
index b5f4edb006..486c249719 100644
--- a/man/bundle-add.1
+++ b/man/bundle-add.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-ADD" "1" "July 2020" "" ""
+.TH "BUNDLE\-ADD" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
diff --git a/man/bundle-add.ronn b/man/bundle-add.1.ronn
index 26cbe55647..26cbe55647 100644
--- a/man/bundle-add.ronn
+++ b/man/bundle-add.1.ronn
diff --git a/man/bundle-add.1.txt b/man/bundle-add.1.txt
deleted file mode 100644
index 10fd00ad41..0000000000
--- a/man/bundle-add.1.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-BUNDLE-ADD(1) BUNDLE-ADD(1)
-
-
-
-NAME
- bundle-add - Add gem to the Gemfile and run bundle install
-
-SYNOPSIS
- bundle add GEM_NAME [--group=GROUP] [--version=VERSION]
- [--source=SOURCE] [--git=GIT] [--branch=BRANCH] [--skip-install]
- [--strict] [--optimistic]
-
-DESCRIPTION
- Adds the named gem to the Gemfile and run bundle install. bundle
- install can be avoided by using the flag --skip-install.
-
- Example:
-
- bundle add rails
-
- bundle add rails --version "< 3.0, > 1.1"
-
- bundle add rails --version "~> 5.0.0" --source
- "https://gems.example.com" --group "development"
-
- bundle add rails --skip-install
-
- bundle add rails --group "development, test"
-
-OPTIONS
- --version, -v
- Specify version requirements(s) for the added gem.
-
- --group, -g
- Specify the group(s) for the added gem. Multiple groups should
- be separated by commas.
-
- --source, , -s
- Specify the source for the added gem.
-
- --git Specify the git source for the added gem.
-
- --branch
- Specify the git branch for the added gem.
-
- --skip-install
- Adds the gem to the Gemfile but does not install it.
-
- --optimistic
- Adds optimistic declaration of version
-
- --strict
- Adds strict declaration of version
-
-
-
-
- July 2020 BUNDLE-ADD(1)
diff --git a/man/bundle-binstubs.1 b/man/bundle-binstubs.1
index db55caccfb..782a464c16 100644
--- a/man/bundle-binstubs.1
+++ b/man/bundle-binstubs.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-BINSTUBS" "1" "July 2020" "" ""
+.TH "BUNDLE\-BINSTUBS" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
@@ -36,5 +36,7 @@ Makes binstubs that can work without depending on Rubygems or Bundler at runtime
\fB\-\-shebang\fR
Specify a different shebang executable name than the default (default \'ruby\')
.
-.SH "BUNDLE INSTALL \-\-BINSTUBS"
-To create binstubs for all the gems in the bundle you can use the \fB\-\-binstubs\fR flag in bundle install(1) \fIbundle\-install\.1\.html\fR\.
+.TP
+\fB\-\-all\fR
+Create binstubs for all gems in the bundle\.
+
diff --git a/man/bundle-binstubs.ronn b/man/bundle-binstubs.1.ronn
index 8909fdc3da..a96186929f 100644
--- a/man/bundle-binstubs.ronn
+++ b/man/bundle-binstubs.1.ronn
@@ -37,7 +37,5 @@ Calling binstubs with [GEM [GEM]] will create binstubs for all given gems.
* `--shebang`:
Specify a different shebang executable name than the default (default 'ruby')
-## BUNDLE INSTALL --BINSTUBS
-
-To create binstubs for all the gems in the bundle you can use the `--binstubs`
-flag in [bundle install(1)](bundle-install.1.html).
+* `--all`:
+ Create binstubs for all gems in the bundle.
diff --git a/man/bundle-binstubs.1.txt b/man/bundle-binstubs.1.txt
deleted file mode 100644
index 76e7b978b2..0000000000
--- a/man/bundle-binstubs.1.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-BUNDLE-BINSTUBS(1) BUNDLE-BINSTUBS(1)
-
-
-
-NAME
- bundle-binstubs - Install the binstubs of the listed gems
-
-SYNOPSIS
- bundle binstubs GEM_NAME [--force] [--path PATH] [--standalone]
-
-DESCRIPTION
- Binstubs are scripts that wrap around executables. Bundler creates a
- small Ruby file (a binstub) that loads Bundler, runs the command, and
- puts it into bin/. Binstubs are a shortcut-or alternative- to always
- using bundle exec. This gives you a file that can be run directly, and
- one that will always run the correct gem version used by the
- application.
-
- For example, if you run bundle binstubs rspec-core, Bundler will create
- the file bin/rspec. That file will contain enough code to load Bundler,
- tell it to load the bundled gems, and then run rspec.
-
- This command generates binstubs for executables in GEM_NAME. Binstubs
- are put into bin, or the --path directory if one has been set. Calling
- binstubs with [GEM [GEM]] will create binstubs for all given gems.
-
-OPTIONS
- --force
- Overwrite existing binstubs if they exist.
-
- --path The location to install the specified binstubs to. This defaults
- to bin.
-
- --standalone
- Makes binstubs that can work without depending on Rubygems or
- Bundler at runtime.
-
- --shebang
- Specify a different shebang executable name than the default
- (default 'ruby')
-
-BUNDLE INSTALL --BINSTUBS
- To create binstubs for all the gems in the bundle you can use the
- --binstubs flag in bundle install(1) bundle-install.1.html.
-
-
-
- July 2020 BUNDLE-BINSTUBS(1)
diff --git a/man/bundle-cache.1 b/man/bundle-cache.1
index 5665c51924..f840893f96 100644
--- a/man/bundle-cache.1
+++ b/man/bundle-cache.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-CACHE" "1" "July 2020" "" ""
+.TH "BUNDLE\-CACHE" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
diff --git a/man/bundle-cache.ronn b/man/bundle-cache.1.ronn
index 383adb2ba3..383adb2ba3 100644
--- a/man/bundle-cache.ronn
+++ b/man/bundle-cache.1.ronn
diff --git a/man/bundle-cache.1.txt b/man/bundle-cache.1.txt
deleted file mode 100644
index f972c22b5f..0000000000
--- a/man/bundle-cache.1.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-BUNDLE-CACHE(1) BUNDLE-CACHE(1)
-
-
-
-NAME
- bundle-cache - Package your needed .gem files into your application
-
-SYNOPSIS
- bundle cache
-
-DESCRIPTION
- Copy all of the .gem files needed to run the application into the
- vendor/cache directory. In the future, when running [bundle
- install(1)][bundle-install], use the gems in the cache in preference to
- the ones on rubygems.org.
-
-GIT AND PATH GEMS
- The bundle cache command can also package :git and :path dependencies
- besides .gem files. This needs to be explicitly enabled via the --all
- option. Once used, the --all option will be remembered.
-
-SUPPORT FOR MULTIPLE PLATFORMS
- When using gems that have different packages for different platforms,
- Bundler supports caching of gems for other platforms where the Gemfile
- has been resolved (i.e. present in the lockfile) in vendor/cache. This
- needs to be enabled via the --all-platforms option. This setting will
- be remembered in your local bundler configuration.
-
-REMOTE FETCHING
- By default, if you run bundle install(1)](bundle-install.1.html) after
- running bundle cache(1) bundle-cache.1.html, bundler will still connect
- to rubygems.org to check whether a platform-specific gem exists for any
- of the gems in vendor/cache.
-
- For instance, consider this Gemfile(5):
-
-
-
- source "https://rubygems.org"
-
- gem "nokogiri"
-
-
-
- If you run bundle cache under C Ruby, bundler will retrieve the version
- of nokogiri for the "ruby" platform. If you deploy to JRuby and run
- bundle install, bundler is forced to check to see whether a "java"
- platformed nokogiri exists.
-
- Even though the nokogiri gem for the Ruby platform is technically
- acceptable on JRuby, it has a C extension that does not run on JRuby.
- As a result, bundler will, by default, still connect to rubygems.org to
- check whether it has a version of one of your gems more specific to
- your platform.
-
- This problem is also not limited to the "java" platform. A similar
- (common) problem can happen when developing on Windows and deploying to
- Linux, or even when developing on OSX and deploying to Linux.
-
- If you know for sure that the gems packaged in vendor/cache are
- appropriate for the platform you are on, you can run bundle install
- --local to skip checking for more appropriate gems, and use the ones in
- vendor/cache.
-
- One way to be sure that you have the right platformed versions of all
- your gems is to run bundle cache on an identical machine and check in
- the gems. For instance, you can run bundle cache on an identical
- staging box during your staging process, and check in the vendor/cache
- before deploying to production.
-
- By default, bundle cache(1) bundle-cache.1.html fetches and also
- installs the gems to the default location. To package the dependencies
- to vendor/cache without installing them to the local install location,
- you can run bundle cache --no-install.
-
-
-
- July 2020 BUNDLE-CACHE(1)
diff --git a/man/bundle-check.1 b/man/bundle-check.1
index 40a071f03e..4c7bc3f329 100644
--- a/man/bundle-check.1
+++ b/man/bundle-check.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-CHECK" "1" "July 2020" "" ""
+.TH "BUNDLE\-CHECK" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
diff --git a/man/bundle-check.ronn b/man/bundle-check.1.ronn
index f2846b8ff2..f2846b8ff2 100644
--- a/man/bundle-check.ronn
+++ b/man/bundle-check.1.ronn
diff --git a/man/bundle-check.1.txt b/man/bundle-check.1.txt
deleted file mode 100644
index fc5eb204ec..0000000000
--- a/man/bundle-check.1.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-BUNDLE-CHECK(1) BUNDLE-CHECK(1)
-
-
-
-NAME
- bundle-check - Verifies if dependencies are satisfied by installed gems
-
-SYNOPSIS
- bundle check [--dry-run] [--gemfile=FILE] [--path=PATH]
-
-DESCRIPTION
- check searches the local machine for each of the gems requested in the
- Gemfile. If all gems are found, Bundler prints a success message and
- exits with a status of 0.
-
- If not, the first missing gem is listed and Bundler exits status 1.
-
-OPTIONS
- --dry-run
- Locks the [Gemfile(5)][Gemfile(5)] before running the command.
-
- --gemfile
- Use the specified gemfile instead of the
- [Gemfile(5)][Gemfile(5)].
-
- --path Specify a different path than the system default ($BUNDLE_PATH
- or $GEM_HOME). Bundler will remember this value for future
- installs on this machine.
-
-
-
-
- July 2020 BUNDLE-CHECK(1)
diff --git a/man/bundle-clean.1 b/man/bundle-clean.1
index 96abb45609..dd1682a48b 100644
--- a/man/bundle-clean.1
+++ b/man/bundle-clean.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-CLEAN" "1" "July 2020" "" ""
+.TH "BUNDLE\-CLEAN" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
diff --git a/man/bundle-clean.ronn b/man/bundle-clean.1.ronn
index de23991782..de23991782 100644
--- a/man/bundle-clean.ronn
+++ b/man/bundle-clean.1.ronn
diff --git a/man/bundle-clean.1.txt b/man/bundle-clean.1.txt
deleted file mode 100644
index 7f2097f627..0000000000
--- a/man/bundle-clean.1.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-BUNDLE-CLEAN(1) BUNDLE-CLEAN(1)
-
-
-
-NAME
- bundle-clean - Cleans up unused gems in your bundler directory
-
-SYNOPSIS
- bundle clean [--dry-run] [--force]
-
-DESCRIPTION
- This command will remove all unused gems in your bundler directory.
- This is useful when you have made many changes to your gem
- dependencies.
-
-OPTIONS
- --dry-run
- Print the changes, but do not clean the unused gems.
-
- --force
- Force a clean even if --path is not set.
-
-
-
-
- July 2020 BUNDLE-CLEAN(1)
diff --git a/man/bundle-config.1 b/man/bundle-config.1
index f1860af299..d989aaeb86 100644
--- a/man/bundle-config.1
+++ b/man/bundle-config.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-CONFIG" "1" "July 2020" "" ""
+.TH "BUNDLE\-CONFIG" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-config\fR \- Set bundler configuration options
@@ -57,13 +57,13 @@ Executing \fBbundle config unset \-\-local <name> <value>\fR will delete the con
Executing bundle with the \fBBUNDLE_IGNORE_CONFIG\fR environment variable set will cause it to ignore all configuration\.
.
.P
-Executing \fBbundle config set disable_multisource true\fR upgrades the warning about the Gemfile containing multiple primary sources to an error\. Executing \fBbundle config unset disable_multisource\fR downgrades this error to a warning\.
+Executing \fBbundle config set \-\-local disable_multisource true\fR upgrades the warning about the Gemfile containing multiple primary sources to an error\. Executing \fBbundle config unset disable_multisource\fR downgrades this error to a warning\.
.
.SH "REMEMBERING OPTIONS"
Flags passed to \fBbundle install\fR or the Bundler runtime, such as \fB\-\-path foo\fR or \fB\-\-without production\fR, are remembered between commands and saved to your local application\'s configuration (normally, \fB\./\.bundle/config\fR)\.
.
.P
-However, this will be changed in bundler 3, so it\'s better not to rely on this behavior\. If these options must be remembered, it\'s better to set them using \fBbundle config\fR (e\.g\., \fBbundle config set path foo\fR)\.
+However, this will be changed in bundler 3, so it\'s better not to rely on this behavior\. If these options must be remembered, it\'s better to set them using \fBbundle config\fR (e\.g\., \fBbundle config set \-\-local path foo\fR)\.
.
.P
The options that can be configured are:
@@ -111,7 +111,7 @@ Since the specific location of that executable can change from machine to machin
.
.nf
-bundle config set build\.mysql \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
+bundle config set \-\-global build\.mysql \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
.
.fi
.
@@ -154,7 +154,7 @@ The following is a list of all configuration keys and their purpose\. You can le
\fBbin\fR (\fBBUNDLE_BIN\fR): Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
.
.IP "\(bu" 4
-\fBcache_all\fR (\fBBUNDLE_CACHE_ALL\fR): Cache all gems, including path and git gems\.
+\fBcache_all\fR (\fBBUNDLE_CACHE_ALL\fR): Cache all gems, including path and git gems\. This needs to be explicitly configured on bundler 1 and bundler 2, but will be the default on bundler 3\.
.
.IP "\(bu" 4
\fBcache_all_platforms\fR (\fBBUNDLE_CACHE_ALL_PLATFORMS\fR): Cache gems for all platforms\.
@@ -312,7 +312,7 @@ Bundler also allows you to work against a git repository locally instead of usin
.
.nf
-bundle config set local\.GEM_NAME /path/to/local/git/repository
+bundle config set \-\-local local\.GEM_NAME /path/to/local/git/repository
.
.fi
.
@@ -325,7 +325,7 @@ For example, in order to use a local Rack repository, a developer could call:
.
.nf
-bundle config set local\.rack ~/Work/git/rack
+bundle config set \-\-local local\.rack ~/Work/git/rack
.
.fi
.
@@ -347,7 +347,7 @@ Bundler supports overriding gem sources with mirrors\. This allows you to config
.
.nf
-bundle config set mirror\.SOURCE_URL MIRROR_URL
+bundle config set \-\-global mirror\.SOURCE_URL MIRROR_URL
.
.fi
.
@@ -360,7 +360,7 @@ For example, to use a mirror of rubygems\.org hosted at rubygems\-mirror\.org:
.
.nf
-bundle config set mirror\.http://rubygems\.org http://rubygems\-mirror\.org
+bundle config set \-\-global mirror\.http://rubygems\.org http://rubygems\-mirror\.org
.
.fi
.
@@ -373,7 +373,7 @@ Each mirror also provides a fallback timeout setting\. If the mirror does not re
.
.nf
-bundle config set mirror\.SOURCE_URL\.fallback_timeout TIMEOUT
+bundle config set \-\-global mirror\.SOURCE_URL\.fallback_timeout TIMEOUT
.
.fi
.
@@ -386,7 +386,7 @@ For example, to fall back to rubygems\.org after 3 seconds:
.
.nf
-bundle config set mirror\.https://rubygems\.org\.fallback_timeout 3
+bundle config set \-\-global mirror\.https://rubygems\.org\.fallback_timeout 3
.
.fi
.
@@ -402,7 +402,7 @@ Bundler allows you to configure credentials for any gem source, which allows you
.
.nf
-bundle config set SOURCE_HOSTNAME USERNAME:PASSWORD
+bundle config set \-\-global SOURCE_HOSTNAME USERNAME:PASSWORD
.
.fi
.
@@ -415,7 +415,7 @@ For example, to save the credentials of user \fBclaudette\fR for the gem source
.
.nf
-bundle config set gems\.longerous\.com claudette:s00pers3krit
+bundle config set \-\-global gems\.longerous\.com claudette:s00pers3krit
.
.fi
.
@@ -441,7 +441,7 @@ For gems with a git source with HTTP(S) URL you can specify credentials like so:
.
.nf
-bundle config set https://github\.com/bundler/bundler\.git username:password
+bundle config set \-\-global https://github\.com/bundler/bundler\.git username:password
.
.fi
.
diff --git a/man/bundle-config.ronn b/man/bundle-config.1.ronn
index a2cb42bc35..a0ff30cb15 100644
--- a/man/bundle-config.ronn
+++ b/man/bundle-config.1.ronn
@@ -47,7 +47,7 @@ configuration only from the local application.
Executing bundle with the `BUNDLE_IGNORE_CONFIG` environment variable set will
cause it to ignore all configuration.
-Executing `bundle config set disable_multisource true` upgrades the warning about
+Executing `bundle config set --local disable_multisource true` upgrades the warning about
the Gemfile containing multiple primary sources to an error. Executing `bundle
config unset disable_multisource` downgrades this error to a warning.
@@ -59,7 +59,7 @@ application's configuration (normally, `./.bundle/config`).
However, this will be changed in bundler 3, so it's better not to rely on this
behavior. If these options must be remembered, it's better to set them using
-`bundle config` (e.g., `bundle config set path foo`).
+`bundle config` (e.g., `bundle config set --local path foo`).
The options that can be configured are:
@@ -103,7 +103,7 @@ pass configuration flags to `gem install` to specify where to find the
Since the specific location of that executable can change from machine
to machine, you can specify these flags on a per-machine basis.
- bundle config set build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
+ bundle config set --global build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
After running this command, every time bundler needs to install the
`mysql` gem, it will pass along the flags you specified.
@@ -150,7 +150,8 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
Install executables from gems in the bundle to the specified directory.
Defaults to `false`.
* `cache_all` (`BUNDLE_CACHE_ALL`):
- Cache all gems, including path and git gems.
+ Cache all gems, including path and git gems. This needs to be explicitly
+ configured on bundler 1 and bundler 2, but will be the default on bundler 3.
* `cache_all_platforms` (`BUNDLE_CACHE_ALL_PLATFORMS`):
Cache gems for all platforms.
* `cache_path` (`BUNDLE_CACHE_PATH`):
@@ -299,11 +300,11 @@ Bundler also allows you to work against a git repository locally
instead of using the remote version. This can be achieved by setting
up a local override:
- bundle config set local.GEM_NAME /path/to/local/git/repository
+ bundle config set --local local.GEM_NAME /path/to/local/git/repository
For example, in order to use a local Rack repository, a developer could call:
- bundle config set local.rack ~/Work/git/rack
+ bundle config set --local local.rack ~/Work/git/rack
Now instead of checking out the remote git repository, the local
override will be used. Similar to a path source, every time the local
@@ -333,21 +334,21 @@ Bundler supports overriding gem sources with mirrors. This allows you to
configure rubygems.org as the gem source in your Gemfile while still using your
mirror to fetch gems.
- bundle config set mirror.SOURCE_URL MIRROR_URL
+ bundle config set --global mirror.SOURCE_URL MIRROR_URL
For example, to use a mirror of rubygems.org hosted at rubygems-mirror.org:
- bundle config set mirror.http://rubygems.org http://rubygems-mirror.org
+ bundle config set --global mirror.http://rubygems.org http://rubygems-mirror.org
Each mirror also provides a fallback timeout setting. If the mirror does not
respond within the fallback timeout, Bundler will try to use the original
server instead of the mirror.
- bundle config set mirror.SOURCE_URL.fallback_timeout TIMEOUT
+ bundle config set --global mirror.SOURCE_URL.fallback_timeout TIMEOUT
For example, to fall back to rubygems.org after 3 seconds:
- bundle config set mirror.https://rubygems.org.fallback_timeout 3
+ bundle config set --global mirror.https://rubygems.org.fallback_timeout 3
The default fallback timeout is 0.1 seconds, but the setting can currently
only accept whole seconds (for example, 1, 15, or 30).
@@ -357,12 +358,12 @@ only accept whole seconds (for example, 1, 15, or 30).
Bundler allows you to configure credentials for any gem source, which allows
you to avoid putting secrets into your Gemfile.
- bundle config set SOURCE_HOSTNAME USERNAME:PASSWORD
+ bundle config set --global SOURCE_HOSTNAME USERNAME:PASSWORD
For example, to save the credentials of user `claudette` for the gem source at
`gems.longerous.com`, you would run:
- bundle config set gems.longerous.com claudette:s00pers3krit
+ bundle config set --global gems.longerous.com claudette:s00pers3krit
Or you can set the credentials as an environment variable like this:
@@ -370,7 +371,7 @@ Or you can set the credentials as an environment variable like this:
For gems with a git source with HTTP(S) URL you can specify credentials like so:
- bundle config set https://github.com/bundler/bundler.git username:password
+ bundle config set --global https://github.com/bundler/bundler.git username:password
Or you can set the credentials as an environment variable like so:
diff --git a/man/bundle-config.1.txt b/man/bundle-config.1.txt
deleted file mode 100644
index 81f3a14254..0000000000
--- a/man/bundle-config.1.txt
+++ /dev/null
@@ -1,527 +0,0 @@
-BUNDLE-CONFIG(1) BUNDLE-CONFIG(1)
-
-
-
-NAME
- bundle-config - Set bundler configuration options
-
-SYNOPSIS
- bundle config [list|get|set|unset] [name [value]]
-
-DESCRIPTION
- This command allows you to interact with Bundler's configuration
- system.
-
- Bundler loads configuration settings in this order:
-
- 1. Local config (<project_root>/.bundle/config or
- $BUNDLE_APP_CONFIG/config)
-
- 2. Environmental variables (ENV)
-
- 3. Global config (~/.bundle/config)
-
- 4. Bundler default config
-
-
-
- Executing bundle config list with will print a list of all bundler
- configuration for the current bundle, and where that configuration was
- set.
-
- Executing bundle config get <name> will print the value of that
- configuration setting, and where it was set.
-
- Executing bundle config set <name> <value> will set that configuration
- to the value specified for all bundles executed as the current user.
- The configuration will be stored in ~/.bundle/config. If name already
- is set, name will be overridden and user will be warned.
-
- Executing bundle config set --global <name> <value> works the same as
- above.
-
- Executing bundle config set --local <name> <value> will set that
- configuration in the directory for the local application. The
- configuration will be stored in <project_root>/.bundle/config. If
- BUNDLE_APP_CONFIG is set, the configuration will be stored in
- $BUNDLE_APP_CONFIG/config.
-
- Executing bundle config unset <name> will delete the configuration in
- both local and global sources.
-
- Executing bundle config unset --global <name> will delete the
- configuration only from the user configuration.
-
- Executing bundle config unset --local <name> <value> will delete the
- configuration only from the local application.
-
- Executing bundle with the BUNDLE_IGNORE_CONFIG environment variable set
- will cause it to ignore all configuration.
-
- Executing bundle config set disable_multisource true upgrades the
- warning about the Gemfile containing multiple primary sources to an
- error. Executing bundle config unset disable_multisource downgrades
- this error to a warning.
-
-REMEMBERING OPTIONS
- Flags passed to bundle install or the Bundler runtime, such as --path
- foo or --without production, are remembered between commands and saved
- to your local application's configuration (normally, ./.bundle/config).
-
- However, this will be changed in bundler 3, so it's better not to rely
- on this behavior. If these options must be remembered, it's better to
- set them using bundle config (e.g., bundle config set path foo).
-
- The options that can be configured are:
-
- bin Creates a directory (defaults to ~/bin) and place any
- executables from the gem there. These executables run in
- Bundler's context. If used, you might add this directory to your
- environment's PATH variable. For instance, if the rails gem
- comes with a rails executable, this flag will create a bin/rails
- executable that ensures that all referred dependencies will be
- resolved using the bundled gems.
-
- deployment
- In deployment mode, Bundler will 'roll-out' the bundle for
- production use. Please check carefully if you want to have this
- option enabled in development or test environments.
-
- path The location to install the specified gems to. This defaults to
- Rubygems' setting. Bundler shares this location with Rubygems,
- gem install ... will have gem installed there, too. Therefore,
- gems installed without a --path ... setting will show up by
- calling gem list. Accordingly, gems installed to other locations
- will not get listed.
-
- without
- A space-separated list of groups referencing gems to skip during
- installation.
-
- with A space-separated list of groups referencing gems to include
- during installation.
-
-BUILD OPTIONS
- You can use bundle config to give Bundler the flags to pass to the gem
- installer every time bundler tries to install a particular gem.
-
- A very common example, the mysql gem, requires Snow Leopard users to
- pass configuration flags to gem install to specify where to find the
- mysql_config executable.
-
-
-
- gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
-
-
-
- Since the specific location of that executable can change from machine
- to machine, you can specify these flags on a per-machine basis.
-
-
-
- bundle config set build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
-
-
-
- After running this command, every time bundler needs to install the
- mysql gem, it will pass along the flags you specified.
-
-CONFIGURATION KEYS
- Configuration keys in bundler have two forms: the canonical form and
- the environment variable form.
-
- For instance, passing the --without flag to bundle install(1)
- bundle-install.1.html prevents Bundler from installing certain groups
- specified in the Gemfile(5). Bundler persists this value in
- app/.bundle/config so that calls to Bundler.setup do not try to find
- gems from the Gemfile that you didn't install. Additionally, subsequent
- calls to bundle install(1) bundle-install.1.html remember this setting
- and skip those groups.
-
- The canonical form of this configuration is "without". To convert the
- canonical form to the environment variable form, capitalize it, and
- prepend BUNDLE_. The environment variable form of "without" is
- BUNDLE_WITHOUT.
-
- Any periods in the configuration keys must be replaced with two
- underscores when setting it via environment variables. The
- configuration key local.rack becomes the environment variable
- BUNDLE_LOCAL__RACK.
-
-LIST OF AVAILABLE KEYS
- The following is a list of all configuration keys and their purpose.
- You can learn more about their operation in bundle install(1)
- bundle-install.1.html.
-
- o allow_bundler_dependency_conflicts
- (BUNDLE_ALLOW_BUNDLER_DEPENDENCY_CONFLICTS): Allow resolving to
- specifications that have dependencies on bundler that are
- incompatible with the running Bundler version.
-
- o allow_deployment_source_credential_changes
- (BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES): When in
- deployment mode, allow changing the credentials to a gem's source.
- Ex: https://some.host.com/gems/path/ ->
- https://user_name:password@some.host.com/gems/path
-
- o allow_offline_install (BUNDLE_ALLOW_OFFLINE_INSTALL): Allow Bundler
- to use cached data when installing without network access.
-
- o auto_clean_without_path (BUNDLE_AUTO_CLEAN_WITHOUT_PATH):
- Automatically run bundle clean after installing when an explicit
- path has not been set and Bundler is not installing into the system
- gems.
-
- o auto_install (BUNDLE_AUTO_INSTALL): Automatically run bundle
- install when gems are missing.
-
- o bin (BUNDLE_BIN): Install executables from gems in the bundle to
- the specified directory. Defaults to false.
-
- o cache_all (BUNDLE_CACHE_ALL): Cache all gems, including path and
- git gems.
-
- o cache_all_platforms (BUNDLE_CACHE_ALL_PLATFORMS): Cache gems for
- all platforms.
-
- o cache_path (BUNDLE_CACHE_PATH): The directory that bundler will
- place cached gems in when running bundle package, and that bundler
- will look in when installing gems. Defaults to vendor/cache.
-
- o clean (BUNDLE_CLEAN): Whether Bundler should run bundle clean
- automatically after bundle install.
-
- o console (BUNDLE_CONSOLE): The console that bundle console starts.
- Defaults to irb.
-
- o default_install_uses_path (BUNDLE_DEFAULT_INSTALL_USES_PATH):
- Whether a bundle install without an explicit --path argument
- defaults to installing gems in .bundle.
-
- o deployment (BUNDLE_DEPLOYMENT): Disallow changes to the Gemfile.
- When the Gemfile is changed and the lockfile has not been updated,
- running Bundler commands will be blocked.
-
- o disable_checksum_validation (BUNDLE_DISABLE_CHECKSUM_VALIDATION):
- Allow installing gems even if they do not match the checksum
- provided by RubyGems.
-
- o disable_exec_load (BUNDLE_DISABLE_EXEC_LOAD): Stop Bundler from
- using load to launch an executable in-process in bundle exec.
-
- o disable_local_branch_check (BUNDLE_DISABLE_LOCAL_BRANCH_CHECK):
- Allow Bundler to use a local git override without a branch
- specified in the Gemfile.
-
- o disable_multisource (BUNDLE_DISABLE_MULTISOURCE): When set,
- Gemfiles containing multiple sources will produce errors instead of
- warnings. Use bundle config unset disable_multisource to unset.
-
- o disable_shared_gems (BUNDLE_DISABLE_SHARED_GEMS): Stop Bundler from
- accessing gems installed to RubyGems' normal location.
-
- o disable_version_check (BUNDLE_DISABLE_VERSION_CHECK): Stop Bundler
- from checking if a newer Bundler version is available on
- rubygems.org.
-
- o force_ruby_platform (BUNDLE_FORCE_RUBY_PLATFORM): Ignore the
- current machine's platform and install only ruby platform gems. As
- a result, gems with native extensions will be compiled from source.
-
- o frozen (BUNDLE_FROZEN): Disallow changes to the Gemfile. When the
- Gemfile is changed and the lockfile has not been updated, running
- Bundler commands will be blocked. Defaults to true when
- --deployment is used.
-
- o gem.push_key (BUNDLE_GEM__PUSH_KEY): Sets the --key parameter for
- gem push when using the rake release command with a private
- gemstash server.
-
- o gemfile (BUNDLE_GEMFILE): The name of the file that bundler should
- use as the Gemfile. This location of this file also sets the root
- of the project, which is used to resolve relative paths in the
- Gemfile, among other things. By default, bundler will search up
- from the current working directory until it finds a Gemfile.
-
- o global_gem_cache (BUNDLE_GLOBAL_GEM_CACHE): Whether Bundler should
- cache all gems globally, rather than locally to the installing Ruby
- installation.
-
- o ignore_messages (BUNDLE_IGNORE_MESSAGES): When set, no post install
- messages will be printed. To silence a single gem, use dot notation
- like ignore_messages.httparty true.
-
- o init_gems_rb (BUNDLE_INIT_GEMS_RB) Generate a gems.rb instead of a
- Gemfile when running bundle init.
-
- o jobs (BUNDLE_JOBS): The number of gems Bundler can install in
- parallel. Defaults to 1.
-
- o no_install (BUNDLE_NO_INSTALL): Whether bundle package should skip
- installing gems.
-
- o no_prune (BUNDLE_NO_PRUNE): Whether Bundler should leave outdated
- gems unpruned when caching.
-
- o only_update_to_newer_versions
- (BUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONS): During bundle update, only
- resolve to newer versions of the gems in the lockfile.
-
- o path (BUNDLE_PATH): The location on disk where all gems in your
- bundle will be located regardless of $GEM_HOME or $GEM_PATH values.
- Bundle gems not found in this location will be installed by bundle
- install. Defaults to Gem.dir. When --deployment is used, defaults
- to vendor/bundle.
-
- o path.system (BUNDLE_PATH__SYSTEM): Whether Bundler will install
- gems into the default system path (Gem.dir).
-
- o path_relative_to_cwd (BUNDLE_PATH_RELATIVE_TO_CWD) Makes --path
- relative to the CWD instead of the Gemfile.
-
- o plugins (BUNDLE_PLUGINS): Enable Bundler's experimental plugin
- system.
-
- o prefer_patch (BUNDLE_PREFER_PATCH): Prefer updating only to next
- patch version during updates. Makes bundle update calls equivalent
- to bundler update --patch.
-
- o print_only_version_number (BUNDLE_PRINT_ONLY_VERSION_NUMBER) Print
- only version number from bundler --version.
-
- o redirect (BUNDLE_REDIRECT): The number of redirects allowed for
- network requests. Defaults to 5.
-
- o retry (BUNDLE_RETRY): The number of times to retry failed network
- requests. Defaults to 3.
-
- o setup_makes_kernel_gem_public
- (BUNDLE_SETUP_MAKES_KERNEL_GEM_PUBLIC): Have Bundler.setup make the
- Kernel#gem method public, even though RubyGems declares it as
- private.
-
- o shebang (BUNDLE_SHEBANG): The program name that should be invoked
- for generated binstubs. Defaults to the ruby install name used to
- generate the binstub.
-
- o silence_deprecations (BUNDLE_SILENCE_DEPRECATIONS): Whether Bundler
- should silence deprecation warnings for behavior that will be
- changed in the next major version.
-
- o silence_root_warning (BUNDLE_SILENCE_ROOT_WARNING): Silence the
- warning Bundler prints when installing gems as root.
-
- o specific_platform (BUNDLE_SPECIFIC_PLATFORM): Allow bundler to
- resolve for the specific running platform and store it in the
- lockfile, instead of only using a generic platform. A specific
- platform is the exact platform triple reported by
- Gem::Platform.local, such as x86_64-darwin-16 or
- universal-java-1.8. On the other hand, generic platforms are those
- such as ruby, mswin, or java. In this example, x86_64-darwin-16
- would map to ruby and universal-java-1.8 to java.
-
- o ssl_ca_cert (BUNDLE_SSL_CA_CERT): Path to a designated CA
- certificate file or folder containing multiple certificates for
- trusted CAs in PEM format.
-
- o ssl_client_cert (BUNDLE_SSL_CLIENT_CERT): Path to a designated file
- containing a X.509 client certificate and key in PEM format.
-
- o ssl_verify_mode (BUNDLE_SSL_VERIFY_MODE): The SSL verification mode
- Bundler uses when making HTTPS requests. Defaults to verify peer.
-
- o suppress_install_using_messages
- (BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES): Avoid printing Using ...
- messages during installation when the version of a gem has not
- changed.
-
- o system_bindir (BUNDLE_SYSTEM_BINDIR): The location where RubyGems
- installs binstubs. Defaults to Gem.bindir.
-
- o timeout (BUNDLE_TIMEOUT): The seconds allowed before timing out for
- network requests. Defaults to 10.
-
- o unlock_source_unlocks_spec (BUNDLE_UNLOCK_SOURCE_UNLOCKS_SPEC):
- Whether running bundle update --source NAME unlocks a gem with the
- given name. Defaults to true.
-
- o update_requires_all_flag (BUNDLE_UPDATE_REQUIRES_ALL_FLAG) Require
- passing --all to bundle update when everything should be updated,
- and disallow passing no options to bundle update.
-
- o user_agent (BUNDLE_USER_AGENT): The custom user agent fragment
- Bundler includes in API requests.
-
- o with (BUNDLE_WITH): A :-separated list of groups whose gems bundler
- should install.
-
- o without (BUNDLE_WITHOUT): A :-separated list of groups whose gems
- bundler should not install.
-
-
-
- In general, you should set these settings per-application by using the
- applicable flag to the bundle install(1) bundle-install.1.html or
- bundle package(1) bundle-package.1.html command.
-
- You can set them globally either via environment variables or bundle
- config, whichever is preferable for your setup. If you use both,
- environment variables will take preference over global settings.
-
-LOCAL GIT REPOS
- Bundler also allows you to work against a git repository locally
- instead of using the remote version. This can be achieved by setting up
- a local override:
-
-
-
- bundle config set local.GEM_NAME /path/to/local/git/repository
-
-
-
- For example, in order to use a local Rack repository, a developer could
- call:
-
-
-
- bundle config set local.rack ~/Work/git/rack
-
-
-
- Now instead of checking out the remote git repository, the local
- override will be used. Similar to a path source, every time the local
- git repository change, changes will be automatically picked up by
- Bundler. This means a commit in the local git repo will update the
- revision in the Gemfile.lock to the local git repo revision. This
- requires the same attention as git submodules. Before pushing to the
- remote, you need to ensure the local override was pushed, otherwise you
- may point to a commit that only exists in your local machine. You'll
- also need to CGI escape your usernames and passwords as well.
-
- Bundler does many checks to ensure a developer won't work with invalid
- references. Particularly, we force a developer to specify a branch in
- the Gemfile in order to use this feature. If the branch specified in
- the Gemfile and the current branch in the local git repository do not
- match, Bundler will abort. This ensures that a developer is always
- working against the correct branches, and prevents accidental locking
- to a different branch.
-
- Finally, Bundler also ensures that the current revision in the
- Gemfile.lock exists in the local git repository. By doing this, Bundler
- forces you to fetch the latest changes in the remotes.
-
-MIRRORS OF GEM SOURCES
- Bundler supports overriding gem sources with mirrors. This allows you
- to configure rubygems.org as the gem source in your Gemfile while still
- using your mirror to fetch gems.
-
-
-
- bundle config set mirror.SOURCE_URL MIRROR_URL
-
-
-
- For example, to use a mirror of rubygems.org hosted at
- rubygems-mirror.org:
-
-
-
- bundle config set mirror.http://rubygems.org http://rubygems-mirror.org
-
-
-
- Each mirror also provides a fallback timeout setting. If the mirror
- does not respond within the fallback timeout, Bundler will try to use
- the original server instead of the mirror.
-
-
-
- bundle config set mirror.SOURCE_URL.fallback_timeout TIMEOUT
-
-
-
- For example, to fall back to rubygems.org after 3 seconds:
-
-
-
- bundle config set mirror.https://rubygems.org.fallback_timeout 3
-
-
-
- The default fallback timeout is 0.1 seconds, but the setting can
- currently only accept whole seconds (for example, 1, 15, or 30).
-
-CREDENTIALS FOR GEM SOURCES
- Bundler allows you to configure credentials for any gem source, which
- allows you to avoid putting secrets into your Gemfile.
-
-
-
- bundle config set SOURCE_HOSTNAME USERNAME:PASSWORD
-
-
-
- For example, to save the credentials of user claudette for the gem
- source at gems.longerous.com, you would run:
-
-
-
- bundle config set gems.longerous.com claudette:s00pers3krit
-
-
-
- Or you can set the credentials as an environment variable like this:
-
-
-
- export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
-
-
-
- For gems with a git source with HTTP(S) URL you can specify credentials
- like so:
-
-
-
- bundle config set https://github.com/bundler/bundler.git username:password
-
-
-
- Or you can set the credentials as an environment variable like so:
-
-
-
- export BUNDLE_GITHUB__COM=username:password
-
-
-
- This is especially useful for private repositories on hosts such as
- Github, where you can use personal OAuth tokens:
-
-
-
- export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x-oauth-basic
-
-
-
-CONFIGURE BUNDLER DIRECTORIES
- Bundler's home, config, cache and plugin directories are able to be
- configured through environment variables. The default location for
- Bundler's home directory is ~/.bundle, which all directories inherit
- from by default. The following outlines the available environment
- variables and their default values
-
-
-
- BUNDLE_USER_HOME : $HOME/.bundle
- BUNDLE_USER_CACHE : $BUNDLE_USER_HOME/cache
- BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config
- BUNDLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin
-
-
-
-
-
-
- July 2020 BUNDLE-CONFIG(1)
diff --git a/man/bundle-doctor.1 b/man/bundle-doctor.1
index f8ba9de83d..82f0fc6fba 100644
--- a/man/bundle-doctor.1
+++ b/man/bundle-doctor.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-DOCTOR" "1" "July 2020" "" ""
+.TH "BUNDLE\-DOCTOR" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-doctor\fR \- Checks the bundle for common problems
diff --git a/man/bundle-doctor.ronn b/man/bundle-doctor.1.ronn
index 271ee800ad..271ee800ad 100644
--- a/man/bundle-doctor.ronn
+++ b/man/bundle-doctor.1.ronn
diff --git a/man/bundle-doctor.1.txt b/man/bundle-doctor.1.txt
deleted file mode 100644
index ba08170a01..0000000000
--- a/man/bundle-doctor.1.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-BUNDLE-DOCTOR(1) BUNDLE-DOCTOR(1)
-
-
-
-NAME
- bundle-doctor - Checks the bundle for common problems
-
-SYNOPSIS
- bundle doctor [--quiet] [--gemfile=GEMFILE]
-
-DESCRIPTION
- Checks your Gemfile and gem environment for common problems. If issues
- are detected, Bundler prints them and exits status 1. Otherwise,
- Bundler prints a success message and exits status 0.
-
- Examples of common problems caught by bundle-doctor include:
-
- o Invalid Bundler settings
-
- o Mismatched Ruby versions
-
- o Mismatched platforms
-
- o Uninstalled gems
-
- o Missing dependencies
-
-
-
-OPTIONS
- --quiet
- Only output warnings and errors.
-
- --gemfile=<gemfile>
- The location of the Gemfile(5) which Bundler should use. This
- defaults to a Gemfile(5) in the current working directory. In
- general, Bundler will assume that the location of the Gemfile(5)
- is also the project's root and will try to find Gemfile.lock and
- vendor/cache relative to this location.
-
-
-
-
- July 2020 BUNDLE-DOCTOR(1)
diff --git a/man/bundle-exec.1 b/man/bundle-exec.1
index b3b916a317..4dc42bed28 100644
--- a/man/bundle-exec.1
+++ b/man/bundle-exec.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-EXEC" "1" "July 2020" "" ""
+.TH "BUNDLE\-EXEC" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
diff --git a/man/bundle-exec.ronn b/man/bundle-exec.1.ronn
index dec3c7cb82..dec3c7cb82 100644
--- a/man/bundle-exec.ronn
+++ b/man/bundle-exec.1.ronn
diff --git a/man/bundle-exec.1.txt b/man/bundle-exec.1.txt
deleted file mode 100644
index c7b6b69eb4..0000000000
--- a/man/bundle-exec.1.txt
+++ /dev/null
@@ -1,181 +0,0 @@
-BUNDLE-EXEC(1) BUNDLE-EXEC(1)
-
-
-
-NAME
- bundle-exec - Execute a command in the context of the bundle
-
-SYNOPSIS
- bundle exec [--keep-file-descriptors] command
-
-DESCRIPTION
- This command executes the command, making all gems specified in the
- [Gemfile(5)][Gemfile(5)] available to require in Ruby programs.
-
- Essentially, if you would normally have run something like rspec
- spec/my_spec.rb, and you want to use the gems specified in the
- [Gemfile(5)][Gemfile(5)] and installed via bundle install(1)
- bundle-install.1.html, you should run bundle exec rspec
- spec/my_spec.rb.
-
- Note that bundle exec does not require that an executable is available
- on your shell's $PATH.
-
-OPTIONS
- --keep-file-descriptors
- Exec in Ruby 2.0 began discarding non-standard file descriptors.
- When this flag is passed, exec will revert to the 1.9 behaviour
- of passing all file descriptors to the new process.
-
-BUNDLE INSTALL --BINSTUBS
- If you use the --binstubs flag in bundle install(1)
- bundle-install.1.html, Bundler will automatically create a directory
- (which defaults to app_root/bin) containing all of the executables
- available from gems in the bundle.
-
- After using --binstubs, bin/rspec spec/my_spec.rb is identical to
- bundle exec rspec spec/my_spec.rb.
-
-ENVIRONMENT MODIFICATIONS
- bundle exec makes a number of changes to the shell environment, then
- executes the command you specify in full.
-
- o make sure that it's still possible to shell out to bundle from
- inside a command invoked by bundle exec (using $BUNDLE_BIN_PATH)
-
- o put the directory containing executables (like rails, rspec,
- rackup) for your bundle on $PATH
-
- o make sure that if bundler is invoked in the subshell, it uses the
- same Gemfile (by setting BUNDLE_GEMFILE)
-
- o add -rbundler/setup to $RUBYOPT, which makes sure that Ruby
- programs invoked in the subshell can see the gems in the bundle
-
-
-
- It also modifies Rubygems:
-
- o disallow loading additional gems not in the bundle
-
- o modify the gem method to be a no-op if a gem matching the
- requirements is in the bundle, and to raise a Gem::LoadError if
- it's not
-
- o Define Gem.refresh to be a no-op, since the source index is always
- frozen when using bundler, and to prevent gems from the system
- leaking into the environment
-
- o Override Gem.bin_path to use the gems in the bundle, making system
- executables work
-
- o Add all gems in the bundle into Gem.loaded_specs
-
-
-
- Finally, bundle exec also implicitly modifies Gemfile.lock if the
- lockfile and the Gemfile do not match. Bundler needs the Gemfile to
- determine things such as a gem's groups, autorequire, and platforms,
- etc., and that information isn't stored in the lockfile. The Gemfile
- and lockfile must be synced in order to bundle exec successfully, so
- bundle exec updates the lockfile beforehand.
-
- Loading
- By default, when attempting to bundle exec to a file with a ruby
- shebang, Bundler will Kernel.load that file instead of using
- Kernel.exec. For the vast majority of cases, this is a performance
- improvement. In a rare few cases, this could cause some subtle
- side-effects (such as dependence on the exact contents of $0 or
- __FILE__) and the optimization can be disabled by enabling the
- disable_exec_load setting.
-
- Shelling out
- Any Ruby code that opens a subshell (like system, backticks, or %x{})
- will automatically use the current Bundler environment. If you need to
- shell out to a Ruby command that is not part of your current bundle,
- use the with_clean_env method with a block. Any subshells created
- inside the block will be given the environment present before Bundler
- was activated. For example, Homebrew commands run Ruby, but don't work
- inside a bundle:
-
-
-
- Bundler.with_clean_env do
- `brew install wget`
- end
-
-
-
- Using with_clean_env is also necessary if you are shelling out to a
- different bundle. Any Bundler commands run in a subshell will inherit
- the current Gemfile, so commands that need to run in the context of a
- different bundle also need to use with_clean_env.
-
-
-
- Bundler.with_clean_env do
- Dir.chdir "/other/bundler/project" do
- `bundle exec ./script`
- end
- end
-
-
-
- Bundler provides convenience helpers that wrap system and exec, and
- they can be used like this:
-
-
-
- Bundler.clean_system('brew install wget')
- Bundler.clean_exec('brew install wget')
-
-
-
-RUBYGEMS PLUGINS
- At present, the Rubygems plugin system requires all files named
- rubygems_plugin.rb on the load path of any installed gem when any Ruby
- code requires rubygems.rb. This includes executables installed into the
- system, like rails, rackup, and rspec.
-
- Since Rubygems plugins can contain arbitrary Ruby code, they commonly
- end up activating themselves or their dependencies.
-
- For instance, the gemcutter 0.5 gem depended on json_pure. If you had
- that version of gemcutter installed (even if you also had a newer
- version without this problem), Rubygems would activate gemcutter 0.5
- and json_pure <latest>.
-
- If your Gemfile(5) also contained json_pure (or a gem with a dependency
- on json_pure), the latest version on your system might conflict with
- the version in your Gemfile(5), or the snapshot version in your
- Gemfile.lock.
-
- If this happens, bundler will say:
-
-
-
- You have already activated json_pure 1.4.6 but your Gemfile
- requires json_pure 1.4.3. Consider using bundle exec.
-
-
-
- In this situation, you almost certainly want to remove the underlying
- gem with the problematic gem plugin. In general, the authors of these
- plugins (in this case, the gemcutter gem) have released newer versions
- that are more careful in their plugins.
-
- You can find a list of all the gems containing gem plugins by running
-
-
-
- ruby -rrubygems -e "puts Gem.find_files('rubygems_plugin.rb')"
-
-
-
- At the very least, you should remove all but the newest version of each
- gem plugin, and also remove all gem plugins that you aren't using (gem
- uninstall gem_name).
-
-
-
- July 2020 BUNDLE-EXEC(1)
diff --git a/man/bundle-gem.1 b/man/bundle-gem.1
index a03a1cafa9..124df739cc 100644
--- a/man/bundle-gem.1
+++ b/man/bundle-gem.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-GEM" "1" "July 2020" "" ""
+.TH "BUNDLE\-GEM" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
diff --git a/man/bundle-gem.ronn b/man/bundle-gem.1.ronn
index a997cb907a..a997cb907a 100644
--- a/man/bundle-gem.ronn
+++ b/man/bundle-gem.1.ronn
diff --git a/man/bundle-gem.1.txt b/man/bundle-gem.1.txt
deleted file mode 100644
index 8f124a6132..0000000000
--- a/man/bundle-gem.1.txt
+++ /dev/null
@@ -1,117 +0,0 @@
-BUNDLE-GEM(1) BUNDLE-GEM(1)
-
-
-
-NAME
- bundle-gem - Generate a project skeleton for creating a rubygem
-
-SYNOPSIS
- bundle gem GEM_NAME OPTIONS
-
-DESCRIPTION
- Generates a directory named GEM_NAME with a Rakefile, GEM_NAME.gemspec,
- and other supporting files and directories that can be used to develop
- a rubygem with that name.
-
- Run rake -T in the resulting project for a list of Rake tasks that can
- be used to test and publish the gem to rubygems.org.
-
- The generated project skeleton can be customized with OPTIONS, as
- explained below. Note that these options can also be specified via
- Bundler's global configuration file using the following names:
-
- o gem.coc
-
- o gem.mit
-
- o gem.test
-
-
-
-OPTIONS
- --exe or -b or --bin
- Specify that Bundler should create a binary executable (as
- exe/GEM_NAME) in the generated rubygem project. This binary will
- also be added to the GEM_NAME.gemspec manifest. This behavior is
- disabled by default.
-
- --no-exe
- Do not create a binary (overrides --exe specified in the global
- config).
-
- --coc Add a CODE_OF_CONDUCT.md file to the root of the generated
- project. If this option is unspecified, an interactive prompt
- will be displayed and the answer will be saved in Bundler's
- global config for future bundle gem use.
-
- --no-coc
- Do not create a CODE_OF_CONDUCT.md (overrides --coc specified in
- the global config).
-
- --ext Add boilerplate for C extension code to the generated project.
- This behavior is disabled by default.
-
- --no-ext
- Do not add C extension code (overrides --ext specified in the
- global config).
-
- --mit Add an MIT license to a LICENSE.txt file in the root of the
- generated project. Your name from the global git config is used
- for the copyright statement. If this option is unspecified, an
- interactive prompt will be displayed and the answer will be
- saved in Bundler's global config for future bundle gem use.
-
- --no-mit
- Do not create a LICENSE.txt (overrides --mit specified in the
- global config).
-
- -t, --test=minitest, --test=rspec, --test=test-unit
- Specify the test framework that Bundler should use when
- generating the project. Acceptable values are minitest, rspec
- and test-unit. The GEM_NAME.gemspec will be configured and a
- skeleton test/spec directory will be created based on this
- option. Given no option is specified:
-
- When Bundler is configured to generate tests, this defaults to
- Bundler's global config setting gem.test.
-
- When Bundler is configured to not generate tests, an interactive
- prompt will be displayed and the answer will be used for the
- current rubygem project.
-
- When Bundler is unconfigured, an interactive prompt will be
- displayed and the answer will be saved in Bundler's global
- config for future bundle gem use.
-
- --ci, --ci=github, --ci=travis, --ci=gitlab, --ci=circle
- Specify the continuous integration service that Bundler should
- use when generating the project. Acceptable values are github,
- travis, gitlab and circle. A configuration file will be
- generated in the project directory. Given no option is
- specified:
-
- When Bundler is configured to generate CI files, this defaults
- to Bundler's global config setting gem.ci.
-
- When Bundler is configured to not generate CI files, an
- interactive prompt will be displayed and the answer will be used
- for the current rubygem project.
-
- When Bundler is unconfigured, an interactive prompt will be
- displayed and the answer will be saved in Bundler's global
- config for future bundle gem use.
-
- -e, --edit[=EDITOR]
- Open the resulting GEM_NAME.gemspec in EDITOR, or the default
- editor if not specified. The default is $BUNDLER_EDITOR,
- $VISUAL, or $EDITOR.
-
-SEE ALSO
- o bundle config(1) bundle-config.1.html
-
-
-
-
-
-
- July 2020 BUNDLE-GEM(1)
diff --git a/man/bundle-info.1 b/man/bundle-info.1
index 661fbd1275..2d860d51ab 100644
--- a/man/bundle-info.1
+++ b/man/bundle-info.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-INFO" "1" "July 2020" "" ""
+.TH "BUNDLE\-INFO" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-info\fR \- Show information for the given gem in your bundle
diff --git a/man/bundle-info.ronn b/man/bundle-info.1.ronn
index 47e457aa3c..47e457aa3c 100644
--- a/man/bundle-info.ronn
+++ b/man/bundle-info.1.ronn
diff --git a/man/bundle-info.1.txt b/man/bundle-info.1.txt
deleted file mode 100644
index ee51c75a85..0000000000
--- a/man/bundle-info.1.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-BUNDLE-INFO(1) BUNDLE-INFO(1)
-
-
-
-NAME
- bundle-info - Show information for the given gem in your bundle
-
-SYNOPSIS
- bundle info [GEM] [--path]
-
-DESCRIPTION
- Print the basic information about the provided GEM such as homepage,
- version, path and summary.
-
-OPTIONS
- --path Print the path of the given gem
-
-
-
-
- July 2020 BUNDLE-INFO(1)
diff --git a/man/bundle-init.1 b/man/bundle-init.1
index 126b0aa808..c21e269071 100644
--- a/man/bundle-init.1
+++ b/man/bundle-init.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-INIT" "1" "July 2020" "" ""
+.TH "BUNDLE\-INIT" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
diff --git a/man/bundle-init.ronn b/man/bundle-init.1.ronn
index 9d3d97deea..9d3d97deea 100644
--- a/man/bundle-init.ronn
+++ b/man/bundle-init.1.ronn
diff --git a/man/bundle-init.1.txt b/man/bundle-init.1.txt
deleted file mode 100644
index 0f83701d4f..0000000000
--- a/man/bundle-init.1.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-BUNDLE-INIT(1) BUNDLE-INIT(1)
-
-
-
-NAME
- bundle-init - Generates a Gemfile into the current working directory
-
-SYNOPSIS
- bundle init [--gemspec=FILE]
-
-DESCRIPTION
- Init generates a default [Gemfile(5)][Gemfile(5)] in the current
- working directory. When adding a [Gemfile(5)][Gemfile(5)] to a gem with
- a gemspec, the --gemspec option will automatically add each dependency
- listed in the gemspec file to the newly created
- [Gemfile(5)][Gemfile(5)].
-
-OPTIONS
- --gemspec
- Use the specified .gemspec to create the
- [Gemfile(5)][Gemfile(5)]
-
-FILES
- Included in the default [Gemfile(5)][Gemfile(5)] generated is the line
- # frozen_string_literal: true. This is a magic comment supported for
- the first time in Ruby 2.3. The presence of this line results in all
- string literals in the file being implicitly frozen.
-
-SEE ALSO
- Gemfile(5) https://bundler.io/man/gemfile.5.html
-
-
-
- July 2020 BUNDLE-INIT(1)
diff --git a/man/bundle-inject.1 b/man/bundle-inject.1
index a6fb1831f8..20bcbba735 100644
--- a/man/bundle-inject.1
+++ b/man/bundle-inject.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-INJECT" "1" "July 2020" "" ""
+.TH "BUNDLE\-INJECT" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
diff --git a/man/bundle-inject.ronn b/man/bundle-inject.1.ronn
index f454341896..f454341896 100644
--- a/man/bundle-inject.ronn
+++ b/man/bundle-inject.1.ronn
diff --git a/man/bundle-inject.1.txt b/man/bundle-inject.1.txt
deleted file mode 100644
index 3716a63b21..0000000000
--- a/man/bundle-inject.1.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-BUNDLE-INJECT(1) BUNDLE-INJECT(1)
-
-
-
-NAME
- bundle-inject - Add named gem(s) with version requirements to Gemfile
-
-SYNOPSIS
- bundle inject [GEM] [VERSION]
-
-DESCRIPTION
- Adds the named gem(s) with their version requirements to the resolved
- [Gemfile(5)][Gemfile(5)].
-
- This command will add the gem to both your [Gemfile(5)][Gemfile(5)] and
- Gemfile.lock if it isn't listed yet.
-
- Example:
-
-
-
- bundle install
- bundle inject 'rack' '> 0'
-
-
-
- This will inject the 'rack' gem with a version greater than 0 in your
- [Gemfile(5)][Gemfile(5)] and Gemfile.lock
-
-
-
- July 2020 BUNDLE-INJECT(1)
diff --git a/man/bundle-install.1 b/man/bundle-install.1
index 8eb7915c06..0abd1a31e2 100644
--- a/man/bundle-install.1
+++ b/man/bundle-install.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-INSTALL" "1" "July 2020" "" ""
+.TH "BUNDLE\-INSTALL" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
@@ -19,7 +19,7 @@ If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), B
If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), Bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
.
.SH "OPTIONS"
-To apply any of \fB\-\-binstubs\fR, \fB\-\-deployment\fR, \fB\-\-path\fR, or \fB\-\-without\fR every time \fBbundle install\fR is run, use \fBbundle config\fR (see bundle\-config(1))\.
+The \fB\-\-clean\fR, \fB\-\-deployment\fR, \fB\-\-frozen\fR, \fB\-\-no\-prune\fR, \fB\-\-path\fR, \fB\-\-shebang\fR, \fB\-\-system\fR, \fB\-\-without\fR and \fB\-\-with\fR options are deprecated because they only make sense if they are applied to every subsequent \fBbundle install\fR run automatically and that requires \fBbundler\fR to silently remember them\. Since \fBbundler\fR will no longer remember CLI flags in future versions, \fBbundle config\fR (see bundle\-config(1)) should be used to apply them permanently\.
.
.TP
\fB\-\-binstubs[=<directory>]\fR
@@ -32,10 +32,16 @@ Creates a directory (defaults to \fB~/bin\fR) and places any executables from th
\fB\-\-clean\fR
On finishing the installation Bundler is going to remove any gems not present in the current Gemfile(5)\. Don\'t worry, gems currently in use will not be removed\.
.
+.IP
+This option is deprecated in favor of the \fBclean\fR setting\.
+.
.TP
\fB\-\-deployment\fR
In \fIdeployment mode\fR, Bundler will \'roll\-out\' the bundle for production or CI use\. Please check carefully if you want to have this option enabled in your development environment\.
.
+.IP
+This option is deprecated in favor of the \fBdeployment\fR setting\.
+.
.TP
\fB\-\-redownload\fR
Force download every gem, even if the required versions are already available locally\.
@@ -44,6 +50,9 @@ Force download every gem, even if the required versions are already available lo
\fB\-\-frozen\fR
Do not allow the Gemfile\.lock to be updated after this install\. Exits non\-zero if there are going to be changes to the Gemfile\.lock\.
.
+.IP
+This option is deprecated in favor of the \fBfrozen\fR setting\.
+.
.TP
\fB\-\-full\-index\fR
Bundler will not call Rubygems\' API endpoint (default) but download and cache a (currently big) index file of all gems\. Performance can be improved for large bundles that seldom change by enabling this option\.
@@ -68,10 +77,16 @@ Do not update the cache in \fBvendor/cache\fR with the newly bundled gems\. This
\fB\-\-no\-prune\fR
Don\'t remove stale gems from the cache when the installation finishes\.
.
+.IP
+This option is deprecated in favor of the \fBno_prune\fR setting\.
+.
.TP
\fB\-\-path=<path>\fR
The location to install the specified gems to\. This defaults to Rubygems\' setting\. Bundler shares this location with Rubygems, \fBgem install \.\.\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \.\.\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
.
+.IP
+This option is deprecated in favor of the \fBpath\fR setting\.
+.
.TP
\fB\-\-quiet\fR
Do not print progress information to the standard output\. Instead, Bundler will exit using a status code (\fB$?\fR)\.
@@ -84,6 +99,9 @@ Retry failed network or git requests for \fInumber\fR times\.
\fB\-\-shebang=<ruby\-executable>\fR
Uses the specified ruby executable (usually \fBruby\fR) to execute the scripts created with \fB\-\-binstubs\fR\. In addition, if you use \fB\-\-binstubs\fR together with \fB\-\-shebang jruby\fR these executables will be changed to execute \fBjruby\fR instead\.
.
+.IP
+This option is deprecated in favor of the \fBshebang\fR setting\.
+.
.TP
\fB\-\-standalone[=<list>]\fR
Makes a bundle that can work without depending on Rubygems or Bundler at runtime\. A space separated list of groups to install has to be specified\. Bundler creates a directory named \fBbundle\fR and installs the bundle there\. It also generates a \fBbundle/bundler/setup\.rb\fR file to replace Bundler\'s own setup in the manner required\. Using this option implicitly sets \fBpath\fR, which is a [remembered option][REMEMBERED OPTIONS]\.
@@ -92,6 +110,9 @@ Makes a bundle that can work without depending on Rubygems or Bundler at runtime
\fB\-\-system\fR
Installs the gems specified in the bundle to the system\'s Rubygems location\. This overrides any previous configuration of \fB\-\-path\fR\.
.
+.IP
+This option is deprecated in favor of the \fBsystem\fR setting\.
+.
.TP
\fB\-\-trust\-policy=[<policy>]\fR
Apply the Rubygems security policy \fIpolicy\fR, where policy is one of \fBHighSecurity\fR, \fBMediumSecurity\fR, \fBLowSecurity\fR, \fBAlmostNoSecurity\fR, or \fBNoSecurity\fR\. For more details, please see the Rubygems signing documentation linked below in \fISEE ALSO\fR\.
@@ -100,10 +121,16 @@ Apply the Rubygems security policy \fIpolicy\fR, where policy is one of \fBHighS
\fB\-\-with=<list>\fR
A space\-separated list of groups referencing gems to install\. If an optional group is given it is installed\. If a group is given that is in the remembered list of groups given to \-\-without, it is removed from that list\.
.
+.IP
+This option is deprecated in favor of the \fBwith\fR setting\.
+.
.TP
\fB\-\-without=<list>\fR
A space\-separated list of groups referencing gems to skip during installation\. If a group is given that is in the remembered list of groups given to \-\-with, it is removed from that list\.
.
+.IP
+This option is deprecated in favor of the \fBwithout\fR setting\.
+.
.SH "DEPLOYMENT MODE"
Bundler\'s defaults are optimized for development\. To switch to defaults optimized for deployment and for CI, use the \fB\-\-deployment\fR flag\. Do not activate deployment mode on development machines, as it will cause an error when the Gemfile(5) is modified\.
.
diff --git a/man/bundle-install.ronn b/man/bundle-install.1.ronn
index 2ba82f27a5..07aeb1da90 100644
--- a/man/bundle-install.ronn
+++ b/man/bundle-install.1.ronn
@@ -43,8 +43,12 @@ update process below under [CONSERVATIVE UPDATING][].
## OPTIONS
-To apply any of `--binstubs`, `--deployment`, `--path`, or `--without` every
-time `bundle install` is run, use `bundle config` (see bundle-config(1)).
+The `--clean`, `--deployment`, `--frozen`, `--no-prune`, `--path`, `--shebang`,
+`--system`, `--without` and `--with` options are deprecated because they only
+make sense if they are applied to every subsequent `bundle install` run
+automatically and that requires `bundler` to silently remember them. Since
+`bundler` will no longer remember CLI flags in future versions, `bundle config`
+(see bundle-config(1)) should be used to apply them permanently.
* `--binstubs[=<directory>]`:
Binstubs are scripts that wrap around executables. Bundler creates a small Ruby
@@ -64,11 +68,15 @@ time `bundle install` is run, use `bundle config` (see bundle-config(1)).
in the current Gemfile(5). Don't worry, gems currently in use will not be
removed.
+ This option is deprecated in favor of the `clean` setting.
+
* `--deployment`:
In [deployment mode][DEPLOYMENT MODE], Bundler will 'roll-out' the bundle for
production or CI use. Please check carefully if you want to have this option
enabled in your development environment.
+ This option is deprecated in favor of the `deployment` setting.
+
* `--redownload`:
Force download every gem, even if the required versions are already available
locally.
@@ -77,6 +85,8 @@ time `bundle install` is run, use `bundle config` (see bundle-config(1)).
Do not allow the Gemfile.lock to be updated after this install. Exits
non-zero if there are going to be changes to the Gemfile.lock.
+ This option is deprecated in favor of the `frozen` setting.
+
* `--full-index`:
Bundler will not call Rubygems' API endpoint (default) but download and cache
a (currently big) index file of all gems. Performance can be improved for
@@ -107,6 +117,8 @@ time `bundle install` is run, use `bundle config` (see bundle-config(1)).
* `--no-prune`:
Don't remove stale gems from the cache when the installation finishes.
+ This option is deprecated in favor of the `no_prune` setting.
+
* `--path=<path>`:
The location to install the specified gems to. This defaults to Rubygems'
setting. Bundler shares this location with Rubygems, `gem install ...` will
@@ -114,6 +126,8 @@ time `bundle install` is run, use `bundle config` (see bundle-config(1)).
`--path ...` setting will show up by calling `gem list`. Accordingly, gems
installed to other locations will not get listed.
+ This option is deprecated in favor of the `path` setting.
+
* `--quiet`:
Do not print progress information to the standard output. Instead, Bundler
will exit using a status code (`$?`).
@@ -127,6 +141,8 @@ time `bundle install` is run, use `bundle config` (see bundle-config(1)).
`--shebang jruby` these executables will be changed to execute `jruby`
instead.
+ This option is deprecated in favor of the `shebang` setting.
+
* `--standalone[=<list>]`:
Makes a bundle that can work without depending on Rubygems or Bundler at
runtime. A space separated list of groups to install has to be specified.
@@ -139,6 +155,8 @@ time `bundle install` is run, use `bundle config` (see bundle-config(1)).
Installs the gems specified in the bundle to the system's Rubygems location.
This overrides any previous configuration of `--path`.
+ This option is deprecated in favor of the `system` setting.
+
* `--trust-policy=[<policy>]`:
Apply the Rubygems security policy <policy>, where policy is one of
`HighSecurity`, `MediumSecurity`, `LowSecurity`, `AlmostNoSecurity`, or
@@ -151,11 +169,15 @@ time `bundle install` is run, use `bundle config` (see bundle-config(1)).
in the remembered list of groups given to --without, it is removed
from that list.
+ This option is deprecated in favor of the `with` setting.
+
* `--without=<list>`:
A space-separated list of groups referencing gems to skip during installation.
If a group is given that is in the remembered list of groups given
to --with, it is removed from that list.
+ This option is deprecated in favor of the `without` setting.
+
## DEPLOYMENT MODE
Bundler's defaults are optimized for development. To switch to
diff --git a/man/bundle-install.1.txt b/man/bundle-install.1.txt
deleted file mode 100644
index 4c417b7b19..0000000000
--- a/man/bundle-install.1.txt
+++ /dev/null
@@ -1,401 +0,0 @@
-BUNDLE-INSTALL(1) BUNDLE-INSTALL(1)
-
-
-
-NAME
- bundle-install - Install the dependencies specified in your Gemfile
-
-SYNOPSIS
- bundle install [--binstubs[=DIRECTORY]] [--clean] [--deployment]
- [--frozen] [--full-index] [--gemfile=GEMFILE] [--jobs=NUMBER] [--local]
- [--no-cache] [--no-prune] [--path PATH] [--quiet] [--redownload]
- [--retry=NUMBER] [--shebang] [--standalone[=GROUP[ GROUP...]]]
- [--system] [--trust-policy=POLICY] [--with=GROUP[ GROUP...]]
- [--without=GROUP[ GROUP...]]
-
-DESCRIPTION
- Install the gems specified in your Gemfile(5). If this is the first
- time you run bundle install (and a Gemfile.lock does not exist),
- Bundler will fetch all remote sources, resolve dependencies and install
- all needed gems.
-
- If a Gemfile.lock does exist, and you have not updated your Gemfile(5),
- Bundler will fetch all remote sources, but use the dependencies
- specified in the Gemfile.lock instead of resolving dependencies.
-
- If a Gemfile.lock does exist, and you have updated your Gemfile(5),
- Bundler will use the dependencies in the Gemfile.lock for all gems that
- you did not update, but will re-resolve the dependencies of gems that
- you did update. You can find more information about this update process
- below under CONSERVATIVE UPDATING.
-
-OPTIONS
- To apply any of --binstubs, --deployment, --path, or --without every
- time bundle install is run, use bundle config (see bundle-config(1)).
-
- --binstubs[=<directory>]
- Binstubs are scripts that wrap around executables. Bundler
- creates a small Ruby file (a binstub) that loads Bundler, runs
- the command, and puts it in bin/. This lets you link the binstub
- inside of an application to the exact gem version the
- application needs.
-
- Creates a directory (defaults to ~/bin) and places any
- executables from the gem there. These executables run in
- Bundler's context. If used, you might add this directory to your
- environment's PATH variable. For instance, if the rails gem
- comes with a rails executable, this flag will create a bin/rails
- executable that ensures that all referred dependencies will be
- resolved using the bundled gems.
-
- --clean
- On finishing the installation Bundler is going to remove any
- gems not present in the current Gemfile(5). Don't worry, gems
- currently in use will not be removed.
-
- --deployment
- In deployment mode, Bundler will 'roll-out' the bundle for
- production or CI use. Please check carefully if you want to have
- this option enabled in your development environment.
-
- --redownload
- Force download every gem, even if the required versions are
- already available locally.
-
- --frozen
- Do not allow the Gemfile.lock to be updated after this install.
- Exits non-zero if there are going to be changes to the
- Gemfile.lock.
-
- --full-index
- Bundler will not call Rubygems' API endpoint (default) but
- download and cache a (currently big) index file of all gems.
- Performance can be improved for large bundles that seldom change
- by enabling this option.
-
- --gemfile=<gemfile>
- The location of the Gemfile(5) which Bundler should use. This
- defaults to a Gemfile(5) in the current working directory. In
- general, Bundler will assume that the location of the Gemfile(5)
- is also the project's root and will try to find Gemfile.lock and
- vendor/cache relative to this location.
-
- --jobs=[<number>], -j[<number>]
- The maximum number of parallel download and install jobs. The
- default is 1.
-
- --local
- Do not attempt to connect to rubygems.org. Instead, Bundler will
- use the gems already present in Rubygems' cache or in
- vendor/cache. Note that if a appropriate platform-specific gem
- exists on rubygems.org it will not be found.
-
- --no-cache
- Do not update the cache in vendor/cache with the newly bundled
- gems. This does not remove any gems in the cache but keeps the
- newly bundled gems from being cached during the install.
-
- --no-prune
- Don't remove stale gems from the cache when the installation
- finishes.
-
- --path=<path>
- The location to install the specified gems to. This defaults to
- Rubygems' setting. Bundler shares this location with Rubygems,
- gem install ... will have gem installed there, too. Therefore,
- gems installed without a --path ... setting will show up by
- calling gem list. Accordingly, gems installed to other locations
- will not get listed.
-
- --quiet
- Do not print progress information to the standard output.
- Instead, Bundler will exit using a status code ($?).
-
- --retry=[<number>]
- Retry failed network or git requests for number times.
-
- --shebang=<ruby-executable>
- Uses the specified ruby executable (usually ruby) to execute the
- scripts created with --binstubs. In addition, if you use
- --binstubs together with --shebang jruby these executables will
- be changed to execute jruby instead.
-
- --standalone[=<list>]
- Makes a bundle that can work without depending on Rubygems or
- Bundler at runtime. A space separated list of groups to install
- has to be specified. Bundler creates a directory named bundle
- and installs the bundle there. It also generates a
- bundle/bundler/setup.rb file to replace Bundler's own setup in
- the manner required. Using this option implicitly sets path,
- which is a [remembered option][REMEMBERED OPTIONS].
-
- --system
- Installs the gems specified in the bundle to the system's
- Rubygems location. This overrides any previous configuration of
- --path.
-
- --trust-policy=[<policy>]
- Apply the Rubygems security policy policy, where policy is one
- of HighSecurity, MediumSecurity, LowSecurity, AlmostNoSecurity,
- or NoSecurity. For more details, please see the Rubygems signing
- documentation linked below in SEE ALSO.
-
- --with=<list>
- A space-separated list of groups referencing gems to install. If
- an optional group is given it is installed. If a group is given
- that is in the remembered list of groups given to --without, it
- is removed from that list.
-
- --without=<list>
- A space-separated list of groups referencing gems to skip during
- installation. If a group is given that is in the remembered list
- of groups given to --with, it is removed from that list.
-
-DEPLOYMENT MODE
- Bundler's defaults are optimized for development. To switch to defaults
- optimized for deployment and for CI, use the --deployment flag. Do not
- activate deployment mode on development machines, as it will cause an
- error when the Gemfile(5) is modified.
-
- 1. A Gemfile.lock is required.
-
- To ensure that the same versions of the gems you developed with and
- tested with are also used in deployments, a Gemfile.lock is
- required.
-
- This is mainly to ensure that you remember to check your
- Gemfile.lock into version control.
-
- 2. The Gemfile.lock must be up to date
-
- In development, you can modify your Gemfile(5) and re-run bundle
- install to conservatively update your Gemfile.lock snapshot.
-
- In deployment, your Gemfile.lock should be up-to-date with changes
- made in your Gemfile(5).
-
- 3. Gems are installed to vendor/bundle not your default system
- location
-
- In development, it's convenient to share the gems used in your
- application with other applications and other scripts that run on
- the system.
-
- In deployment, isolation is a more important default. In addition,
- the user deploying the application may not have permission to
- install gems to the system, or the web server may not have
- permission to read them.
-
- As a result, bundle install --deployment installs gems to the
- vendor/bundle directory in the application. This may be overridden
- using the --path option.
-
-
-
-SUDO USAGE
- By default, Bundler installs gems to the same location as gem install.
-
- In some cases, that location may not be writable by your Unix user. In
- that case, Bundler will stage everything in a temporary directory, then
- ask you for your sudo password in order to copy the gems into their
- system location.
-
- From your perspective, this is identical to installing the gems
- directly into the system.
-
- You should never use sudo bundle install. This is because several other
- steps in bundle install must be performed as the current user:
-
- o Updating your Gemfile.lock
-
- o Updating your vendor/cache, if necessary
-
- o Checking out private git repositories using your user's SSH keys
-
-
-
- Of these three, the first two could theoretically be performed by
- chowning the resulting files to $SUDO_USER. The third, however, can
- only be performed by invoking the git command as the current user.
- Therefore, git gems are downloaded and installed into ~/.bundle rather
- than $GEM_HOME or $BUNDLE_PATH.
-
- As a result, you should run bundle install as the current user, and
- Bundler will ask for your password if it is needed to put the gems into
- their final location.
-
-INSTALLING GROUPS
- By default, bundle install will install all gems in all groups in your
- Gemfile(5), except those declared for a different platform.
-
- However, you can explicitly tell Bundler to skip installing certain
- groups with the --without option. This option takes a space-separated
- list of groups.
-
- While the --without option will skip installing the gems in the
- specified groups, it will still download those gems and use them to
- resolve the dependencies of every gem in your Gemfile(5).
-
- This is so that installing a different set of groups on another machine
- (such as a production server) will not change the gems and versions
- that you have already developed and tested against.
-
- Bundler offers a rock-solid guarantee that the third-party code you are
- running in development and testing is also the third-party code you are
- running in production. You can choose to exclude some of that code in
- different environments, but you will never be caught flat-footed by
- different versions of third-party code being used in different
- environments.
-
- For a simple illustration, consider the following Gemfile(5):
-
-
-
- source 'https://rubygems.org'
-
- gem 'sinatra'
-
- group :production do
- gem 'rack-perftools-profiler'
- end
-
-
-
- In this case, sinatra depends on any version of Rack (>= 1.0), while
- rack-perftools-profiler depends on 1.x (~> 1.0).
-
- When you run bundle install --without production in development, we
- look at the dependencies of rack-perftools-profiler as well. That way,
- you do not spend all your time developing against Rack 2.0, using new
- APIs unavailable in Rack 1.x, only to have Bundler switch to Rack 1.2
- when the production group is used.
-
- This should not cause any problems in practice, because we do not
- attempt to install the gems in the excluded groups, and only evaluate
- as part of the dependency resolution process.
-
- This also means that you cannot include different versions of the same
- gem in different groups, because doing so would result in different
- sets of dependencies used in development and production. Because of the
- vagaries of the dependency resolution process, this usually affects
- more than the gems you list in your Gemfile(5), and can (surprisingly)
- radically change the gems you are using.
-
-THE GEMFILE.LOCK
- When you run bundle install, Bundler will persist the full names and
- versions of all gems that you used (including dependencies of the gems
- specified in the Gemfile(5)) into a file called Gemfile.lock.
-
- Bundler uses this file in all subsequent calls to bundle install, which
- guarantees that you always use the same exact code, even as your
- application moves across machines.
-
- Because of the way dependency resolution works, even a seemingly small
- change (for instance, an update to a point-release of a dependency of a
- gem in your Gemfile(5)) can result in radically different gems being
- needed to satisfy all dependencies.
-
- As a result, you SHOULD check your Gemfile.lock into version control,
- in both applications and gems. If you do not, every machine that checks
- out your repository (including your production server) will resolve all
- dependencies again, which will result in different versions of
- third-party code being used if any of the gems in the Gemfile(5) or any
- of their dependencies have been updated.
-
- When Bundler first shipped, the Gemfile.lock was included in the
- .gitignore file included with generated gems. Over time, however, it
- became clear that this practice forces the pain of broken dependencies
- onto new contributors, while leaving existing contributors potentially
- unaware of the problem. Since bundle install is usually the first step
- towards a contribution, the pain of broken dependencies would
- discourage new contributors from contributing. As a result, we have
- revised our guidance for gem authors to now recommend checking in the
- lock for gems.
-
-CONSERVATIVE UPDATING
- When you make a change to the Gemfile(5) and then run bundle install,
- Bundler will update only the gems that you modified.
-
- In other words, if a gem that you did not modify worked before you
- called bundle install, it will continue to use the exact same versions
- of all dependencies as it used before the update.
-
- Let's take a look at an example. Here's your original Gemfile(5):
-
-
-
- source 'https://rubygems.org'
-
- gem 'actionpack', '2.3.8'
- gem 'activemerchant'
-
-
-
- In this case, both actionpack and activemerchant depend on
- activesupport. The actionpack gem depends on activesupport 2.3.8 and
- rack ~> 1.1.0, while the activemerchant gem depends on activesupport >=
- 2.3.2, braintree >= 2.0.0, and builder >= 2.0.0.
-
- When the dependencies are first resolved, Bundler will select
- activesupport 2.3.8, which satisfies the requirements of both gems in
- your Gemfile(5).
-
- Next, you modify your Gemfile(5) to:
-
-
-
- source 'https://rubygems.org'
-
- gem 'actionpack', '3.0.0.rc'
- gem 'activemerchant'
-
-
-
- The actionpack 3.0.0.rc gem has a number of new dependencies, and
- updates the activesupport dependency to = 3.0.0.rc and the rack
- dependency to ~> 1.2.1.
-
- When you run bundle install, Bundler notices that you changed the
- actionpack gem, but not the activemerchant gem. It evaluates the gems
- currently being used to satisfy its requirements:
-
- activesupport 2.3.8
- also used to satisfy a dependency in activemerchant, which is
- not being updated
-
- rack ~> 1.1.0
- not currently being used to satisfy another dependency
-
- Because you did not explicitly ask to update activemerchant, you would
- not expect it to suddenly stop working after updating actionpack.
- However, satisfying the new activesupport 3.0.0.rc dependency of
- actionpack requires updating one of its dependencies.
-
- Even though activemerchant declares a very loose dependency that
- theoretically matches activesupport 3.0.0.rc, Bundler treats gems in
- your Gemfile(5) that have not changed as an atomic unit together with
- their dependencies. In this case, the activemerchant dependency is
- treated as activemerchant 1.7.1 + activesupport 2.3.8, so bundle
- install will report that it cannot update actionpack.
-
- To explicitly update actionpack, including its dependencies which other
- gems in the Gemfile(5) still depend on, run bundle update actionpack
- (see bundle update(1)).
-
- Summary: In general, after making a change to the Gemfile(5) , you
- should first try to run bundle install, which will guarantee that no
- other gem in the Gemfile(5) is impacted by the change. If that does not
- work, run bundle update(1) bundle-update.1.html.
-
-SEE ALSO
- o Gem install docs
- http://guides.rubygems.org/rubygems-basics/#installing-gems
-
- o Rubygems signing docs http://guides.rubygems.org/security/
-
-
-
-
-
-
- July 2020 BUNDLE-INSTALL(1)
diff --git a/man/bundle-list.1 b/man/bundle-list.1
index 717935cd99..ebedb62b38 100644
--- a/man/bundle-list.1
+++ b/man/bundle-list.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-LIST" "1" "July 2020" "" ""
+.TH "BUNDLE\-LIST" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-list\fR \- List all the gems in the bundle
diff --git a/man/bundle-list.ronn b/man/bundle-list.1.ronn
index dc058ecd5f..dc058ecd5f 100644
--- a/man/bundle-list.ronn
+++ b/man/bundle-list.1.ronn
diff --git a/man/bundle-list.1.txt b/man/bundle-list.1.txt
deleted file mode 100644
index ea0089c221..0000000000
--- a/man/bundle-list.1.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-BUNDLE-LIST(1) BUNDLE-LIST(1)
-
-
-
-NAME
- bundle-list - List all the gems in the bundle
-
-SYNOPSIS
- bundle list [--name-only] [--paths] [--without-group=GROUP[ GROUP...]]
- [--only-group=GROUP[ GROUP...]]
-
-DESCRIPTION
- Prints a list of all the gems in the bundle including their version.
-
- Example:
-
- bundle list --name-only
-
- bundle list --paths
-
- bundle list --without-group test
-
- bundle list --only-group dev
-
- bundle list --only-group dev test --paths
-
-OPTIONS
- --name-only
- Print only the name of each gem.
-
- --paths
- Print the path to each gem in the bundle.
-
- --without-group=<list>
- A space-separated list of groups of gems to skip during
- printing.
-
- --only-group=<list>
- A space-separated list of groups of gems to print.
-
-
-
-
- July 2020 BUNDLE-LIST(1)
diff --git a/man/bundle-lock.1 b/man/bundle-lock.1
index d8dafe2ce6..350f1b3daa 100644
--- a/man/bundle-lock.1
+++ b/man/bundle-lock.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-LOCK" "1" "July 2020" "" ""
+.TH "BUNDLE\-LOCK" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
diff --git a/man/bundle-lock.ronn b/man/bundle-lock.1.ronn
index 3aa5920f5a..3aa5920f5a 100644
--- a/man/bundle-lock.ronn
+++ b/man/bundle-lock.1.ronn
diff --git a/man/bundle-lock.1.txt b/man/bundle-lock.1.txt
deleted file mode 100644
index 6a1163dc29..0000000000
--- a/man/bundle-lock.1.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-BUNDLE-LOCK(1) BUNDLE-LOCK(1)
-
-
-
-NAME
- bundle-lock - Creates / Updates a lockfile without installing
-
-SYNOPSIS
- bundle lock [--update] [--local] [--print] [--lockfile=PATH]
- [--full-index] [--add-platform] [--remove-platform] [--patch] [--minor]
- [--major] [--strict] [--conservative]
-
-DESCRIPTION
- Lock the gems specified in Gemfile.
-
-OPTIONS
- --update=<*gems>
- Ignores the existing lockfile. Resolve then updates lockfile.
- Taking a list of gems or updating all gems if no list is given.
-
- --local
- Do not attempt to connect to rubygems.org. Instead, Bundler will
- use the gems already present in Rubygems' cache or in
- vendor/cache. Note that if a appropriate platform-specific gem
- exists on rubygems.org it will not be found.
-
- --print
- Prints the lockfile to STDOUT instead of writing to the file
- system.
-
- --lockfile=<path>
- The path where the lockfile should be written to.
-
- --full-index
- Fall back to using the single-file index of all gems.
-
- --add-platform
- Add a new platform to the lockfile, re-resolving for the
- addition of that platform.
-
- --remove-platform
- Remove a platform from the lockfile.
-
- --patch
- If updating, prefer updating only to next patch version.
-
- --minor
- If updating, prefer updating only to next minor version.
-
- --major
- If updating, prefer updating to next major version (default).
-
- --strict
- If updating, do not allow any gem to be updated past latest
- --patch | --minor | --major.
-
- --conservative
- If updating, use bundle install conservative update behavior and
- do not allow shared dependencies to be updated.
-
-UPDATING ALL GEMS
- If you run bundle lock with --update option without list of gems,
- bundler will ignore any previously installed gems and resolve all
- dependencies again based on the latest versions of all gems available
- in the sources.
-
-UPDATING A LIST OF GEMS
- Sometimes, you want to update a single gem in the Gemfile(5), and leave
- the rest of the gems that you specified locked to the versions in the
- Gemfile.lock.
-
- For instance, you only want to update nokogiri, run bundle lock
- --update nokogiri.
-
- Bundler will update nokogiri and any of its dependencies, but leave the
- rest of the gems that you specified locked to the versions in the
- Gemfile.lock.
-
-SUPPORTING OTHER PLATFORMS
- If you want your bundle to support platforms other than the one you're
- running locally, you can run bundle lock --add-platform PLATFORM to add
- PLATFORM to the lockfile, force bundler to re-resolve and consider the
- new platform when picking gems, all without needing to have a machine
- that matches PLATFORM handy to install those platform-specific gems on.
-
- For a full explanation of gem platforms, see gem help platform.
-
-PATCH LEVEL OPTIONS
- See bundle update(1) bundle-update.1.html for details.
-
-
-
- July 2020 BUNDLE-LOCK(1)
diff --git a/man/bundle-open.1 b/man/bundle-open.1
index 9fa01c0283..9986d5004c 100644
--- a/man/bundle-open.1
+++ b/man/bundle-open.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-OPEN" "1" "July 2020" "" ""
+.TH "BUNDLE\-OPEN" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
diff --git a/man/bundle-open.ronn b/man/bundle-open.1.ronn
index 497beac93f..497beac93f 100644
--- a/man/bundle-open.ronn
+++ b/man/bundle-open.1.ronn
diff --git a/man/bundle-open.1.txt b/man/bundle-open.1.txt
deleted file mode 100644
index 46b441fb24..0000000000
--- a/man/bundle-open.1.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-BUNDLE-OPEN(1) BUNDLE-OPEN(1)
-
-
-
-NAME
- bundle-open - Opens the source directory for a gem in your bundle
-
-SYNOPSIS
- bundle open [GEM]
-
-DESCRIPTION
- Opens the source directory of the provided GEM in your editor.
-
- For this to work the EDITOR or BUNDLER_EDITOR environment variable has
- to be set.
-
- Example:
-
-
-
- bundle open 'rack'
-
-
-
- Will open the source directory for the 'rack' gem in your bundle.
-
-
-
- July 2020 BUNDLE-OPEN(1)
diff --git a/man/bundle-outdated.1 b/man/bundle-outdated.1
index e4f7923528..3fc3cdc601 100644
--- a/man/bundle-outdated.1
+++ b/man/bundle-outdated.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-OUTDATED" "1" "July 2020" "" ""
+.TH "BUNDLE\-OUTDATED" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-outdated\fR \- List installed gems with newer versions available
diff --git a/man/bundle-outdated.ronn b/man/bundle-outdated.1.ronn
index a991d23789..a991d23789 100644
--- a/man/bundle-outdated.ronn
+++ b/man/bundle-outdated.1.ronn
diff --git a/man/bundle-outdated.1.txt b/man/bundle-outdated.1.txt
deleted file mode 100644
index a4ab9ebc2f..0000000000
--- a/man/bundle-outdated.1.txt
+++ /dev/null
@@ -1,131 +0,0 @@
-BUNDLE-OUTDATED(1) BUNDLE-OUTDATED(1)
-
-
-
-NAME
- bundle-outdated - List installed gems with newer versions available
-
-SYNOPSIS
- bundle outdated [GEM] [--local] [--pre] [--source] [--strict]
- [--parseable | --porcelain] [--group=GROUP] [--groups]
- [--update-strict] [--patch|--minor|--major] [--filter-major]
- [--filter-minor] [--filter-patch] [--only-explicit]
-
-DESCRIPTION
- Outdated lists the names and versions of gems that have a newer version
- available in the given source. Calling outdated with [GEM [GEM]] will
- only check for newer versions of the given gems. Prerelease gems are
- ignored by default. If your gems are up to date, Bundler will exit with
- a status of 0. Otherwise, it will exit 1.
-
-OPTIONS
- --local
- Do not attempt to fetch gems remotely and use the gem cache
- instead.
-
- --pre Check for newer pre-release gems.
-
- --source
- Check against a specific source.
-
- --strict
- Only list newer versions allowed by your Gemfile requirements.
-
- --parseable, --porcelain
- Use minimal formatting for more parseable output.
-
- --group
- List gems from a specific group.
-
- --groups
- List gems organized by groups.
-
- --update-strict
- Strict conservative resolution, do not allow any gem to be
- updated past latest --patch | --minor| --major.
-
- --minor
- Prefer updating only to next minor version.
-
- --major
- Prefer updating to next major version (default).
-
- --patch
- Prefer updating only to next patch version.
-
- --filter-major
- Only list major newer versions.
-
- --filter-minor
- Only list minor newer versions.
-
- --filter-patch
- Only list patch newer versions.
-
- --only-explicit
- Only list gems specified in your Gemfile, not their
- dependencies.
-
-PATCH LEVEL OPTIONS
- See bundle update(1) bundle-update.1.html for details.
-
- One difference between the patch level options in bundle update and
- here is the --strict option. --strict was already an option on outdated
- before the patch level options were added. --strict wasn't altered, and
- the --update-strict option on outdated reflects what --strict does on
- bundle update.
-
-FILTERING OUTPUT
- The 3 filtering options do not affect the resolution of versions,
- merely what versions are shown in the output.
-
- If the regular output shows the following:
-
-
-
- * faker (newest 1.6.6, installed 1.6.5, requested ~> 1.4) in groups "development, test"
- * hashie (newest 3.4.6, installed 1.2.0, requested = 1.2.0) in groups "default"
- * headless (newest 2.3.1, installed 2.2.3) in groups "test"
-
-
-
- --filter-major would only show:
-
-
-
- * hashie (newest 3.4.6, installed 1.2.0, requested = 1.2.0) in groups "default"
-
-
-
- --filter-minor would only show:
-
-
-
- * headless (newest 2.3.1, installed 2.2.3) in groups "test"
-
-
-
- --filter-patch would only show:
-
-
-
- * faker (newest 1.6.6, installed 1.6.5, requested ~> 1.4) in groups "development, test"
-
-
-
- Filter options can be combined. --filter-minor and --filter-patch would
- show:
-
-
-
- * faker (newest 1.6.6, installed 1.6.5, requested ~> 1.4) in groups "development, test"
- * headless (newest 2.3.1, installed 2.2.3) in groups "test"
-
-
-
- Combining all three filter options would be the same result as
- providing none of them.
-
-
-
- July 2020 BUNDLE-OUTDATED(1)
diff --git a/man/bundle-platform.1 b/man/bundle-platform.1
index c39f5fe644..b4c521e0c1 100644
--- a/man/bundle-platform.1
+++ b/man/bundle-platform.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-PLATFORM" "1" "July 2020" "" ""
+.TH "BUNDLE\-PLATFORM" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-platform\fR \- Displays platform compatibility information
diff --git a/man/bundle-platform.ronn b/man/bundle-platform.1.ronn
index b5d3283fb6..b5d3283fb6 100644
--- a/man/bundle-platform.ronn
+++ b/man/bundle-platform.1.ronn
diff --git a/man/bundle-platform.1.txt b/man/bundle-platform.1.txt
deleted file mode 100644
index bc6812f3aa..0000000000
--- a/man/bundle-platform.1.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-BUNDLE-PLATFORM(1) BUNDLE-PLATFORM(1)
-
-
-
-NAME
- bundle-platform - Displays platform compatibility information
-
-SYNOPSIS
- bundle platform [--ruby]
-
-DESCRIPTION
- platform will display information from your Gemfile, Gemfile.lock, and
- Ruby VM about your platform.
-
- For instance, using this Gemfile(5):
-
-
-
- source "https://rubygems.org"
-
- ruby "1.9.3"
-
- gem "rack"
-
-
-
- If you run bundle platform on Ruby 1.9.3, it will display the following
- output:
-
-
-
- Your platform is: x86_64-linux
-
- Your app has gems that work on these platforms:
- * ruby
-
- Your Gemfile specifies a Ruby version requirement:
- * ruby 1.9.3
-
- Your current platform satisfies the Ruby version requirement.
-
-
-
- platform will list all the platforms in your Gemfile.lock as well as
- the ruby directive if applicable from your Gemfile(5). It will also let
- you know if the ruby directive requirement has been met. If ruby
- directive doesn't match the running Ruby VM, it will tell you what part
- does not.
-
-OPTIONS
- --ruby It will display the ruby directive information, so you don't
- have to parse it from the Gemfile(5).
-
-
-
-
- July 2020 BUNDLE-PLATFORM(1)
diff --git a/man/bundle-pristine.1 b/man/bundle-pristine.1
index f5dfb06025..0a1790655e 100644
--- a/man/bundle-pristine.1
+++ b/man/bundle-pristine.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-PRISTINE" "1" "July 2020" "" ""
+.TH "BUNDLE\-PRISTINE" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
diff --git a/man/bundle-pristine.ronn b/man/bundle-pristine.1.ronn
index e2d6b6a348..e2d6b6a348 100644
--- a/man/bundle-pristine.ronn
+++ b/man/bundle-pristine.1.ronn
diff --git a/man/bundle-pristine.1.txt b/man/bundle-pristine.1.txt
deleted file mode 100644
index 04dc585735..0000000000
--- a/man/bundle-pristine.1.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-BUNDLE-PRISTINE(1) BUNDLE-PRISTINE(1)
-
-
-
-NAME
- bundle-pristine - Restores installed gems to their pristine condition
-
-SYNOPSIS
- bundle pristine
-
-DESCRIPTION
- pristine restores the installed gems in the bundle to their pristine
- condition using the local gem cache from RubyGems. For git gems, a
- forced checkout will be performed.
-
- For further explanation, bundle pristine ignores unpacked files on
- disk. In other words, this command utilizes the local .gem cache or the
- gem's git repository as if one were installing from scratch.
-
- Note: the Bundler gem cannot be restored to its original state with
- pristine. One also cannot use bundle pristine on gems with a 'path'
- option in the Gemfile, because bundler has no original copy it can
- restore from.
-
- When is it practical to use bundle pristine?
-
- It comes in handy when a developer is debugging a gem. bundle pristine
- is a great way to get rid of experimental changes to a gem that one may
- not want.
-
- Why use bundle pristine over gem pristine --all?
-
- Both commands are very similar. For context: bundle pristine, without
- arguments, cleans all gems from the lockfile. Meanwhile, gem pristine
- --all cleans all installed gems for that Ruby version.
-
- If a developer forgets which gems in their project they might have been
- debugging, the Rubygems gem pristine [GEMNAME] command may be
- inconvenient. One can avoid waiting for gem pristine --all, and instead
- run bundle pristine.
-
-
-
- July 2020 BUNDLE-PRISTINE(1)
diff --git a/man/bundle-remove.1 b/man/bundle-remove.1
index 6b91fe24e5..ee24f676a6 100644
--- a/man/bundle-remove.1
+++ b/man/bundle-remove.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-REMOVE" "1" "July 2020" "" ""
+.TH "BUNDLE\-REMOVE" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-remove\fR \- Removes gems from the Gemfile
diff --git a/man/bundle-remove.ronn b/man/bundle-remove.1.ronn
index 40a239b4a2..40a239b4a2 100644
--- a/man/bundle-remove.ronn
+++ b/man/bundle-remove.1.ronn
diff --git a/man/bundle-remove.1.txt b/man/bundle-remove.1.txt
deleted file mode 100644
index 2bf9a9fc17..0000000000
--- a/man/bundle-remove.1.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-BUNDLE-REMOVE(1) BUNDLE-REMOVE(1)
-
-
-
-NAME
- bundle-remove - Removes gems from the Gemfile
-
-SYNOPSIS
- bundle remove [GEM [GEM ...]] [--install]
-
-DESCRIPTION
- Removes the given gems from the Gemfile while ensuring that the
- resulting Gemfile is still valid. If a gem cannot be removed, a warning
- is printed. If a gem is already absent from the Gemfile, and error is
- raised.
-
-OPTIONS
- --install
- Runs bundle install after the given gems have been removed from
- the Gemfile, which ensures that both the lockfile and the
- installed gems on disk are also updated to remove the given
- gem(s).
-
- Example:
-
- bundle remove rails
-
- bundle remove rails rack
-
- bundle remove rails rack --install
-
-
-
- July 2020 BUNDLE-REMOVE(1)
diff --git a/man/bundle-show.1 b/man/bundle-show.1
index 24c4bb5bef..f83c810ffe 100644
--- a/man/bundle-show.1
+++ b/man/bundle-show.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-SHOW" "1" "July 2020" "" ""
+.TH "BUNDLE\-SHOW" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
diff --git a/man/bundle-show.ronn b/man/bundle-show.1.ronn
index a6a59a1445..a6a59a1445 100644
--- a/man/bundle-show.ronn
+++ b/man/bundle-show.1.ronn
diff --git a/man/bundle-show.1.txt b/man/bundle-show.1.txt
deleted file mode 100644
index 43e009320f..0000000000
--- a/man/bundle-show.1.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-BUNDLE-SHOW(1) BUNDLE-SHOW(1)
-
-
-
-NAME
- bundle-show - Shows all the gems in your bundle, or the path to a gem
-
-SYNOPSIS
- bundle show [GEM] [--paths]
-
-DESCRIPTION
- Without the [GEM] option, show will print a list of the names and
- versions of all gems that are required by your
- [Gemfile(5)][Gemfile(5)], sorted by name.
-
- Calling show with [GEM] will list the exact location of that gem on
- your machine.
-
-OPTIONS
- --paths
- List the paths of all gems that are required by your
- [Gemfile(5)][Gemfile(5)], sorted by gem name.
-
-
-
-
- July 2020 BUNDLE-SHOW(1)
diff --git a/man/bundle-update.1 b/man/bundle-update.1
index c32e3ab602..002f2e69b9 100644
--- a/man/bundle-update.1
+++ b/man/bundle-update.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-UPDATE" "1" "July 2020" "" ""
+.TH "BUNDLE\-UPDATE" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions
diff --git a/man/bundle-update.ronn b/man/bundle-update.1.ronn
index 397fecadcb..397fecadcb 100644
--- a/man/bundle-update.ronn
+++ b/man/bundle-update.1.ronn
diff --git a/man/bundle-update.1.txt b/man/bundle-update.1.txt
deleted file mode 100644
index 4e48d6cead..0000000000
--- a/man/bundle-update.1.txt
+++ /dev/null
@@ -1,391 +0,0 @@
-BUNDLE-UPDATE(1) BUNDLE-UPDATE(1)
-
-
-
-NAME
- bundle-update - Update your gems to the latest available versions
-
-SYNOPSIS
- bundle update *gems [--all] [--group=NAME] [--source=NAME] [--local]
- [--ruby] [--bundler[=VERSION]] [--full-index] [--jobs=JOBS] [--quiet]
- [--patch|--minor|--major] [--redownload] [--strict] [--conservative]
-
-DESCRIPTION
- Update the gems specified (all gems, if --all flag is used), ignoring
- the previously installed gems specified in the Gemfile.lock. In
- general, you should use bundle install(1) bundle-install.1.html to
- install the same exact gems and versions across machines.
-
- You would use bundle update to explicitly update the version of a gem.
-
-OPTIONS
- --all Update all gems specified in Gemfile.
-
- --group=<name>, -g=[<name>]
- Only update the gems in the specified group. For instance, you
- can update all gems in the development group with bundle update
- --group development. You can also call bundle update rails
- --group test to update the rails gem and all gems in the test
- group, for example.
-
- --source=<name>
- The name of a :git or :path source used in the Gemfile(5). For
- instance, with a :git source of
- http://github.com/rails/rails.git, you would call bundle update
- --source rails
-
- --local
- Do not attempt to fetch gems remotely and use the gem cache
- instead.
-
- --ruby Update the locked version of Ruby to the current version of
- Ruby.
-
- --bundler
- Update the locked version of bundler to the invoked bundler
- version.
-
- --full-index
- Fall back to using the single-file index of all gems.
-
- --jobs=[<number>], -j[<number>]
- Specify the number of jobs to run in parallel. The default is 1.
-
- --retry=[<number>]
- Retry failed network or git requests for number times.
-
- --quiet
- Only output warnings and errors.
-
- --redownload
- Force downloading every gem.
-
- --patch
- Prefer updating only to next patch version.
-
- --minor
- Prefer updating only to next minor version.
-
- --major
- Prefer updating to next major version (default).
-
- --strict
- Do not allow any gem to be updated past latest --patch | --minor
- | --major.
-
- --conservative
- Use bundle install conservative update behavior and do not allow
- shared dependencies to be updated.
-
-UPDATING ALL GEMS
- If you run bundle update --all, bundler will ignore any previously
- installed gems and resolve all dependencies again based on the latest
- versions of all gems available in the sources.
-
- Consider the following Gemfile(5):
-
-
-
- source "https://rubygems.org"
-
- gem "rails", "3.0.0.rc"
- gem "nokogiri"
-
-
-
- When you run bundle install(1) bundle-install.1.html the first time,
- bundler will resolve all of the dependencies, all the way down, and
- install what you need:
-
-
-
- Fetching gem metadata from https://rubygems.org/.........
- Resolving dependencies...
- Installing builder 2.1.2
- Installing abstract 1.0.0
- Installing rack 1.2.8
- Using bundler 1.7.6
- Installing rake 10.4.0
- Installing polyglot 0.3.5
- Installing mime-types 1.25.1
- Installing i18n 0.4.2
- Installing mini_portile 0.6.1
- Installing tzinfo 0.3.42
- Installing rack-mount 0.6.14
- Installing rack-test 0.5.7
- Installing treetop 1.4.15
- Installing thor 0.14.6
- Installing activesupport 3.0.0.rc
- Installing erubis 2.6.6
- Installing activemodel 3.0.0.rc
- Installing arel 0.4.0
- Installing mail 2.2.20
- Installing activeresource 3.0.0.rc
- Installing actionpack 3.0.0.rc
- Installing activerecord 3.0.0.rc
- Installing actionmailer 3.0.0.rc
- Installing railties 3.0.0.rc
- Installing rails 3.0.0.rc
- Installing nokogiri 1.6.5
-
- Bundle complete! 2 Gemfile dependencies, 26 gems total.
- Use `bundle show [gemname]` to see where a bundled gem is installed.
-
-
-
- As you can see, even though you have two gems in the Gemfile(5), your
- application needs 26 different gems in order to run. Bundler remembers
- the exact versions it installed in Gemfile.lock. The next time you run
- bundle install(1) bundle-install.1.html, bundler skips the dependency
- resolution and installs the same gems as it installed last time.
-
- After checking in the Gemfile.lock into version control and cloning it
- on another machine, running bundle install(1) bundle-install.1.html
- will still install the gems that you installed last time. You don't
- need to worry that a new release of erubis or mail changes the gems you
- use.
-
- However, from time to time, you might want to update the gems you are
- using to the newest versions that still match the gems in your
- Gemfile(5).
-
- To do this, run bundle update --all, which will ignore the
- Gemfile.lock, and resolve all the dependencies again. Keep in mind that
- this process can result in a significantly different set of the 25
- gems, based on the requirements of new gems that the gem authors
- released since the last time you ran bundle update --all.
-
-UPDATING A LIST OF GEMS
- Sometimes, you want to update a single gem in the Gemfile(5), and leave
- the rest of the gems that you specified locked to the versions in the
- Gemfile.lock.
-
- For instance, in the scenario above, imagine that nokogiri releases
- version 1.4.4, and you want to update it without updating Rails and all
- of its dependencies. To do this, run bundle update nokogiri.
-
- Bundler will update nokogiri and any of its dependencies, but leave
- alone Rails and its dependencies.
-
-OVERLAPPING DEPENDENCIES
- Sometimes, multiple gems declared in your Gemfile(5) are satisfied by
- the same second-level dependency. For instance, consider the case of
- thin and rack-perftools-profiler.
-
-
-
- source "https://rubygems.org"
-
- gem "thin"
- gem "rack-perftools-profiler"
-
-
-
- The thin gem depends on rack >= 1.0, while rack-perftools-profiler
- depends on rack ~> 1.0. If you run bundle install, you get:
-
-
-
- Fetching source index for https://rubygems.org/
- Installing daemons (1.1.0)
- Installing eventmachine (0.12.10) with native extensions
- Installing open4 (1.0.1)
- Installing perftools.rb (0.4.7) with native extensions
- Installing rack (1.2.1)
- Installing rack-perftools_profiler (0.0.2)
- Installing thin (1.2.7) with native extensions
- Using bundler (1.0.0.rc.3)
-
-
-
- In this case, the two gems have their own set of dependencies, but they
- share rack in common. If you run bundle update thin, bundler will
- update daemons, eventmachine and rack, which are dependencies of thin,
- but not open4 or perftools.rb, which are dependencies of
- rack-perftools_profiler. Note that bundle update thin will update rack
- even though it's also a dependency of rack-perftools_profiler.
-
- In short, by default, when you update a gem using bundle update,
- bundler will update all dependencies of that gem, including those that
- are also dependencies of another gem.
-
- To prevent updating shared dependencies, prior to version 1.14 the only
- option was the CONSERVATIVE UPDATING behavior in bundle install(1)
- bundle-install.1.html:
-
- In this scenario, updating the thin version manually in the Gemfile(5),
- and then running bundle install(1) bundle-install.1.html will only
- update daemons and eventmachine, but not rack. For more information,
- see the CONSERVATIVE UPDATING section of bundle install(1)
- bundle-install.1.html.
-
- Starting with 1.14, specifying the --conservative option will also
- prevent shared dependencies from being updated.
-
-PATCH LEVEL OPTIONS
- Version 1.14 introduced 4 patch-level options that will influence how
- gem versions are resolved. One of the following options can be used:
- --patch, --minor or --major. --strict can be added to further influence
- resolution.
-
- --patch
- Prefer updating only to next patch version.
-
- --minor
- Prefer updating only to next minor version.
-
- --major
- Prefer updating to next major version (default).
-
- --strict
- Do not allow any gem to be updated past latest --patch | --minor
- | --major.
-
- When Bundler is resolving what versions to use to satisfy declared
- requirements in the Gemfile or in parent gems, it looks up all
- available versions, filters out any versions that don't satisfy the
- requirement, and then, by default, sorts them from newest to oldest,
- considering them in that order.
-
- Providing one of the patch level options (e.g. --patch) changes the
- sort order of the satisfying versions, causing Bundler to consider the
- latest --patch or --minor version available before other versions. Note
- that versions outside the stated patch level could still be resolved to
- if necessary to find a suitable dependency graph.
-
- For example, if gem 'foo' is locked at 1.0.2, with no gem requirement
- defined in the Gemfile, and versions 1.0.3, 1.0.4, 1.1.0, 1.1.1, 2.0.0
- all exist, the default order of preference by default (--major) will be
- "2.0.0, 1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2".
-
- If the --patch option is used, the order of preference will change to
- "1.0.4, 1.0.3, 1.0.2, 1.1.1, 1.1.0, 2.0.0".
-
- If the --minor option is used, the order of preference will change to
- "1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2, 2.0.0".
-
- Combining the --strict option with any of the patch level options will
- remove any versions beyond the scope of the patch level option, to
- ensure that no gem is updated that far.
-
- To continue the previous example, if both --patch and --strict options
- are used, the available versions for resolution would be "1.0.4, 1.0.3,
- 1.0.2". If --minor and --strict are used, it would be "1.1.1, 1.1.0,
- 1.0.4, 1.0.3, 1.0.2".
-
- Gem requirements as defined in the Gemfile will still be the first
- determining factor for what versions are available. If the gem
- requirement for foo in the Gemfile is '~> 1.0', that will accomplish
- the same thing as providing the --minor and --strict options.
-
-PATCH LEVEL EXAMPLES
- Given the following gem specifications:
-
-
-
- foo 1.4.3, requires: ~> bar 2.0
- foo 1.4.4, requires: ~> bar 2.0
- foo 1.4.5, requires: ~> bar 2.1
- foo 1.5.0, requires: ~> bar 2.1
- foo 1.5.1, requires: ~> bar 3.0
- bar with versions 2.0.3, 2.0.4, 2.1.0, 2.1.1, 3.0.0
-
-
-
- Gemfile:
-
-
-
- gem 'foo'
-
-
-
- Gemfile.lock:
-
-
-
- foo (1.4.3)
- bar (~> 2.0)
- bar (2.0.3)
-
-
-
- Cases:
-
-
-
- # Command Line Result
- ------------------------------------------------------------
- 1 bundle update --patch 'foo 1.4.5', 'bar 2.1.1'
- 2 bundle update --patch foo 'foo 1.4.5', 'bar 2.1.1'
- 3 bundle update --minor 'foo 1.5.1', 'bar 3.0.0'
- 4 bundle update --minor --strict 'foo 1.5.0', 'bar 2.1.1'
- 5 bundle update --patch --strict 'foo 1.4.4', 'bar 2.0.4'
-
-
-
- In case 1, bar is upgraded to 2.1.1, a minor version increase, because
- the dependency from foo 1.4.5 required it.
-
- In case 2, only foo is requested to be unlocked, but bar is also
- allowed to move because it's not a declared dependency in the Gemfile.
-
- In case 3, bar goes up a whole major release, because a minor increase
- is preferred now for foo, and when it goes to 1.5.1, it requires 3.0.0
- of bar.
-
- In case 4, foo is preferred up to a minor version, but 1.5.1 won't work
- because the --strict flag removes bar 3.0.0 from consideration since
- it's a major increment.
-
- In case 5, both foo and bar have any minor or major increments removed
- from consideration because of the --strict flag, so the most they can
- move is up to 1.4.4 and 2.0.4.
-
-RECOMMENDED WORKFLOW
- In general, when working with an application managed with bundler, you
- should use the following workflow:
-
- o After you create your Gemfile(5) for the first time, run
-
- $ bundle install
-
- o Check the resulting Gemfile.lock into version control
-
- $ git add Gemfile.lock
-
- o When checking out this repository on another development machine,
- run
-
- $ bundle install
-
- o When checking out this repository on a deployment machine, run
-
- $ bundle install --deployment
-
- o After changing the Gemfile(5) to reflect a new or update
- dependency, run
-
- $ bundle install
-
- o Make sure to check the updated Gemfile.lock into version control
-
- $ git add Gemfile.lock
-
- o If bundle install(1) bundle-install.1.html reports a conflict,
- manually update the specific gems that you changed in the
- Gemfile(5)
-
- $ bundle update rails thin
-
- o If you want to update all the gems to the latest possible versions
- that still match the gems listed in the Gemfile(5), run
-
- $ bundle update --all
-
-
-
-
-
-
- July 2020 BUNDLE-UPDATE(1)
diff --git a/man/bundle-viz.1 b/man/bundle-viz.1
index 34dea1642b..cb2fcde537 100644
--- a/man/bundle-viz.1
+++ b/man/bundle-viz.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-VIZ" "1" "July 2020" "" ""
+.TH "BUNDLE\-VIZ" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
diff --git a/man/bundle-viz.ronn b/man/bundle-viz.1.ronn
index 701df5415e..701df5415e 100644
--- a/man/bundle-viz.ronn
+++ b/man/bundle-viz.1.ronn
diff --git a/man/bundle-viz.1.txt b/man/bundle-viz.1.txt
deleted file mode 100644
index 23bd0c3d5c..0000000000
--- a/man/bundle-viz.1.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-BUNDLE-VIZ(1) BUNDLE-VIZ(1)
-
-
-
-NAME
- bundle-viz - Generates a visual dependency graph for your Gemfile
-
-SYNOPSIS
- bundle viz [--file=FILE] [--format=FORMAT] [--requirements] [--version]
- [--without=GROUP GROUP]
-
-DESCRIPTION
- viz generates a PNG file of the current Gemfile(5) as a dependency
- graph. viz requires the ruby-graphviz gem (and its dependencies).
-
- The associated gems must also be installed via bundle install(1)
- bundle-install.1.html.
-
-OPTIONS
- --file, -f
- The name to use for the generated file. See --format option
-
- --format, -F
- This is output format option. Supported format is png, jpg, svg,
- dot ...
-
- --requirements, -R
- Set to show the version of each required dependency.
-
- --version, -v
- Set to show each gem version.
-
- --without, -W
- Exclude gems that are part of the specified named group.
-
-
-
-
- July 2020 BUNDLE-VIZ(1)
diff --git a/man/bundle.1 b/man/bundle.1
index 2f8291cb05..86d0aec497 100644
--- a/man/bundle.1
+++ b/man/bundle.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE" "1" "July 2020" "" ""
+.TH "BUNDLE" "1" "October 2020" "" ""
.
.SH "NAME"
\fBbundle\fR \- Ruby Dependency Management
diff --git a/man/bundle.ronn b/man/bundle.1.ronn
index 5b1712394a..5b1712394a 100644
--- a/man/bundle.ronn
+++ b/man/bundle.1.ronn
diff --git a/man/bundle.1.txt b/man/bundle.1.txt
deleted file mode 100644
index c36affbcc2..0000000000
--- a/man/bundle.1.txt
+++ /dev/null
@@ -1,116 +0,0 @@
-BUNDLE(1) BUNDLE(1)
-
-
-
-NAME
- bundle - Ruby Dependency Management
-
-SYNOPSIS
- bundle COMMAND [--no-color] [--verbose] [ARGS]
-
-DESCRIPTION
- Bundler manages an application's dependencies through its entire life
- across many machines systematically and repeatably.
-
- See the bundler website https://bundler.io for information on getting
- started, and Gemfile(5) for more information on the Gemfile format.
-
-OPTIONS
- --no-color
- Print all output without color
-
- --retry, -r
- Specify the number of times you wish to attempt network commands
-
- --verbose, -V
- Print out additional logging information
-
-BUNDLE COMMANDS
- We divide bundle subcommands into primary commands and utilities:
-
-PRIMARY COMMANDS
- bundle install(1) bundle-install.1.html
- Install the gems specified by the Gemfile or Gemfile.lock
-
- bundle update(1) bundle-update.1.html
- Update dependencies to their latest versions
-
- bundle package(1) bundle-package.1.html
- Package the .gem files required by your application into the
- vendor/cache directory
-
- bundle exec(1) bundle-exec.1.html
- Execute a script in the current bundle
-
- bundle config(1) bundle-config.1.html
- Specify and read configuration options for Bundler
-
- bundle help(1)
- Display detailed help for each subcommand
-
-UTILITIES
- bundle add(1) bundle-add.1.html
- Add the named gem to the Gemfile and run bundle install
-
- bundle binstubs(1) bundle-binstubs.1.html
- Generate binstubs for executables in a gem
-
- bundle check(1) bundle-check.1.html
- Determine whether the requirements for your application are
- installed and available to Bundler
-
- bundle show(1) bundle-show.1.html
- Show the source location of a particular gem in the bundle
-
- bundle outdated(1) bundle-outdated.1.html
- Show all of the outdated gems in the current bundle
-
- bundle console(1)
- Start an IRB session in the current bundle
-
- bundle open(1) bundle-open.1.html
- Open an installed gem in the editor
-
- bundle lock(1) bundle-lock.1.html
- Generate a lockfile for your dependencies
-
- bundle viz(1) bundle-viz.1.html
- Generate a visual representation of your dependencies
-
- bundle init(1) bundle-init.1.html
- Generate a simple Gemfile, placed in the current directory
-
- bundle gem(1) bundle-gem.1.html
- Create a simple gem, suitable for development with Bundler
-
- bundle platform(1) bundle-platform.1.html
- Display platform compatibility information
-
- bundle clean(1) bundle-clean.1.html
- Clean up unused gems in your Bundler directory
-
- bundle doctor(1) bundle-doctor.1.html
- Display warnings about common problems
-
- bundle remove(1) bundle-remove.1.html
- Removes gems from the Gemfile
-
-PLUGINS
- When running a command that isn't listed in PRIMARY COMMANDS or
- UTILITIES, Bundler will try to find an executable on your path named
- bundler-<command> and execute it, passing down any extra arguments to
- it.
-
-OBSOLETE
- These commands are obsolete and should no longer be used:
-
- o bundle cache(1)
-
- o bundle show(1)
-
-
-
-
-
-
- July 2020 BUNDLE(1)
diff --git a/man/gemfile.5 b/man/gemfile.5
index 4870bf8d04..401487c688 100644
--- a/man/gemfile.5
+++ b/man/gemfile.5
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "GEMFILE" "5" "July 2020" "" ""
+.TH "GEMFILE" "5" "October 2020" "" ""
.
.SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -150,7 +150,7 @@ gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
.IP "" 0
.
.SS "REQUIRE AS"
-Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if file you want \fBrequired\fR has same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
+Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
.
.IP "" 4
.
@@ -227,8 +227,8 @@ To specify multiple groups to ignore, specify a list of groups separated by spac
.
.nf
-bundle config set without test
-bundle config set without development test
+bundle config set \-\-local without test
+bundle config set \-\-local without development test
.
.fi
.
diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn
index 832577130c..994f0d66bd 100644
--- a/man/gemfile.5.ronn
+++ b/man/gemfile.5.ronn
@@ -120,8 +120,8 @@ Each _gem_ `MAY` have one or more version specifiers.
### REQUIRE AS
Each _gem_ `MAY` specify files that should be used when autorequiring via
-`Bundler.require`. You may pass an array with multiple files or `true` if file
-you want `required` has same name as _gem_ or `false` to
+`Bundler.require`. You may pass an array with multiple files or `true` if the file
+you want `required` has the same name as _gem_ or `false` to
prevent any file from being autorequired.
gem "redis", :require => ["redis/connection/hiredis", "redis"]
@@ -163,8 +163,8 @@ not install with the `without` configuration.
To specify multiple groups to ignore, specify a list of groups separated by spaces.
- bundle config set without test
- bundle config set without development test
+ bundle config set --local without test
+ bundle config set --local without development test
Also, calling `Bundler.setup` with no parameters, or calling `require "bundler/setup"`
will setup all groups except for the ones you excluded via `--without` (since they
diff --git a/man/gemfile.5.txt b/man/gemfile.5.txt
deleted file mode 100644
index 7affc02652..0000000000
--- a/man/gemfile.5.txt
+++ /dev/null
@@ -1,651 +0,0 @@
-GEMFILE(5) GEMFILE(5)
-
-
-
-NAME
- Gemfile - A format for describing gem dependencies for Ruby programs
-
-SYNOPSIS
- A Gemfile describes the gem dependencies required to execute associated
- Ruby code.
-
- Place the Gemfile in the root of the directory containing the
- associated code. For instance, in a Rails application, place the
- Gemfile in the same directory as the Rakefile.
-
-SYNTAX
- A Gemfile is evaluated as Ruby code, in a context which makes available
- a number of methods used to describe the gem requirements.
-
-GLOBAL SOURCES
- At the top of the Gemfile, add a line for the Rubygems source that
- contains the gems listed in the Gemfile.
-
-
-
- source "https://rubygems.org"
-
-
-
- It is possible, but not recommended as of Bundler 1.7, to add multiple
- global source lines. Each of these sources MUST be a valid Rubygems
- repository.
-
- Sources are checked for gems following the heuristics described in
- SOURCE PRIORITY. If a gem is found in more than one global source,
- Bundler will print a warning after installing the gem indicating which
- source was used, and listing the other sources where the gem is
- available. A specific source can be selected for gems that need to use
- a non-standard repository, suppressing this warning, by using the
- :source option or a source block.
-
- CREDENTIALS
- Some gem sources require a username and password. Use bundle config(1)
- bundle-config.1.html to set the username and password for any of the
- sources that need it. The command must be run once on each computer
- that will install the Gemfile, but this keeps the credentials from
- being stored in plain text in version control.
-
-
-
- bundle config gems.example.com user:password
-
-
-
- For some sources, like a company Gemfury account, it may be easier to
- include the credentials in the Gemfile as part of the source URL.
-
-
-
- source "https://user:password@gems.example.com"
-
-
-
- Credentials in the source URL will take precedence over credentials set
- using config.
-
-RUBY
- If your application requires a specific Ruby version or engine, specify
- your requirements using the ruby method, with the following arguments.
- All parameters are OPTIONAL unless otherwise specified.
-
- VERSION (required)
- The version of Ruby that your application requires. If your application
- requires an alternate Ruby engine, such as JRuby, Rubinius or
- TruffleRuby, this should be the Ruby version that the engine is
- compatible with.
-
-
-
- ruby "1.9.3"
-
-
-
- ENGINE
- Each application may specify a Ruby engine. If an engine is specified,
- an engine version must also be specified.
-
- What exactly is an Engine? - A Ruby engine is an implementation of the
- Ruby language.
-
- o For background: the reference or original implementation of the
- Ruby programming language is called Matz's Ruby Interpreter
- https://en.wikipedia.org/wiki/Ruby_MRI, or MRI for short. This is
- named after Ruby creator Yukihiro Matsumoto, also known as Matz.
- MRI is also known as CRuby, because it is written in C. MRI is the
- most widely used Ruby engine.
-
- o Other implementations https://www.ruby-lang.org/en/about/ of Ruby
- exist. Some of the more well-known implementations include Rubinius
- https://rubinius.com/, and JRuby http://jruby.org/. Rubinius is an
- alternative implementation of Ruby written in Ruby. JRuby is an
- implementation of Ruby on the JVM, short for Java Virtual Machine.
-
-
-
- ENGINE VERSION
- Each application may specify a Ruby engine version. If an engine
- version is specified, an engine must also be specified. If the engine
- is "ruby" the engine version specified must match the Ruby version.
-
-
-
- ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
-
-
-
- PATCHLEVEL
- Each application may specify a Ruby patchlevel.
-
-
-
- ruby "2.0.0", :patchlevel => "247"
-
-
-
-GEMS
- Specify gem requirements using the gem method, with the following
- arguments. All parameters are OPTIONAL unless otherwise specified.
-
- NAME (required)
- For each gem requirement, list a single gem line.
-
-
-
- gem "nokogiri"
-
-
-
- VERSION
- Each gem MAY have one or more version specifiers.
-
-
-
- gem "nokogiri", ">= 1.4.2"
- gem "RedCloth", ">= 4.1.0", "< 4.2.0"
-
-
-
- REQUIRE AS
- Each gem MAY specify files that should be used when autorequiring via
- Bundler.require. You may pass an array with multiple files or true if
- file you want required has same name as gem or false to prevent any
- file from being autorequired.
-
-
-
- gem "redis", :require => ["redis/connection/hiredis", "redis"]
- gem "webmock", :require => false
- gem "byebug", :require => true
-
-
-
- The argument defaults to the name of the gem. For example, these are
- identical:
-
-
-
- gem "nokogiri"
- gem "nokogiri", :require => "nokogiri"
- gem "nokogiri", :require => true
-
-
-
- GROUPS
- Each gem MAY specify membership in one or more groups. Any gem that
- does not specify membership in any group is placed in the default
- group.
-
-
-
- gem "rspec", :group => :test
- gem "wirble", :groups => [:development, :test]
-
-
-
- The Bundler runtime allows its two main methods, Bundler.setup and
- Bundler.require, to limit their impact to particular groups.
-
-
-
- # setup adds gems to Ruby's load path
- Bundler.setup # defaults to all groups
- require "bundler/setup" # same as Bundler.setup
- Bundler.setup(:default) # only set up the _default_ group
- Bundler.setup(:test) # only set up the _test_ group (but `not` _default_)
- Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
-
- # require requires all of the gems in the specified groups
- Bundler.require # defaults to the _default_ group
- Bundler.require(:default) # identical
- Bundler.require(:default, :test) # requires the _default_ and _test_ groups
- Bundler.require(:test) # requires the _test_ group
-
-
-
- The Bundler CLI allows you to specify a list of groups whose gems
- bundle install should not install with the without configuration.
-
- To specify multiple groups to ignore, specify a list of groups
- separated by spaces.
-
-
-
- bundle config set without test
- bundle config set without development test
-
-
-
- Also, calling Bundler.setup with no parameters, or calling require
- "bundler/setup" will setup all groups except for the ones you excluded
- via --without (since they are not available).
-
- Note that on bundle install, bundler downloads and evaluates all gems,
- in order to create a single canonical list of all of the required gems
- and their dependencies. This means that you cannot list different
- versions of the same gems in different groups. For more details, see
- Understanding Bundler https://bundler.io/rationale.html.
-
- PLATFORMS
- If a gem should only be used in a particular platform or set of
- platforms, you can specify them. Platforms are essentially identical to
- groups, except that you do not need to use the --without install-time
- flag to exclude groups of gems for other platforms.
-
- There are a number of Gemfile platforms:
-
- ruby C Ruby (MRI), Rubinius or TruffleRuby, but NOT Windows
-
- mri Same as ruby, but only C Ruby (MRI)
-
- mingw Windows 32 bit 'mingw32' platform (aka RubyInstaller)
-
- x64_mingw
- Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
-
- rbx Rubinius
-
- jruby JRuby
-
- truffleruby
- TruffleRuby
-
- mswin Windows
-
- You can restrict further by platform and version for all platforms
- except for rbx, jruby, truffleruby and mswin.
-
- To specify a version in addition to a platform, append the version
- number without the delimiter to the platform. For example, to specify
- that a gem should only be used on platforms with Ruby 2.3, use:
-
-
-
- ruby_23
-
-
-
- The full list of platforms and supported versions includes:
-
- ruby 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
-
- mri 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
-
- mingw 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
-
- x64_mingw
- 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
-
- As with groups, you can specify one or more platforms:
-
-
-
- gem "weakling", :platforms => :jruby
- gem "ruby-debug", :platforms => :mri_18
- gem "nokogiri", :platforms => [:mri_18, :jruby]
-
-
-
- All operations involving groups (bundle install bundle-install.1.html,
- Bundler.setup, Bundler.require) behave exactly the same as if any
- groups not matching the current platform were explicitly excluded.
-
- SOURCE
- You can select an alternate Rubygems repository for a gem using the
- ':source' option.
-
-
-
- gem "some_internal_gem", :source => "https://gems.example.com"
-
-
-
- This forces the gem to be loaded from this source and ignores any
- global sources declared at the top level of the file. If the gem does
- not exist in this source, it will not be installed.
-
- Bundler will search for child dependencies of this gem by first looking
- in the source selected for the parent, but if they are not found there,
- it will fall back on global sources using the ordering described in
- SOURCE PRIORITY.
-
- Selecting a specific source repository this way also suppresses the
- ambiguous gem warning described above in GLOBAL SOURCES (#source).
-
- Using the :source option for an individual gem will also make that
- source available as a possible global source for any other gems which
- do not specify explicit sources. Thus, when adding gems with explicit
- sources, it is recommended that you also ensure all other gems in the
- Gemfile are using explicit sources.
-
- GIT
- If necessary, you can specify that a gem is located at a particular git
- repository using the :git parameter. The repository can be accessed via
- several protocols:
-
- HTTP(S)
- gem "rails", :git => "https://github.com/rails/rails.git"
-
- SSH gem "rails", :git => "git@github.com:rails/rails.git"
-
- git gem "rails", :git => "git://github.com/rails/rails.git"
-
- If using SSH, the user that you use to run bundle install MUST have the
- appropriate keys available in their $HOME/.ssh.
-
- NOTE: http:// and git:// URLs should be avoided if at all possible.
- These protocols are unauthenticated, so a man-in-the-middle attacker
- can deliver malicious code and compromise your system. HTTPS and SSH
- are strongly preferred.
-
- The group, platforms, and require options are available and behave
- exactly the same as they would for a normal gem.
-
- A git repository SHOULD have at least one file, at the root of the
- directory containing the gem, with the extension .gemspec. This file
- MUST contain a valid gem specification, as expected by the gem build
- command.
-
- If a git repository does not have a .gemspec, bundler will attempt to
- create one, but it will not contain any dependencies, executables, or C
- extension compilation instructions. As a result, it may fail to
- properly integrate into your application.
-
- If a git repository does have a .gemspec for the gem you attached it
- to, a version specifier, if provided, means that the git repository is
- only valid if the .gemspec specifies a version matching the version
- specifier. If not, bundler will print a warning.
-
-
-
- gem "rails", "2.3.8", :git => "https://github.com/rails/rails.git"
- # bundle install will fail, because the .gemspec in the rails
- # repository's master branch specifies version 3.0.0
-
-
-
- If a git repository does not have a .gemspec for the gem you attached
- it to, a version specifier MUST be provided. Bundler will use this
- version in the simple .gemspec it creates.
-
- Git repositories support a number of additional options.
-
- branch, tag, and ref
- You MUST only specify at most one of these options. The default
- is :branch => "master". For example:
-
- gem "rails", :git => "https://github.com/rails/rails.git",
- :branch => "5-0-stable"
-
- gem "rails", :git => "https://github.com/rails/rails.git", :tag
- => "v5.0.0"
-
- gem "rails", :git => "https://github.com/rails/rails.git", :ref
- => "4aded"
-
- submodules
- For reference, a git submodule
- https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you
- have another git repository within a subfolder of your
- repository. Specify :submodules => true to cause bundler to
- expand any submodules included in the git repository
-
- If a git repository contains multiple .gemspecs, each .gemspec
- represents a gem located at the same place in the file system as the
- .gemspec.
-
-
-
- |~rails [git root]
- | |-rails.gemspec [rails gem located here]
- |~actionpack
- | |-actionpack.gemspec [actionpack gem located here]
- |~activesupport
- | |-activesupport.gemspec [activesupport gem located here]
- |...
-
-
-
- To install a gem located in a git repository, bundler changes to the
- directory containing the gemspec, runs gem build name.gemspec and then
- installs the resulting gem. The gem build command, which comes standard
- with Rubygems, evaluates the .gemspec in the context of the directory
- in which it is located.
-
- GIT SOURCE
- A custom git source can be defined via the git_source method. Provide
- the source's name as an argument, and a block which receives a single
- argument and interpolates it into a string to return the full repo
- address:
-
-
-
- git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
- gem 'rails', :stash => 'forks/rails'
-
-
-
- In addition, if you wish to choose a specific branch:
-
-
-
- gem "rails", :stash => "forks/rails", :branch => "branch_name"
-
-
-
- GITHUB
- NOTE: This shorthand should be avoided until Bundler 2.0, since it
- currently expands to an insecure git:// URL. This allows a
- man-in-the-middle attacker to compromise your system.
-
- If the git repository you want to use is hosted on GitHub and is
- public, you can use the :github shorthand to specify the github
- username and repository name (without the trailing ".git"), separated
- by a slash. If both the username and repository name are the same, you
- can omit one.
-
-
-
- gem "rails", :github => "rails/rails"
- gem "rails", :github => "rails"
-
-
-
- Are both equivalent to
-
-
-
- gem "rails", :git => "git://github.com/rails/rails.git"
-
-
-
- Since the github method is a specialization of git_source, it accepts a
- :branch named argument.
-
- GIST
- If the git repository you want to use is hosted as a Github Gist and is
- public, you can use the :gist shorthand to specify the gist identifier
- (without the trailing ".git").
-
-
-
- gem "the_hatch", :gist => "4815162342"
-
-
-
- Is equivalent to:
-
-
-
- gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
-
-
-
- Since the gist method is a specialization of git_source, it accepts a
- :branch named argument.
-
- BITBUCKET
- If the git repository you want to use is hosted on Bitbucket and is
- public, you can use the :bitbucket shorthand to specify the bitbucket
- username and repository name (without the trailing ".git"), separated
- by a slash. If both the username and repository name are the same, you
- can omit one.
-
-
-
- gem "rails", :bitbucket => "rails/rails"
- gem "rails", :bitbucket => "rails"
-
-
-
- Are both equivalent to
-
-
-
- gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
-
-
-
- Since the bitbucket method is a specialization of git_source, it
- accepts a :branch named argument.
-
- PATH
- You can specify that a gem is located in a particular location on the
- file system. Relative paths are resolved relative to the directory
- containing the Gemfile.
-
- Similar to the semantics of the :git option, the :path option requires
- that the directory in question either contains a .gemspec for the gem,
- or that you specify an explicit version that bundler should use.
-
- Unlike :git, bundler does not compile C extensions for gems specified
- as paths.
-
-
-
- gem "rails", :path => "vendor/rails"
-
-
-
- If you would like to use multiple local gems directly from the
- filesystem, you can set a global path option to the path containing the
- gem's files. This will automatically load gemspec files from
- subdirectories.
-
-
-
- path 'components' do
- gem 'admin_ui'
- gem 'public_ui'
- end
-
-
-
-BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
- The :source, :git, :path, :group, and :platforms options may be applied
- to a group of gems by using block form.
-
-
-
- source "https://gems.example.com" do
- gem "some_internal_gem"
- gem "another_internal_gem"
- end
-
- git "https://github.com/rails/rails.git" do
- gem "activesupport"
- gem "actionpack"
- end
-
- platforms :ruby do
- gem "ruby-debug"
- gem "sqlite3"
- end
-
- group :development, :optional => true do
- gem "wirble"
- gem "faker"
- end
-
-
-
- In the case of the group block form the :optional option can be given
- to prevent a group from being installed unless listed in the --with
- option given to the bundle install command.
-
- In the case of the git block form, the :ref, :branch, :tag, and
- :submodules options may be passed to the git method, and all gems in
- the block will inherit those options.
-
- The presence of a source block in a Gemfile also makes that source
- available as a possible global source for any other gems which do not
- specify explicit sources. Thus, when defining source blocks, it is
- recommended that you also ensure all other gems in the Gemfile are
- using explicit sources, either via source blocks or :source directives
- on individual gems.
-
-INSTALL_IF
- The install_if method allows gems to be installed based on a proc or
- lambda. This is especially useful for optional gems that can only be
- used if certain software is installed or some other conditions are met.
-
-
-
- install_if -> { RUBY_PLATFORM =~ /darwin/ } do
- gem "pasteboard"
- end
-
-
-
-GEMSPEC
- The .gemspec http://guides.rubygems.org/specification-reference/ file
- is where you provide metadata about your gem to Rubygems. Some required
- Gemspec attributes include the name, description, and homepage of your
- gem. This is also where you specify the dependencies your gem needs to
- run.
-
- If you wish to use Bundler to help install dependencies for a gem while
- it is being developed, use the gemspec method to pull in the
- dependencies listed in the .gemspec file.
-
- The gemspec method adds any runtime dependencies as gem requirements in
- the default group. It also adds development dependencies as gem
- requirements in the development group. Finally, it adds a gem
- requirement on your project (:path => '.'). In conjunction with
- Bundler.setup, this allows you to require project files in your test
- code as you would if the project were installed as a gem; you need not
- manipulate the load path manually or require project files via relative
- paths.
-
- The gemspec method supports optional :path, :glob, :name, and
- :development_group options, which control where bundler looks for the
- .gemspec, the glob it uses to look for the gemspec (defaults to:
- "{,,/*}.gemspec"), what named .gemspec it uses (if more than one is
- present), and which group development dependencies are included in.
-
- When a gemspec dependency encounters version conflicts during
- resolution, the local version under development will always be selected
- -- even if there are remote versions that better match other
- requirements for the gemspec gem.
-
-SOURCE PRIORITY
- When attempting to locate a gem to satisfy a gem requirement, bundler
- uses the following priority order:
-
- 1. The source explicitly attached to the gem (using :source, :path, or
- :git)
-
- 2. For implicit gems (dependencies of explicit gems), any source, git,
- or path repository declared on the parent. This results in bundler
- prioritizing the ActiveSupport gem from the Rails git repository
- over ones from rubygems.org
-
- 3. The sources specified via global source lines, searching each
- source in your Gemfile from last added to first added.
-
-
-
-
-
-
- July 2020 GEMFILE(5)
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb
index 50e2a698eb..8e4f9e6d36 100644
--- a/spec/bundler/bundler/cli_spec.rb
+++ b/spec/bundler/bundler/cli_spec.rb
@@ -32,49 +32,49 @@ RSpec.describe "bundle executable" do
it "aliases e to exec" do
bundle "e --help"
- expect(out).to include("BUNDLE-EXEC")
+ expect(out).to include("bundle-exec")
end
it "aliases ex to exec" do
bundle "ex --help"
- expect(out).to include("BUNDLE-EXEC")
+ expect(out).to include("bundle-exec")
end
it "aliases exe to exec" do
bundle "exe --help"
- expect(out).to include("BUNDLE-EXEC")
+ expect(out).to include("bundle-exec")
end
it "aliases c to check" do
bundle "c --help"
- expect(out).to include("BUNDLE-CHECK")
+ expect(out).to include("bundle-check")
end
it "aliases i to install" do
bundle "i --help"
- expect(out).to include("BUNDLE-INSTALL")
+ expect(out).to include("bundle-install")
end
it "aliases ls to list" do
bundle "ls --help"
- expect(out).to include("BUNDLE-LIST")
+ expect(out).to include("bundle-list")
end
it "aliases package to cache" do
bundle "package --help"
- expect(out).to include("BUNDLE-CACHE")
+ expect(out).to include("bundle-cache")
end
it "aliases pack to cache" do
bundle "pack --help"
- expect(out).to include("BUNDLE-CACHE")
+ expect(out).to include("bundle-cache")
end
end
diff --git a/spec/bundler/bundler/env_spec.rb b/spec/bundler/bundler/env_spec.rb
index fb593639bd..e900963350 100644
--- a/spec/bundler/bundler/env_spec.rb
+++ b/spec/bundler/bundler/env_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe Bundler::Env do
end
end
- private
+ private
def with_clear_paths(env_var, env_value)
old_env_var = ENV[env_var]
diff --git a/spec/bundler/bundler/friendly_errors_spec.rb b/spec/bundler/bundler/friendly_errors_spec.rb
index d6496db6ae..496191f891 100644
--- a/spec/bundler/bundler/friendly_errors_spec.rb
+++ b/spec/bundler/bundler/friendly_errors_spec.rb
@@ -193,9 +193,9 @@ RSpec.describe Bundler, "friendly errors" do
describe "#request_issue_report_for" do
it "calls relevant methods for Bundler.ui" do
- expect(Bundler.ui).to receive(:info)
- expect(Bundler.ui).to receive(:error)
- expect(Bundler.ui).to receive(:warn)
+ expect(Bundler.ui).not_to receive(:info)
+ expect(Bundler.ui).to receive(:error).exactly(3).times
+ expect(Bundler.ui).not_to receive(:warn)
Bundler::FriendlyErrors.request_issue_report_for(StandardError.new)
end
diff --git a/spec/bundler/bundler/gem_helper_spec.rb b/spec/bundler/bundler/gem_helper_spec.rb
index b91a2c26cc..48af7867b4 100644
--- a/spec/bundler/bundler/gem_helper_spec.rb
+++ b/spec/bundler/bundler/gem_helper_spec.rb
@@ -239,7 +239,7 @@ RSpec.describe Bundler::GemHelper do
before do
mock_build_message app_name, app_version
mock_confirm_message "Tagged v#{app_version}."
- mock_confirm_message "Pushed git commits and tags."
+ mock_confirm_message "Pushed git commits and release tag."
sys_exec("git push -u origin master", :dir => app_path)
end
@@ -262,7 +262,7 @@ RSpec.describe Bundler::GemHelper do
before do
Bundler::GemHelper.tag_prefix = "foo-"
mock_build_message app_name, app_version
- mock_confirm_message "Pushed git commits and tags."
+ mock_confirm_message "Pushed git commits and release tag."
sys_exec("git push -u origin master", :dir => app_path)
expect(subject).to receive(:rubygem_push).with(app_gem_path.to_s)
diff --git a/spec/bundler/bundler/source_list_spec.rb b/spec/bundler/bundler/source_list_spec.rb
index 93159998c6..3a0691b959 100644
--- a/spec/bundler/bundler/source_list_spec.rb
+++ b/spec/bundler/bundler/source_list_spec.rb
@@ -75,7 +75,7 @@ RSpec.describe Bundler::SourceList do
let(:msg) do
"The git source `git://existing-git.org/path.git` " \
"uses the `git` protocol, which transmits data without encryption. " \
- "Disable this warning with `bundle config set git.allow_insecure true`, " \
+ "Disable this warning with `bundle config set --local git.allow_insecure true`, " \
"or switch to the `https` protocol to keep your data secure."
end
diff --git a/spec/bundler/bundler/source_spec.rb b/spec/bundler/bundler/source_spec.rb
index 0c35c27fdf..af370bb45c 100644
--- a/spec/bundler/bundler/source_spec.rb
+++ b/spec/bundler/bundler/source_spec.rb
@@ -188,7 +188,7 @@ RSpec.describe Bundler::Source do
end
end
-private
+ private
def with_ui(ui)
old_ui = Bundler.ui
diff --git a/spec/bundler/cache/git_spec.rb b/spec/bundler/cache/git_spec.rb
index d481e00666..97d73907db 100644
--- a/spec/bundler/cache/git_spec.rb
+++ b/spec/bundler/cache/git_spec.rb
@@ -174,32 +174,6 @@ RSpec.describe "bundle cache with git" do
expect(the_bundle).to include_gems "has_submodule 1.0"
end
- it "displays warning message when detecting git repo in Gemfile", :bundler => "< 3" do
- build_git "foo"
-
- install_gemfile <<-G
- gem "foo", :git => '#{lib_path("foo-1.0")}'
- G
-
- bundle :cache
-
- expect(err).to include("Your Gemfile contains path and git dependencies.")
- end
-
- it "does not display warning message if cache_all is set in bundle config" do
- build_git "foo"
-
- install_gemfile <<-G
- gem "foo", :git => '#{lib_path("foo-1.0")}'
- G
-
- bundle "config set cache_all true"
- bundle :cache
- bundle :cache
-
- expect(err).not_to include("Your Gemfile contains path and git dependencies.")
- end
-
it "caches pre-evaluated gemspecs" do
git = build_git "foo"
diff --git a/spec/bundler/cache/path_spec.rb b/spec/bundler/cache/path_spec.rb
index 0c84d242b5..c81dda7405 100644
--- a/spec/bundler/cache/path_spec.rb
+++ b/spec/bundler/cache/path_spec.rb
@@ -91,7 +91,7 @@ RSpec.describe "bundle cache with path" do
expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
end
- it "raises a warning without --all", :bundler => "< 3" do
+ it "does not cache path gems by default", :bundler => "< 3" do
build_lib "foo"
install_gemfile <<-G
@@ -99,10 +99,22 @@ RSpec.describe "bundle cache with path" do
G
bundle :cache
- expect(err).to match(/please pass the \-\-all flag/)
+ expect(err).to be_empty
expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
end
+ it "caches path gems by default", :bundler => "3" do
+ build_lib "foo"
+
+ install_gemfile <<-G
+ gem "foo", :path => '#{lib_path("foo-1.0")}'
+ G
+
+ bundle :cache
+ expect(err).to be_empty
+ expect(bundled_app("vendor/cache/foo-1.0")).to exist
+ end
+
it "stores the given flag" do
build_lib "foo"
diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb
index 0ecdf230f9..bd8e7f16c7 100644
--- a/spec/bundler/commands/clean_spec.rb
+++ b/spec/bundler/commands/clean_spec.rb
@@ -625,6 +625,32 @@ RSpec.describe "bundle clean" do
expect(out).to eq("1.0")
end
+ it "when using --force, it doesn't remove default gem binaries" do
+ skip "does not work on ruby 3.0 because it changes the path to look for default gems, tsort is a default gem there, and we can't install it either like we do with fiddle because it doesn't yet exist" unless RUBY_VERSION < "3.0.0"
+
+ skip "does not work on rubygems versions where `--install_dir` doesn't respect --default" unless Gem::Installer.for_spec(loaded_gemspec, :install_dir => "/foo").default_spec_file == "/foo/specifications/default/bundler-#{Bundler::VERSION}.gemspec" # Since rubygems 3.2.0.rc.2
+
+ default_irb_version = ruby "gem 'irb', '< 999999'; require 'irb'; puts IRB::VERSION", :raise_on_error => false
+ skip "irb isn't a default gem" if default_irb_version.empty?
+
+ build_repo2 do
+ # simulate executable for default gem
+ build_gem "irb", default_irb_version, :to_system => true, :default => true do |s|
+ s.executables = "irb"
+ end
+ end
+
+ realworld_system_gems "fiddle"
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+ G
+
+ bundle "clean --force", :env => { "BUNDLER_GEM_DEFAULT_DIR" => system_gem_path.to_s }
+
+ expect(out).not_to include("Removing irb")
+ end
+
it "doesn't blow up on path gems without a .gemspec" do
relative_path = "vendor/private_gems/bar-1.0"
absolute_path = bundled_app(relative_path)
diff --git a/spec/bundler/commands/fund_spec.rb b/spec/bundler/commands/fund_spec.rb
new file mode 100644
index 0000000000..ee3aff3a29
--- /dev/null
+++ b/spec/bundler/commands/fund_spec.rb
@@ -0,0 +1,55 @@
+# frozen_string_literal: true
+
+RSpec.describe "bundle fund" do
+ it "prints fund information for all gems in the bundle" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'has_metadata'
+ gem 'has_funding'
+ gem 'rack-obama'
+ G
+
+ bundle "fund"
+
+ expect(out).to include("* has_metadata (1.0)\n Funding: https://example.com/has_metadata/funding")
+ expect(out).to include("* has_funding (1.2.3)\n Funding: https://example.com/has_funding/funding")
+ expect(out).to_not include("rack-obama")
+ end
+
+ it "does not consider fund information for gem dependencies" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'gem_with_dependent_funding'
+ G
+
+ bundle "fund"
+
+ expect(out).to_not include("* has_funding (1.2.3)\n Funding: https://example.com/has_funding/funding")
+ expect(out).to_not include("gem_with_dependent_funding")
+ end
+
+ it "prints message if none of the gems have fund information" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'rack-obama'
+ G
+
+ bundle "fund"
+
+ expect(out).to include("None of the installed gems you directly depend on are looking for funding.")
+ end
+
+ describe "with --group option" do
+ it "prints fund message for only specified group gems" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'has_metadata', :group => :development
+ gem 'has_funding'
+ G
+
+ bundle "fund --group development"
+ expect(out).to include("* has_metadata (1.0)\n Funding: https://example.com/has_metadata/funding")
+ expect(out).to_not include("* has_funding (1.2.3)\n Funding: https://example.com/has_funding/funding")
+ end
+ end
+end
diff --git a/spec/bundler/commands/help_spec.rb b/spec/bundler/commands/help_spec.rb
index 788c1b8d29..03d34ef692 100644
--- a/spec/bundler/commands/help_spec.rb
+++ b/spec/bundler/commands/help_spec.rb
@@ -1,25 +1,25 @@
# frozen_string_literal: true
RSpec.describe "bundle help" do
- it "uses mann when available" do
+ it "uses man when available" do
with_fake_man do
bundle "help gemfile"
end
expect(out).to eq(%(["#{root}/man/gemfile.5"]))
end
- it "prefixes bundle commands with bundle- when finding the groff files" do
+ it "prefixes bundle commands with bundle- when finding the man files" do
with_fake_man do
bundle "help install"
end
expect(out).to eq(%(["#{root}/man/bundle-install.1"]))
end
- it "simply outputs the txt file when there is no man on the path" do
+ it "simply outputs the human readable file when there is no man on the path" do
with_path_as("") do
bundle "help install"
end
- expect(out).to match(/BUNDLE-INSTALL/)
+ expect(out).to match(/bundle-install/)
end
it "still outputs the old help for commands that do not have man pages yet" do
diff --git a/spec/bundler/commands/info_spec.rb b/spec/bundler/commands/info_spec.rb
index 9286e6824a..eec9c773bc 100644
--- a/spec/bundler/commands/info_spec.rb
+++ b/spec/bundler/commands/info_spec.rb
@@ -66,6 +66,7 @@ RSpec.describe "bundle info" do
\tHomepage: http://example.com
\tDocumentation: https://www.example.info/gems/bestgemever/0.0.1
\tSource Code: https://example.com/user/bestgemever
+\tFunding: https://example.com/has_metadata/funding
\tWiki: https://example.com/user/bestgemever/wiki
\tChangelog: https://example.com/user/bestgemever/CHANGELOG.md
\tBug Tracker: https://example.com/user/bestgemever/issues
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb
index 98290bbc9e..d1b8585114 100644
--- a/spec/bundler/commands/install_spec.rb
+++ b/spec/bundler/commands/install_spec.rb
@@ -497,11 +497,21 @@ RSpec.describe "bundle install with gem sources" do
#{Bundler::VERSION}
L
end
+
+ it "does not crash when unlocking" do
+ gemfile <<-G
+ ruby '>= 2.1.0'
+ G
+
+ bundle "update"
+
+ expect(err).not_to include("Could not find gem 'Ruby")
+ end
end
end
describe "when Bundler root contains regex chars" do
- it "doesn't blow up" do
+ it "doesn't blow up when using the `gem` DSL" do
root_dir = tmp("foo[]bar")
FileUtils.mkdir_p(root_dir)
@@ -516,6 +526,22 @@ RSpec.describe "bundle install with gem sources" do
bundle :install, :dir => root_dir
end
+
+ it "doesn't blow up when using the `gemspec` DSL" do
+ root_dir = tmp("foo[]bar")
+
+ FileUtils.mkdir_p(root_dir)
+
+ build_lib "foo", :path => root_dir
+ gemfile = <<-G
+ gemspec
+ G
+ File.open("#{root_dir}/Gemfile", "w") do |file|
+ file.puts gemfile
+ end
+
+ bundle :install, :dir => root_dir
+ end
end
describe "when requesting a quiet install via --quiet" do
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index 70419f612d..beee2b0fdc 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -12,11 +12,12 @@ RSpec.describe "bundle gem" do
def bundle_exec_rubocop
prepare_gemspec(bundled_app(gem_name, "#{gem_name}.gemspec"))
- rubocop_version = RUBY_VERSION > "2.4" ? "0.85.1" : "0.80.1"
+ rubocop_version = RUBY_VERSION > "2.4" ? "0.90.0" : "0.80.1"
gems = ["minitest", "rake", "rake-compiler", "rspec", "rubocop -v #{rubocop_version}", "test-unit"]
+ gems += ["rubocop-ast -v 0.4.0"] if rubocop_version == "0.90.0"
path = Bundler.feature_flag.default_install_uses_path? ? local_gem_path(:base => bundled_app(gem_name)) : system_gem_path
realworld_system_gems gems, :path => path
- bundle "exec rubocop --config .rubocop.yml", :dir => bundled_app(gem_name)
+ bundle "exec rubocop --debug --config .rubocop.yml", :dir => bundled_app(gem_name)
end
let(:generated_gemspec) { Bundler.load_gemspec_uncached(bundled_app(gem_name).join("#{gem_name}.gemspec")) }
diff --git a/spec/bundler/commands/outdated_spec.rb b/spec/bundler/commands/outdated_spec.rb
index 2a07f1c784..1faee23f26 100644
--- a/spec/bundler/commands/outdated_spec.rb
+++ b/spec/bundler/commands/outdated_spec.rb
@@ -555,7 +555,7 @@ RSpec.describe "bundle outdated" do
end
end
- context "after bundle config set deployment true" do
+ context "after bundle config set --local deployment true" do
before do
install_gemfile <<-G
source "#{file_uri_for(gem_repo2)}"
@@ -563,7 +563,7 @@ RSpec.describe "bundle outdated" do
gem "rack"
gem "foo"
G
- bundle "config set deployment true"
+ bundle "config set --local deployment true"
end
it "outputs a helpful message about being in deployment mode" do
diff --git a/spec/bundler/install/deploy_spec.rb b/spec/bundler/install/deploy_spec.rb
index 357f4512f1..441daabe72 100644
--- a/spec/bundler/install/deploy_spec.rb
+++ b/spec/bundler/install/deploy_spec.rb
@@ -361,7 +361,10 @@ RSpec.describe "install in deployment or frozen mode" do
bundle "config --local deployment true"
bundle :install, :raise_on_error => false
expect(err).to include("deployment mode")
- expect(err).to include("You have deleted from the Gemfile:\n* source: #{lib_path("rack-1.0")} (at master@#{revision_for(lib_path("rack-1.0"))[0..6]}")
+ # The drive letter of the Windows environment is fragile value in GitHub Actions
+ unless Gem.win_platform?
+ expect(err).to include("You have deleted from the Gemfile:\n* source: #{lib_path("rack-1.0")} (at master@#{revision_for(lib_path("rack-1.0"))[0..6]}")
+ end
expect(err).not_to include("You have added to the Gemfile")
expect(err).not_to include("You have changed in the Gemfile")
end
@@ -385,7 +388,10 @@ RSpec.describe "install in deployment or frozen mode" do
bundle "config --local deployment true"
bundle :install, :raise_on_error => false
expect(err).to include("deployment mode")
- expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `#{lib_path("rack")} (at master@#{revision_for(lib_path("rack"))[0..6]})`")
+ # The drive letter of the Windows environment is fragile value in GitHub Actions
+ unless Gem.win_platform?
+ expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `#{lib_path("rack")} (at master@#{revision_for(lib_path("rack"))[0..6]})`")
+ end
expect(err).not_to include("You have added to the Gemfile")
expect(err).not_to include("You have deleted from the Gemfile")
end
diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb
index c0e2510acd..a70fb18c45 100644
--- a/spec/bundler/install/gemfile/git_spec.rb
+++ b/spec/bundler/install/gemfile/git_spec.rb
@@ -864,6 +864,24 @@ RSpec.describe "bundle install with git sources" do
expect(the_bundle).to include_gems "has_submodule 1.0"
end
+ it "does not warn when deiniting submodules" do
+ build_git "submodule", "1.0"
+ build_git "has_submodule", "1.0"
+
+ sys_exec "git submodule add #{lib_path("submodule-1.0")} submodule-1.0", :dir => lib_path("has_submodule-1.0")
+ sys_exec "git commit -m \"submodulator\"", :dir => lib_path("has_submodule-1.0")
+
+ install_gemfile <<-G
+ git "#{lib_path("has_submodule-1.0")}" do
+ gem "has_submodule"
+ end
+ G
+ expect(err).to be_empty
+
+ expect(the_bundle).to include_gems "has_submodule 1.0"
+ expect(the_bundle).to_not include_gems "submodule 1.0"
+ end
+
it "handles implicit updates when modifying the source info" do
git = build_git "foo"
diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb
index dd58aef29b..41b95481cb 100644
--- a/spec/bundler/install/gemfile/platform_spec.rb
+++ b/spec/bundler/install/gemfile/platform_spec.rb
@@ -50,6 +50,31 @@ RSpec.describe "bundle install across platforms" do
expect(the_bundle).to include_gems "platform_specific 1.0 JAVA"
end
+ it "pulls the pure ruby version on jruby if the java platform is not present in the lockfile and bundler is run in frozen mode", :jruby do
+ lockfile <<-G
+ GEM
+ remote: #{file_uri_for(gem_repo1)}
+ specs:
+ platform_specific (1.0)
+
+ PLATFORMS
+ ruby
+
+ DEPENDENCIES
+ platform_specific
+ G
+
+ bundle "config set --local frozen true"
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+
+ gem "platform_specific"
+ G
+
+ expect(the_bundle).to include_gems "platform_specific 1.0 RUBY"
+ end
+
it "works with gems that have different dependencies" do
simulate_platform "java"
install_gemfile <<-G
@@ -250,12 +275,41 @@ RSpec.describe "bundle install across platforms" do
expect(err).to include "Unable to use the platform-specific (universal-darwin) version of facter (2.4.6) " \
"because it has different dependencies from the ruby version. " \
- "To use the platform-specific version of the gem, run `bundle config set specific_platform true` and install again."
+ "To use the platform-specific version of the gem, run `bundle config set --local specific_platform true` and install again."
expect(the_bundle).to include_gem "facter 2.4.6"
expect(the_bundle).not_to include_gem "CFPropertyList"
end
+ it "works with gems with platform-specific dependency having different requirements order" do
+ simulate_platform x64_mac
+
+ update_repo2 do
+ build_gem "fspath", "3"
+ build_gem "image_optim_pack", "1.2.3" do |s|
+ s.add_runtime_dependency "fspath", ">= 2.1", "< 4"
+ end
+ build_gem "image_optim_pack", "1.2.3" do |s|
+ s.platform = "universal-darwin"
+ s.add_runtime_dependency "fspath", "< 4", ">= 2.1"
+ end
+ end
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+ G
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+
+ gem "image_optim_pack"
+ G
+
+ expect(err).not_to include "Unable to use the platform-specific"
+
+ expect(the_bundle).to include_gem "image_optim_pack 1.2.3 universal-darwin"
+ end
+
it "fetches gems again after changing the version of Ruby" do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb
index 6e5177c60d..5ef3f38fe7 100644
--- a/spec/bundler/install/gems/compact_index_spec.rb
+++ b/spec/bundler/install/gems/compact_index_spec.rb
@@ -690,7 +690,7 @@ The checksum of /versions does not match the checksum provided by the server! So
it "shows instructions if auth is not provided for the source" do
bundle :install, :artifice => "compact_index_strict_basic_authentication", :raise_on_error => false
- expect(err).to include("bundle config set #{source_hostname} username:password")
+ expect(err).to include("bundle config set --global #{source_hostname} username:password")
end
it "fails if authentication has already been provided, but failed" do
@@ -878,7 +878,7 @@ The checksum of /versions does not match the checksum provided by the server! So
and include("1. delete the downloaded gem located at: `#{default_bundle_path}/gems/rack-1.0.0/rack-1.0.0.gem`").
and include("2. run `bundle install`").
and include("If you wish to continue installing the downloaded gem, and are certain it does not pose a security issue despite the mismatching checksum, do the following:").
- and include("1. run `bundle config set disable_checksum_validation true` to turn off checksum verification").
+ and include("1. run `bundle config set --local disable_checksum_validation true` to turn off checksum verification").
and include("2. run `bundle install`").
and match(/\(More info: The expected SHA256 checksum was "#{"ab" * 22}", but the checksum for the downloaded gem was ".+?"\.\)/)
end
diff --git a/spec/bundler/install/gems/dependency_api_spec.rb b/spec/bundler/install/gems/dependency_api_spec.rb
index 765b5e5195..e92669e97c 100644
--- a/spec/bundler/install/gems/dependency_api_spec.rb
+++ b/spec/bundler/install/gems/dependency_api_spec.rb
@@ -664,7 +664,7 @@ RSpec.describe "gemcutter's dependency API" do
it "shows instructions if auth is not provided for the source" do
bundle :install, :artifice => "endpoint_strict_basic_authentication", :raise_on_error => false
- expect(err).to include("bundle config set #{source_hostname} username:password")
+ expect(err).to include("bundle config set --global #{source_hostname} username:password")
end
it "fails if authentication has already been provided, but failed" do
diff --git a/spec/bundler/install/gems/fund_spec.rb b/spec/bundler/install/gems/fund_spec.rb
new file mode 100644
index 0000000000..57e7c3aed3
--- /dev/null
+++ b/spec/bundler/install/gems/fund_spec.rb
@@ -0,0 +1,110 @@
+# frozen_string_literal: true
+
+RSpec.describe "bundle install" do
+ context "with gem sources" do
+ context "when gems include a fund URI" do
+ it "displays the plural fund message after installing" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'has_metadata'
+ gem 'has_funding'
+ gem 'rack-obama'
+ G
+
+ expect(out).to include("2 installed gems you directly depend on are looking for funding.")
+ end
+
+ it "displays the singular fund message after installing" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'has_funding'
+ gem 'rack-obama'
+ G
+
+ expect(out).to include("1 installed gem you directly depend on is looking for funding.")
+ end
+ end
+
+ context "when gems do not include fund messages" do
+ it "does not display any fund messages" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "activesupport"
+ G
+
+ expect(out).not_to include("gem you depend on")
+ end
+ end
+
+ context "when a dependency includes a fund message" do
+ it "does not display the fund message" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'gem_with_dependent_funding'
+ G
+
+ expect(out).not_to include("gem you depend on")
+ end
+ end
+ end
+
+ context "with git sources" do
+ context "when gems include fund URI" do
+ it "displays the fund message after installing" do
+ build_git "also_has_funding" do |s|
+ s.metadata = {
+ "funding_uri" => "https://example.com/also_has_funding/funding",
+ }
+ end
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'also_has_funding', :git => '#{lib_path("also_has_funding-1.0")}'
+ G
+
+ expect(out).to include("1 installed gem you directly depend on is looking for funding.")
+ end
+
+ it "displays the fund message if repo is updated" do
+ build_git "also_has_funding" do |s|
+ s.metadata = {
+ "funding_uri" => "https://example.com/also_has_funding/funding",
+ }
+ end
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'also_has_funding', :git => '#{lib_path("also_has_funding-1.0")}'
+ G
+
+ build_git "also_has_funding", "1.1" do |s|
+ s.metadata = {
+ "funding_uri" => "https://example.com/also_has_funding/funding",
+ }
+ end
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'also_has_funding', :git => '#{lib_path("also_has_funding-1.1")}'
+ G
+
+ expect(out).to include("1 installed gem you directly depend on is looking for funding.")
+ end
+
+ it "displays the fund message if repo is not updated" do
+ build_git "also_has_funding" do |s|
+ s.metadata = {
+ "funding_uri" => "https://example.com/also_has_funding/funding",
+ }
+ end
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'also_has_funding', :git => '#{lib_path("also_has_funding-1.0")}'
+ G
+
+ bundle :install
+ expect(out).to include("1 installed gem you directly depend on is looking for funding.")
+
+ bundle :install
+ expect(out).to include("1 installed gem you directly depend on is looking for funding.")
+ end
+ end
+ end
+end
diff --git a/spec/bundler/install/gems/resolving_spec.rb b/spec/bundler/install/gems/resolving_spec.rb
index f72220ef21..f621b01366 100644
--- a/spec/bundler/install/gems/resolving_spec.rb
+++ b/spec/bundler/install/gems/resolving_spec.rb
@@ -107,10 +107,13 @@ RSpec.describe "bundle install with install-time dependencies" do
bundle :install, :env => { "DEBUG_RESOLVER_TREE" => "1" }
+ activated_groups = "net_b (1.0) (ruby)"
+ activated_groups += ", net_b (1.0) (#{local_platforms.join(", ")})" if local_platforms.any? && local_platforms != ["ruby"]
+
expect(err).to include(" net_b").
and include("BUNDLER: Starting resolution").
and include("BUNDLER: Finished resolution").
- and include("Attempting to activate")
+ and include("Attempting to activate [#{activated_groups}]")
end
end
end
@@ -233,7 +236,7 @@ RSpec.describe "bundle install with install-time dependencies" do
describe "with a < requirement" do
let(:ruby_requirement) { %("< 5000") }
- let(:error_message_requirement) { Gem::Requirement.new(["< 5000", "= #{Bundler::RubyVersion.system.to_gem_version_with_patchlevel}"]).to_s }
+ let(:error_message_requirement) { "< 5000" }
it_behaves_like "ruby version conflicts"
end
@@ -241,7 +244,7 @@ RSpec.describe "bundle install with install-time dependencies" do
describe "with a compound requirement" do
let(:reqs) { ["> 0.1", "< 5000"] }
let(:ruby_requirement) { reqs.map(&:dump).join(", ") }
- let(:error_message_requirement) { Gem::Requirement.new(reqs + ["= #{Bundler::RubyVersion.system.to_gem_version_with_patchlevel}"]).to_s }
+ let(:error_message_requirement) { Gem::Requirement.new(reqs).to_s }
it_behaves_like "ruby version conflicts"
end
diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb
index 503cc4a4f0..02452f1ef6 100644
--- a/spec/bundler/install/gems/standalone_spec.rb
+++ b/spec/bundler/install/gems/standalone_spec.rb
@@ -81,8 +81,8 @@ RSpec.shared_examples "bundle install --standalone" do
it "generates a bundle/bundler/setup.rb with the proper paths" do
expected_path = bundled_app("bundle/bundler/setup.rb")
extension_line = File.read(expected_path).each_line.find {|line| line.include? "/extensions/" }.strip
- expect(extension_line).to start_with '$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/'
- expect(extension_line).to end_with '/very_simple_binary-1.0"'
+ expect(extension_line).to start_with '$:.unshift File.expand_path("#{path}/../#{ruby_engine}/#{ruby_version}/extensions/'
+ expect(extension_line).to end_with '/very_simple_binary-1.0")'
end
end
diff --git a/spec/bundler/install/path_spec.rb b/spec/bundler/install/path_spec.rb
index 2239706020..a05467db12 100644
--- a/spec/bundler/install/path_spec.rb
+++ b/spec/bundler/install/path_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.describe "bundle install" do
- describe "with --path" do
+ describe "with path configured" do
before :each do
build_gem "rack", "1.0.0", :to_system => true do |s|
s.write "lib/rack.rb", "puts 'FAIL'"
@@ -13,12 +13,20 @@ RSpec.describe "bundle install" do
G
end
- it "does not use available system gems with bundle --path vendor/bundle", :bundler => "< 3" do
+ it "does not use available system gems with `vendor/bundle" do
bundle "config --local path vendor/bundle"
bundle :install
expect(the_bundle).to include_gems "rack 1.0.0"
end
+ it "uses system gems with `path.system` configured with more priority than `path`" do
+ bundle "config --local path.system true"
+ bundle "config --global path vendor/bundle"
+ bundle :install
+ run "require 'rack'", :raise_on_error => false
+ expect(out).to include("FAIL")
+ end
+
it "handles paths with regex characters in them" do
dir = bundled_app("bun++dle")
dir.mkpath
@@ -30,7 +38,7 @@ RSpec.describe "bundle install" do
dir.rmtree
end
- it "prints a warning to let the user know what has happened with bundle --path vendor/bundle" do
+ it "prints a message to let the user know where gems where installed" do
bundle "config --local path vendor/bundle"
bundle :install
expect(out).to include("gems are installed into `./vendor/bundle`")
diff --git a/spec/bundler/lock/lockfile_spec.rb b/spec/bundler/lock/lockfile_spec.rb
index 6eaa6f05cf..d26dc789cc 100644
--- a/spec/bundler/lock/lockfile_spec.rb
+++ b/spec/bundler/lock/lockfile_spec.rb
@@ -1476,7 +1476,7 @@ RSpec.describe "the lockfile format" do
expect(err).to match(/git checkout HEAD -- Gemfile.lock/i)
end
-private
+ private
def prerelease?(version)
Gem::Version.new(version).prerelease?
diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb
index 2ca6717827..d061ca7064 100644
--- a/spec/bundler/other/major_deprecation_spec.rb
+++ b/spec/bundler/other/major_deprecation_spec.rb
@@ -113,7 +113,7 @@ RSpec.describe "major deprecations" do
expect(deprecations).to include(
"The `--path` flag is deprecated because it relies on being " \
"remembered across bundler invocations, which bundler will no " \
- "longer do in future versions. Instead please use `bundle config set " \
+ "longer do in future versions. Instead please use `bundle config set --local " \
"path 'vendor/bundle'`, and stop using this flag"
)
end
@@ -135,7 +135,7 @@ RSpec.describe "major deprecations" do
expect(deprecations).to include(
"The `--path` flag is deprecated because it relies on being " \
"remembered across bundler invocations, which bundler will no " \
- "longer do in future versions. Instead please use `bundle config set " \
+ "longer do in future versions. Instead please use `bundle config set --local " \
"path 'vendor/bundle'`, and stop using this flag"
)
end
@@ -143,6 +143,28 @@ RSpec.describe "major deprecations" do
pending "should fail with a helpful error", :bundler => "3"
end
+ context "bundle cache --all" do
+ before do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "rack"
+ G
+
+ bundle "cache --all", :raise_on_error => false
+ end
+
+ it "should print a deprecation warning", :bundler => "2" do
+ expect(deprecations).to include(
+ "The `--all` flag is deprecated because it relies on being " \
+ "remembered across bundler invocations, which bundler will no " \
+ "longer do in future versions. Instead please use `bundle config set " \
+ "cache_all true`, and stop using this flag"
+ )
+ end
+
+ pending "should fail with a helpful error", :bundler => "3"
+ end
+
describe "bundle config" do
describe "old list interface" do
before do
@@ -271,7 +293,7 @@ RSpec.describe "major deprecations" do
end
it "should output a deprecation warning", :bundler => "2" do
- expect(deprecations).to include("The --binstubs option will be removed in favor of `bundle binstubs`")
+ expect(deprecations).to include("The --binstubs option will be removed in favor of `bundle binstubs --all`")
end
pending "fails with a helpful error", :bundler => "3"
@@ -339,7 +361,7 @@ RSpec.describe "major deprecations" do
"The `#{flag_name}` flag is deprecated because it relies on " \
"being remembered across bundler invocations, which bundler " \
"will no longer do in future versions. Instead please use " \
- "`bundle config set #{option_name} '#{value}'`, and stop using this flag"
+ "`bundle config set --local #{option_name} '#{value}'`, and stop using this flag"
)
end
@@ -362,7 +384,7 @@ RSpec.describe "major deprecations" do
"Using `source` more than once without a block is a security risk, and " \
"may result in installing unexpected gems. To resolve this warning, use " \
"a block to indicate which gems should come from the secondary source. " \
- "To upgrade this warning to an error, run `bundle config set " \
+ "To upgrade this warning to an error, run `bundle config set --local " \
"disable_multisource true`."
)
end
diff --git a/spec/bundler/plugins/command_spec.rb b/spec/bundler/plugins/command_spec.rb
index 4728f66f5f..4567a39081 100644
--- a/spec/bundler/plugins/command_spec.rb
+++ b/spec/bundler/plugins/command_spec.rb
@@ -73,7 +73,7 @@ RSpec.describe "command plugins" do
expect(out).not_to include("Installed plugin copycat")
- expect(err).to include("Failed to install plugin")
+ expect(err).to include("Failed to install the following plugins: `copycat`")
expect(err).to include("Command(s) `mahcommand` declared by copycat are already registered.")
end
diff --git a/spec/bundler/plugins/install_spec.rb b/spec/bundler/plugins/install_spec.rb
index ac5a28891b..a91175c616 100644
--- a/spec/bundler/plugins/install_spec.rb
+++ b/spec/bundler/plugins/install_spec.rb
@@ -98,7 +98,7 @@ RSpec.describe "bundler plugin install" do
bundle "plugin install charlie --source #{file_uri_for(gem_repo2)}"
- expect(err).to include("plugins.rb was not found")
+ expect(err).to include("Failed to install the following plugins: `charlie`. The underlying error was: plugins.rb was not found")
expect(global_plugin_gem("charlie-1.0")).not_to be_directory
diff --git a/spec/bundler/quality_spec.rb b/spec/bundler/quality_spec.rb
index d57098be47..b0647b7663 100644
--- a/spec/bundler/quality_spec.rb
+++ b/spec/bundler/quality_spec.rb
@@ -105,7 +105,7 @@ RSpec.describe "The library itself" do
end
it "has no malformed whitespace" do
- exempt = /\.gitmodules|fixtures|vendor|LICENSE|vcr_cassettes|rbreadline\.diff|\.txt$/
+ exempt = /\.gitmodules|fixtures|vendor|LICENSE|vcr_cassettes|rbreadline\.diff|index\.txt$/
error_messages = []
tracked_files.each do |filename|
next if filename =~ exempt
@@ -126,7 +126,7 @@ RSpec.describe "The library itself" do
end
it "does not include any leftover debugging or development mechanisms" do
- exempt = %r{quality_spec.rb|support/helpers|vcr_cassettes|\.md|\.ronn|\.txt|\.5|\.1}
+ exempt = %r{quality_spec.rb|support/helpers|vcr_cassettes|\.md|\.ronn|index\.txt|\.5|\.1}
error_messages = []
tracked_files.each do |filename|
next if filename =~ exempt
@@ -190,7 +190,7 @@ RSpec.describe "The library itself" do
line.scan(/Bundler\.settings\[:#{key_pattern}\]/).flatten.each {|s| all_settings[s] << "referenced at `#{filename}:#{number.succ}`" }
end
end
- documented_settings = File.read("man/bundle-config.ronn")[/LIST OF AVAILABLE KEYS.*/m].scan(/^\* `#{key_pattern}`/).flatten
+ documented_settings = File.read("man/bundle-config.1.ronn")[/LIST OF AVAILABLE KEYS.*/m].scan(/^\* `#{key_pattern}`/).flatten
documented_settings.each do |s|
all_settings.delete(s)
@@ -261,7 +261,7 @@ RSpec.describe "The library itself" do
expect(all_bad_requires).to be_empty, "#{all_bad_requires.size} internal requires that should use `require_relative`: #{all_bad_requires}"
end
-private
+ private
def each_line(filename, &block)
File.readlines(filename, :encoding => "UTF-8").each_with_index(&block)
diff --git a/spec/bundler/realworld/fixtures/warbler/Gemfile.lock b/spec/bundler/realworld/fixtures/warbler/Gemfile.lock
index a524f6ef30..bcf0799494 100644
--- a/spec/bundler/realworld/fixtures/warbler/Gemfile.lock
+++ b/spec/bundler/realworld/fixtures/warbler/Gemfile.lock
@@ -6,7 +6,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- jruby-jars (9.2.9.0)
+ jruby-jars (9.2.11.1)
jruby-rack (1.1.21)
rake (13.0.1)
rubyzip (1.3.0)
@@ -26,4 +26,4 @@ DEPENDENCIES
warbler (~> 2.0)
BUNDLED WITH
- 2.2.0.rc.1
+ 2.2.0.rc.2
diff --git a/spec/bundler/realworld/gemfile_source_header_spec.rb b/spec/bundler/realworld/gemfile_source_header_spec.rb
index 3f507b056a..ada2fc92ee 100644
--- a/spec/bundler/realworld/gemfile_source_header_spec.rb
+++ b/spec/bundler/realworld/gemfile_source_header_spec.rb
@@ -30,7 +30,7 @@ RSpec.describe "fetching dependencies with a mirrored source", :realworld => tru
expect(the_bundle).to include_gems "weakling 0.0.3"
end
-private
+ private
def setup_server
require_rack
diff --git a/spec/bundler/runtime/gem_tasks_spec.rb b/spec/bundler/runtime/gem_tasks_spec.rb
index b2f9ae725e..b0ef0cc144 100644
--- a/spec/bundler/runtime/gem_tasks_spec.rb
+++ b/spec/bundler/runtime/gem_tasks_spec.rb
@@ -67,6 +67,18 @@ RSpec.describe "require 'bundler/gem_tasks'" do
end
end
+ context "rake build when path has brackets", :ruby_repo do
+ before do
+ bracketed_bundled_app = tmp.join("bundled[app")
+ FileUtils.cp_r bundled_app, bracketed_bundled_app
+ bundle "exec rake build", :dir => bracketed_bundled_app
+ end
+
+ it "still runs successfully" do
+ expect(err).to be_empty
+ end
+ end
+
context "bundle path configured locally" do
before do
bundle "config set path vendor/bundle"
diff --git a/spec/bundler/runtime/inline_spec.rb b/spec/bundler/runtime/inline_spec.rb
index 86ac3f4bb6..1ba50c0e97 100644
--- a/spec/bundler/runtime/inline_spec.rb
+++ b/spec/bundler/runtime/inline_spec.rb
@@ -339,4 +339,34 @@ RSpec.describe "bundler/inline#gemfile" do
expect(last_command).to be_success
expect(out).to include("BUNDLE_GEMFILE is empty")
end
+
+ it "does not error out if library requires optional dependencies" do
+ Dir.mkdir tmp("path_without_gemfile")
+
+ foo_code = <<~RUBY
+ begin
+ gem "bar"
+ rescue LoadError
+ end
+
+ puts "WIN"
+ RUBY
+
+ build_lib "foo", "1.0.0" do |s|
+ s.write "lib/foo.rb", foo_code
+ end
+
+ script <<-RUBY, :dir => tmp("path_without_gemfile")
+ gemfile do
+ path "#{lib_path}" do
+ gem "foo", require: false
+ end
+ end
+
+ require "foo"
+ RUBY
+
+ expect(out).to eq("WIN")
+ expect(err).to be_empty
+ end
end
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb
index 22c07f0be0..ffa909e269 100644
--- a/spec/bundler/runtime/setup_spec.rb
+++ b/spec/bundler/runtime/setup_spec.rb
@@ -623,6 +623,26 @@ RSpec.describe "Bundler.setup" do
expect(the_bundle).to include_gems "activesupport 2.3.2"
end
+ it "remembers --without and does not bail on bare Bundler.setup, even in the case of path gems no longer available" do
+ bundle "config --local without development"
+
+ path = bundled_app(File.join("vendor", "foo"))
+ build_lib "foo", :path => path
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "activesupport", "2.3.2"
+ gem 'foo', :path => 'vendor/foo', :group => :development
+ G
+
+ FileUtils.rm_rf(path)
+
+ ruby "require 'bundler'; Bundler.setup", :env => { "DEBUG" => "1" }
+ expect(out).to include("Assuming that source at `vendor/foo` has not changed since fetching its specs errored")
+ expect(out).to include("Found no changes, using resolution from the lockfile")
+ expect(err).to be_empty
+ end
+
it "remembers --without and does not include groups passed to Bundler.setup" do
bundle "config --local without rails"
install_gemfile <<-G
diff --git a/spec/bundler/runtime/with_unbundled_env_spec.rb b/spec/bundler/runtime/with_unbundled_env_spec.rb
index 67a25f6ff2..03de830ea0 100644
--- a/spec/bundler/runtime/with_unbundled_env_spec.rb
+++ b/spec/bundler/runtime/with_unbundled_env_spec.rb
@@ -84,11 +84,23 @@ RSpec.describe "Bundler.with_env helpers" do
expect(last_command.stdboth).to include "false"
end
- it "should remove '-rbundler/setup' from RUBYOPT" do
+ it "should remove absolute path to 'bundler/setup' from RUBYOPT even if it was present in original env" do
create_file("source.rb", <<-RUBY)
print #{modified_env}['RUBYOPT']
RUBY
- ENV["RUBYOPT"] = "-W2 -rbundler/setup #{ENV["RUBYOPT"]}"
+ setup_require = "-r#{lib_dir}/bundler/setup"
+ ENV["BUNDLER_ORIG_RUBYOPT"] = "-W2 #{setup_require} #{ENV["RUBYOPT"]}"
+ simulate_bundler_version_when_missing_prerelease_default_gem_activation do
+ bundle_exec_ruby bundled_app("source.rb")
+ end
+ expect(last_command.stdboth).not_to include(setup_require)
+ end
+
+ it "should remove relative path to 'bundler/setup' from RUBYOPT even if it was present in original env" do
+ create_file("source.rb", <<-RUBY)
+ print #{modified_env}['RUBYOPT']
+ RUBY
+ ENV["BUNDLER_ORIG_RUBYOPT"] = "-W2 -rbundler/setup #{ENV["RUBYOPT"]}"
simulate_bundler_version_when_missing_prerelease_default_gem_activation do
bundle_exec_ruby bundled_app("source.rb")
end
diff --git a/spec/bundler/spec_helper.rb b/spec/bundler/spec_helper.rb
index 7ed5bda8e6..a259100b2a 100644
--- a/spec/bundler/spec_helper.rb
+++ b/spec/bundler/spec_helper.rb
@@ -15,6 +15,7 @@ require "rspec/expectations"
require "rspec/mocks"
require_relative "support/builders"
+require_relative "support/build_metadata"
require_relative "support/filters"
require_relative "support/helpers"
require_relative "support/indexes"
diff --git a/spec/bundler/support/build_metadata.rb b/spec/bundler/support/build_metadata.rb
new file mode 100644
index 0000000000..98d8ac23c8
--- /dev/null
+++ b/spec/bundler/support/build_metadata.rb
@@ -0,0 +1,49 @@
+# frozen_string_literal: true
+
+require_relative "path"
+require_relative "helpers"
+
+module Spec
+ module BuildMetadata
+ include Spec::Path
+ include Spec::Helpers
+
+ def write_build_metadata(dir: source_root)
+ build_metadata = {
+ :git_commit_sha => git_commit_sha,
+ :built_at => loaded_gemspec.date.utc.strftime("%Y-%m-%d"),
+ :release => true,
+ }
+
+ replace_build_metadata(build_metadata, dir: dir) # rubocop:disable Style/HashSyntax
+ end
+
+ def reset_build_metadata(dir: source_root)
+ build_metadata = {
+ :release => false,
+ }
+
+ replace_build_metadata(build_metadata, dir: dir) # rubocop:disable Style/HashSyntax
+ end
+
+ private
+
+ def replace_build_metadata(build_metadata, dir:)
+ build_metadata_file = File.expand_path("lib/bundler/build_metadata.rb", dir)
+
+ ivars = build_metadata.sort.map do |k, v|
+ " @#{k} = #{loaded_gemspec.send(:ruby_code, v)}"
+ end.join("\n")
+
+ contents = File.read(build_metadata_file)
+ contents.sub!(/^(\s+# begin ivars).+(^\s+# end ivars)/m, "\\1\n#{ivars}\n\\2")
+ File.open(build_metadata_file, "w") {|f| f << contents }
+ end
+
+ def git_commit_sha
+ ruby_core_tarball? ? "unknown" : sys_exec("git rev-parse --short HEAD", :dir => source_root).strip
+ end
+
+ extend self
+ end
+end
diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb
index 65f30d1f38..a1770759a9 100644
--- a/spec/bundler/support/builders.rb
+++ b/spec/bundler/support/builders.rb
@@ -322,10 +322,21 @@ module Spec
"documentation_uri" => "https://www.example.info/gems/bestgemever/0.0.1",
"homepage_uri" => "https://bestgemever.example.io",
"mailing_list_uri" => "https://groups.example.com/bestgemever",
+ "funding_uri" => "https://example.com/has_metadata/funding",
"source_code_uri" => "https://example.com/user/bestgemever",
"wiki_uri" => "https://example.com/user/bestgemever/wiki",
}
end
+
+ build_gem "has_funding", "1.2.3" do |s|
+ s.metadata = {
+ "funding_uri" => "https://example.com/has_funding/funding",
+ }
+ end
+
+ build_gem "gem_with_dependent_funding", "1.0" do |s|
+ s.add_dependency "has_funding"
+ end
end
end
@@ -461,7 +472,7 @@ module Spec
build_with(PluginBuilder, name, args, &blk)
end
- private
+ private
def build_with(builder, name, args, &blk)
@_build_path ||= nil
@@ -758,7 +769,7 @@ module Spec
gem_path = File.expand_path("#{@spec.full_name}.gem", lib_path)
if opts[:to_system]
- @context.system_gems gem_path
+ @context.system_gems gem_path, :default => opts[:default]
elsif opts[:to_bundle]
@context.system_gems gem_path, :path => @context.default_bundle_path
else
diff --git a/spec/bundler/support/filters.rb b/spec/bundler/support/filters.rb
index 6322efda8b..b1978e44e6 100644
--- a/spec/bundler/support/filters.rb
+++ b/spec/bundler/support/filters.rb
@@ -26,7 +26,6 @@ RSpec.configure do |config|
git_version = Bundler::Source::Git::GitProxy.new(nil, nil, nil).version
- config.filter_run_excluding :rubygems => RequirementChecker.against(Gem::VERSION)
config.filter_run_excluding :git => RequirementChecker.against(git_version)
config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0])
config.filter_run_excluding :ruby_repo => !ENV["GEM_COMMAND"].nil?
diff --git a/spec/bundler/support/hax.rb b/spec/bundler/support/hax.rb
index 7529dc460a..fc8e0ad55d 100644
--- a/spec/bundler/support/hax.rb
+++ b/spec/bundler/support/hax.rb
@@ -9,6 +9,8 @@ module Gem
Gem.ruby = ENV["RUBY"]
end
+ @default_dir = ENV["BUNDLER_GEM_DEFAULT_DIR"] if ENV["BUNDLER_GEM_DEFAULT_DIR"]
+
if ENV["BUNDLER_SPEC_PLATFORM"]
class Platform
@local = new(ENV["BUNDLER_SPEC_PLATFORM"])
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index b5648b84a8..c4018eb818 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -290,26 +290,30 @@ module Spec
gems = gems.flatten
options = gems.last.is_a?(Hash) ? gems.pop : {}
path = options.fetch(:path, system_gem_path)
+ default = options.fetch(:default, false)
with_gem_path_as(path) do
gem_repo = options.fetch(:gem_repo, gem_repo1)
gems.each do |g|
gem_name = g.to_s
if gem_name.start_with?("bundler")
version = gem_name.match(/\Abundler-(?<version>.*)\z/)[:version] if gem_name != "bundler"
- with_built_bundler(version) {|gem_path| install_gem(gem_path) }
+ with_built_bundler(version) {|gem_path| install_gem(gem_path, default) }
elsif gem_name =~ %r{\A(?:[a-zA-Z]:)?/.*\.gem\z}
- install_gem(gem_name)
+ install_gem(gem_name, default)
else
- install_gem("#{gem_repo}/gems/#{gem_name}.gem")
+ install_gem("#{gem_repo}/gems/#{gem_name}.gem", default)
end
end
end
end
- def install_gem(path)
+ def install_gem(path, default = false)
raise "OMG `#{path}` does not exist!" unless File.exist?(path)
- gem_command "install --no-document --ignore-dependencies '#{path}'"
+ args = "--no-document --ignore-dependencies"
+ args += " --default --install-dir #{system_gem_path}" if default
+
+ gem_command "install #{args} '#{path}'"
end
def with_built_bundler(version = nil)
@@ -330,12 +334,7 @@ module Spec
replace_version_file(version, dir: build_path) # rubocop:disable Style/HashSyntax
- build_metadata = {
- :built_at => loaded_gemspec.date.utc.strftime("%Y-%m-%d"),
- :git_commit_sha => git_commit_sha,
- }
-
- replace_build_metadata(build_metadata, dir: build_path) # rubocop:disable Style/HashSyntax
+ Spec::BuildMetadata.write_build_metadata(dir: build_path) # rubocop:disable Style/HashSyntax
gem_command "build #{relative_gemspec}", :dir => build_path
@@ -570,7 +569,7 @@ module Spec
port
end
- private
+ private
def git_root_dir?
root.to_s == `git rev-parse --show-toplevel`.chomp
diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb
index 042aae92fd..305ea0a876 100644
--- a/spec/bundler/support/path.rb
+++ b/spec/bundler/support/path.rb
@@ -34,7 +34,7 @@ module Spec
end
def dev_gemfile
- @dev_gemfile ||= source_root.join("dev_gems.rb")
+ @dev_gemfile ||= git_root.join("dev_gems.rb")
end
def bindir
@@ -208,18 +208,6 @@ module Spec
File.open(version_file, "w") {|f| f << contents }
end
- def replace_build_metadata(build_metadata, dir: source_root)
- build_metadata_file = File.expand_path("lib/bundler/build_metadata.rb", dir)
-
- ivars = build_metadata.sort.map do |k, v|
- " @#{k} = #{loaded_gemspec.send(:ruby_code, v)}"
- end.join("\n")
-
- contents = File.read(build_metadata_file)
- contents.sub!(/^(\s+# begin ivars).+(^\s+# end ivars)/m, "\\1\n#{ivars}\n\\2")
- File.open(build_metadata_file, "w") {|f| f << contents }
- end
-
def ruby_core?
# avoid to warnings
@ruby_core ||= nil
@@ -231,11 +219,7 @@ module Spec
end
end
- def git_commit_sha
- ruby_core_tarball? ? "unknown" : sys_exec("git rev-parse --short HEAD", :dir => source_root).strip
- end
-
- private
+ private
def git_ls_files(glob)
skip "Not running on a git context, since running tests from a tarball" if ruby_core_tarball?
diff --git a/spec/bundler/support/rubygems_ext.rb b/spec/bundler/support/rubygems_ext.rb
index d13567d7af..d743a76391 100644
--- a/spec/bundler/support/rubygems_ext.rb
+++ b/spec/bundler/support/rubygems_ext.rb
@@ -71,7 +71,7 @@ module Spec
install_gems(test_gemfile, test_lockfile)
end
- private
+ private
# Some rubygems versions include loaded specs when loading gemspec stubs
# from the file system. In this situation, that makes bundler incorrectly
diff --git a/spec/bundler/support/rubygems_version_manager.rb b/spec/bundler/support/rubygems_version_manager.rb
index 66dcdc7ad3..ac02021cff 100644
--- a/spec/bundler/support/rubygems_version_manager.rb
+++ b/spec/bundler/support/rubygems_version_manager.rb
@@ -51,7 +51,7 @@ class RubygemsVersionManager
end
end
-private
+ private
def use_system?
@source.nil?
diff --git a/spec/bundler/update/gems/fund_spec.rb b/spec/bundler/update/gems/fund_spec.rb
new file mode 100644
index 0000000000..6d7075b424
--- /dev/null
+++ b/spec/bundler/update/gems/fund_spec.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+RSpec.describe "bundle update" do
+ before do
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'has_metadata'
+ gem 'has_funding', '< 2.0'
+ G
+
+ bundle :install
+ end
+
+ context "when listed gems are updated" do
+ before do
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'has_metadata'
+ gem 'has_funding'
+ G
+
+ bundle :update, :all => true
+ end
+
+ it "displays fund message" do
+ expect(out).to include("2 installed gems you directly depend on are looking for funding.")
+ end
+ end
+end