summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Kataria <ankitkataria28@gmail.com>2019-01-27 18:11:36 +0530
committerAnkit Kataria <ankitkataria28@gmail.com>2019-01-27 18:11:36 +0530
commit2beb67368cf9ef93cba3d1778f6fd1b6987d9087 (patch)
tree0bad363c83f7c9e21aa629cdee836bfed715d8d5
parent1764cfb555c7dd379298f31e3d3ab603a841ec96 (diff)
downloadbundler-2beb67368cf9ef93cba3d1778f6fd1b6987d9087.tar.gz
change prefer to patch_prefer and updated help text
-rw-r--r--lib/bundler/cli/common.rb2
-rw-r--r--lib/bundler/settings.rb4
-rw-r--r--man/bundle-config.ronn4
-rw-r--r--spec/commands/update_spec.rb4
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 085fbe6a57..672aae5f2d 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -80,7 +80,7 @@ module Bundler
def self.configure_gem_version_promoter(definition, options)
patch_level = patch_level_options(options)
- patch_level.append(:patch) if patch_level.empty? && Bundler.settings[:patch]
+ patch_level.append(:patch) if patch_level.empty? && Bundler.settings[:prefer_patch]
raise InvalidOption, "Provide only one of the following options: #{patch_level.join(", ")}" unless patch_level.length <= 1
definition.gem_version_promoter.tap do |gvp|
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index d50eb335a1..e0b6facecb 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -45,11 +45,11 @@ module Bundler
no_install
no_prune
only_update_to_newer_versions
- patch
path_relative_to_cwd
path.system
plugins
prefer_gems_rb
+ prefer_patch
print_only_version_number
setup_makes_kernel_gem_public
silence_root_warning
@@ -77,7 +77,7 @@ module Bundler
DEFAULT_CONFIG = {
:disable_version_check => true,
- :patch => false,
+ :prefer_patch => false,
:redirect => 5,
:retry => 3,
:timeout => 10,
diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn
index 450887f873..81e0aa303c 100644
--- a/man/bundle-config.ronn
+++ b/man/bundle-config.ronn
@@ -220,8 +220,6 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
* `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.
-* `patch` (BUNDLE_PATCH):
- Whether to use patch update level, by default set to false.
* `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
@@ -235,6 +233,8 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
Enable Bundler's experimental plugin system.
* `prefer_gems_rb` (`BUNDLE_PREFER_GEMS_RB`)
Prefer `gems.rb` to `Gemfile` when Bundler is searching for a Gemfile.
+* `prefer_patch` (BUNDLE_PREFER_PATCH):
+ Prefer updating only to next patch version during updates. Makes `bundle update` calls equivalent to `bundler update --patch`.
* `print_only_version_number` (`BUNDLE_PRINT_ONLY_VERSION_NUMBER`)
Print only version number from `bundler --version`.
* `redirect` (`BUNDLE_REDIRECT`):
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index d0552a9507..d2cdd5a68b 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -811,8 +811,8 @@ RSpec.describe "bundle update conservative" do
context "with patch set as default update level in config" do
it "should do a patch level update" do
- bundle! "config --local patch true"
- bundle! "update --patch foo"
+ bundle! "config --local prefer_patch true"
+ bundle! "update foo"
expect(the_bundle).to include_gems "foo 1.4.5", "bar 2.1.1", "qux 1.0.0"
end