diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-19 10:50:03 +0100 |
|---|---|---|
| committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-19 17:21:11 +0100 |
| commit | 42ca30343dbce29ba618d3cefda89f359406eb9c (patch) | |
| tree | ca71d061e451fddda06cb0d1417a375798e022e6 /lib | |
| parent | 5dc368b07c407702a485ed53d8fd8a8ab40fa9ef (diff) | |
| download | bundler-42ca30343dbce29ba618d3cefda89f359406eb9c.tar.gz | |
Use newest interface to `bundle config` everywhere
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bundler.rb | 2 | ||||
| -rw-r--r-- | lib/bundler/cli.rb | 8 | ||||
| -rw-r--r-- | lib/bundler/cli/outdated.rb | 4 | ||||
| -rw-r--r-- | lib/bundler/definition.rb | 4 | ||||
| -rw-r--r-- | lib/bundler/dsl.rb | 4 | ||||
| -rw-r--r-- | lib/bundler/fetcher.rb | 2 | ||||
| -rw-r--r-- | lib/bundler/lazy_specification.rb | 2 | ||||
| -rw-r--r-- | lib/bundler/rubygems_gem_installer.rb | 2 | ||||
| -rw-r--r-- | lib/bundler/settings.rb | 6 | ||||
| -rw-r--r-- | lib/bundler/source/git.rb | 4 | ||||
| -rw-r--r-- | lib/bundler/source_list.rb | 2 |
11 files changed, 20 insertions, 20 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 137d916cc6..0416bb08f6 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -365,7 +365,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 bindir foo`. + # the directory to be set as well, via `bundle config set bindir foo`. Bundler.settings[:system_bindir] || Bundler.rubygems.gem_bindir end diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index c591884263..916ae9bf78 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -545,14 +545,14 @@ 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 gem.coc true`." + method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config set 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 :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config gem.mit true`." + method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set gem.mit true`." method_option :test, :type => :string, :lazy_default => "rspec", :aliases => "-t", :banner => "rspec", - :desc => "Generate a test directory for your library, either rspec or minitest. Set a default with `bundle config gem.test rspec`." + :desc => "Generate a test directory for your library, either rspec or minitest. Set a default with `bundle config set gem.test rspec`." def gem(name) end @@ -714,7 +714,7 @@ module Bundler # Automatically invoke `bundle install` and resume if # Bundler.settings[:auto_install] exists. This is set through config cmd - # `bundle config auto_install 1`. + # `bundle config set 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 diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 6cbb3452cb..3a0521de1e 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -221,9 +221,9 @@ module Bundler def check_for_deployment_mode return unless Bundler.frozen_bundle? suggested_command = if Bundler.settings.locations("frozen")[:global] - "bundle config --delete frozen" + "bundle config unset frozen" elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any? - "bundle config --delete deployment" + "bundle config unset deployment" else "bundle install --no-deployment" end diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 9d6fbfff59..aa399c3983 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -397,9 +397,9 @@ module Bundler unless explicit_flag suggested_command = if Bundler.settings.locations("frozen")[:global] - "bundle config --delete frozen" + "bundle config unset frozen" elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any? - "bundle config --delete deployment" + "bundle config unset deployment" else "bundle install --no-deployment" end diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 6707fc5893..6f0d361160 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -474,7 +474,7 @@ repo_name ||= user_name "should come from that source" unless Bundler.feature_flag.bundler_2_mode? msg += ". To downgrade this error to a warning, run " \ - "`bundle config --delete disable_multisource`" + "`bundle config unset disable_multisource`" end raise GemfileEvalError, msg else @@ -482,7 +482,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 " \ + "To upgrade this warning to an error, run `bundle config set " \ "disable_multisource true`." end end diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb index 4dd42e42ff..7ab71d99a8 100644 --- a/lib/bundler/fetcher.rb +++ b/lib/bundler/fetcher.rb @@ -44,7 +44,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 #{remote_uri} username:password" + " bundle config set #{remote_uri} username:password" end end # This error is raised if HTTP authentication is provided, but incorrect. diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index d9cb01f810..69a721c120 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -77,7 +77,7 @@ module Bundler if search && Gem::Platform.new(search.platform) != Gem::Platform.new(platform) && !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 specific_platform true` and install again." + "To use the platform-specific version of the gem, run `bundle config set 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)) diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb index 2b7fa8e0f6..b1076b4554 100644 --- a/lib/bundler/rubygems_gem_installer.rb +++ b/lib/bundler/rubygems_gem_installer.rb @@ -66,7 +66,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 disable_checksum_validation true` to turn off checksum verification + 1. run `bundle config set 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/settings.rb b/lib/bundler/settings.rb index e0b6facecb..79690d31aa 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -109,15 +109,15 @@ module Bundler value else command = if value.nil? - "bundle config --delete #{key}" + "bundle config unset #{key}" else - "bundle config #{key} #{Array(value).join(":")}" + "bundle config set #{key} #{Array(value).join(":")}" end Bundler::SharedHelpers.major_deprecation 2,\ "flags passed to commands " \ "will no longer be automatically remembered. Instead please set flags " \ - "you want remembered between commands using `bundle config " \ + "you want remembered between commands using `bundle config set " \ "<setting name> <setting value>`, i.e. `#{command}`" set_local(key, value) diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 8a31fa307f..31e0985ddf 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -124,12 +124,12 @@ module Bundler unless options["branch"] || Bundler.settings[:disable_local_branch_check] raise GitError, "Cannot use local override for #{name} at #{path} because " \ ":branch is not specified in Gemfile. Specify a branch or use " \ - "`bundle config --delete` to remove the local override" + "`bundle config unset` to remove the local override" end unless path.exist? raise GitError, "Cannot use local override for #{name} because #{path} " \ - "does not exist. Check `bundle config --delete` to remove the local override" + "does not exist. Check `bundle config unset` to remove the local override" end set_local!(path) diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb index ac2adacb3d..61b7a4e1aa 100644 --- a/lib/bundler/source_list.rb +++ b/lib/bundler/source_list.rb @@ -150,7 +150,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 git.allow_insecure true`, or switch to the `https` " \ + "`bundle config set git.allow_insecure true`, or switch to the `https` " \ "protocol to keep your data secure." end end |
