# File bundler/settings/validator.rb, line 19 def fail!(key, value, *reasons) reasons.unshift @description raise InvalidOption, "Setting `#{key}` to #{value.inspect} failed:\n#{reasons.map {|r| " - #{r}" }.join("\n")}" end
# File bundler/settings/validator.rb, line 36 def k(key) Bundler.settings.key_for(key) end
# File bundler/settings/validator.rb, line 24 def set(settings, key, value, *reasons) hash_key = k(key) return if settings[hash_key] == value reasons.unshift @description Bundler.ui.info "Setting `#{key}` to #{value.inspect}, since #{reasons.join(", ")}" if value.nil? settings.delete(hash_key) else settings[hash_key] = value end end