summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Metcalfe <git@patrickmetcalfe.com>2015-04-28 17:51:24 -0500
committerPatrick Metcalfe <git@patrickmetcalfe.com>2015-04-28 17:51:24 -0500
commit6d38c3c1816faa3e4bff0f90889685b4db69f521 (patch)
tree0655913b5e5f453733cb0aa537064ab7e6a7b65a
parent9191d8ffe8f3dc242222f02a6db07e5ea766c524 (diff)
downloadbundler-6d38c3c1816faa3e4bff0f90889685b4db69f521.tar.gz
make ignore_message boolean option
-rw-r--r--lib/bundler/settings.rb18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 181ff15498..7a58c8af54 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -2,7 +2,7 @@ require 'uri'
module Bundler
class Settings
- BOOL_KEYS = %w(frozen cache_all no_prune disable_local_branch_check gem.mit gem.coc).freeze
+ 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
DEFAULT_CONFIG = {:retry => 3, :timeout => 10, :redirect => 5}
@@ -167,8 +167,20 @@ module Bundler
"BUNDLE_#{key}"
end
- def is_bool(key)
- BOOL_KEYS.include?(key.to_s)
+ def parent_setting_for(name)
+ split_specfic_setting_for(name)[0]
+ end
+
+ def specfic_gem_for(name)
+ split_specfic_setting_for(name)[1]
+ end
+
+ def split_specfic_setting_for(name)
+ name.split(".")
+ end
+
+ def is_bool(name)
+ BOOL_KEYS.include?(name.to_s) || BOOL_KEYS.include?(parent_setting_for(name.to_s))
end
def to_bool(value)