def config(name = nil, *args)
values = ARGV.dup
values.shift
values.shift
unless name
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 do
Bundler.settings.pretty_values_for(setting).each do |line|
Bundler.ui.info line
end
end
Bundler.ui.confirm ""
end
return
end
if values.empty?
Bundler.ui.confirm "Settings for `#{name}` in order of priority. The top value will be used"
with_padding do
Bundler.settings.pretty_values_for(name).each { |line| Bundler.ui.info line }
end
else
locations = Bundler.settings.locations(name)
if local = locations[:local]
Bundler.ui.info "Your application has set #{name} to #{local.inspect}. This will override the " \
"system value you are currently setting"
end
if global = locations[:global]
Bundler.ui.info "You are replacing the current system value of #{name}, which is currently #{global}"
end
if env = locations[:env]
Bundler.ui.info "You have set a bundler environment variable for #{env}. This will take precedence " \
"over the system value you are setting"
end
Bundler.settings.set_global(name, values.join(" "))
end
end