summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-07-24 16:01:50 -0700
committerwycats <wycats@gmail.com>2010-07-24 16:01:50 -0700
commite9e3b74c9b3ab28d901656afc9f1cfecaca87fe2 (patch)
tree06d75106c14d0281e10b218af459e95ee50c098f /lib
parentee1ad96a870cd66a72514b573bc896cf5c84affc (diff)
downloadbundler-e9e3b74c9b3ab28d901656afc9f1cfecaca87fe2.tar.gz
Make output prettier and check in C extension test
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli.rb12
-rw-r--r--lib/bundler/settings.rb6
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index f2531763af..c0e4a2b467 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -244,11 +244,15 @@ module Bundler
values.shift # remove the name
unless name
- Bundler.ui.info "Settings are listed in order of priority. The top value will be used.\n\n"
+ Bundler.ui.confirm "Settings are listed in order of priority. The top value will be used.\n"
Bundler.settings.all.each do |setting|
Bundler.ui.confirm "#{setting}"
- with_padding { Bundler.ui.info(Bundler.settings.pretty_values_for(setting)) }
+ with_padding do
+ Bundler.settings.pretty_values_for(setting).each do |line|
+ Bundler.ui.info line
+ end
+ end
Bundler.ui.confirm ""
end
return
@@ -256,7 +260,9 @@ module Bundler
if values.empty?
Bundler.ui.confirm "Settings for `#{name}` in order of priority. The top value will be used"
- with_padding { Bundler.ui.info Bundler.settings.pretty_values_for(name) }
+ with_padding do
+ Bundler.settings.pretty_values_for(name).each { |line| Bundler.ui.info line }
+ end
else
locations = Bundler.settings.locations(name)
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 1976249872..e081d3d9e3 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -55,10 +55,8 @@ module Bundler
locations << "Set for the current user (#{global_config_file}): #{@global_config[key].inspect}"
end
- return "You have not configured a value for `#{exposed_key}`" if locations.empty?
- return "#{locations.first}\n" if locations.size == 1
-
- locations.map {|l| "#{l}\n" }
+ return ["You have not configured a value for `#{exposed_key}`"] if locations.empty?
+ locations
end
def without=(array)