diff options
author | Gough, Jack <Jack.Gough@capitalone.com> | 2015-10-21 21:47:14 +0100 |
---|---|---|
committer | Gough, Jack <Jack.Gough@capitalone.com> | 2015-10-21 21:47:14 +0100 |
commit | 17564723816d969f771836800703844a9f58b28a (patch) | |
tree | 32280930db22c8f7c2a633677d4f161bc49400fe | |
parent | 0c459df96d11a917a37fb23262099700abed261f (diff) | |
download | bundler-17564723816d969f771836800703844a9f58b28a.tar.gz |
Make SSL Verify Mode a number setting
-rw-r--r-- | lib/bundler/settings.rb | 2 | ||||
-rw-r--r-- | spec/bundler/settings_spec.rb | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 1bea85f369..f5286c9a22 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -3,7 +3,7 @@ require "uri" module Bundler class Settings BOOL_KEYS = %w(frozen cache_all no_prune disable_local_branch_check ignore_messages gem.mit gem.coc).freeze - NUMBER_KEYS = %w(retry timeout redirect).freeze + NUMBER_KEYS = %w(retry timeout redirect ssl_verify_mode).freeze DEFAULT_CONFIG = { :retry => 3, :timeout => 10, :redirect => 5 } def initialize(root = nil) diff --git a/spec/bundler/settings_spec.rb b/spec/bundler/settings_spec.rb index 6cc79515ec..8e5775a147 100644 --- a/spec/bundler/settings_spec.rb +++ b/spec/bundler/settings_spec.rb @@ -41,6 +41,13 @@ describe Bundler::Settings do end end + context "when is number" do + it "returns a number" do + settings[:ssl_verify_mode] = "1" + expect(settings[:ssl_verify_mode]).to be 1 + end + end + context "when it's not possible to write to the file" do it "raises an PermissionError with explanation" do expect(FileUtils).to receive(:mkdir_p).with(settings.send(:local_config_file).dirname). |