diff options
author | Nick LaMuro <nicklamuro@gmail.com> | 2016-07-25 20:54:33 -0500 |
---|---|---|
committer | Nick LaMuro <nicklamuro@gmail.com> | 2016-07-25 23:29:33 -0500 |
commit | aeff3deaf60118777c96c66b149ba7b8f5c22d20 (patch) | |
tree | a4a17ae1875aec964a97cdb06f94353f12f1dfa6 | |
parent | 2a138ed736b2210a21588db44b567dbdea6f7a18 (diff) | |
download | bundler-aeff3deaf60118777c96c66b149ba7b8f5c22d20.tar.gz |
Move Bundler::Fetcher::Dependency#log_specs to Base
Make log_specs a shared method between all fetchers, and require passing
the debug message as the argument instead of the debug data, allowing it
to be more universal.
-rw-r--r-- | lib/bundler/fetcher/base.rb | 10 | ||||
-rw-r--r-- | lib/bundler/fetcher/dependency.rb | 13 |
2 files changed, 11 insertions, 12 deletions
diff --git a/lib/bundler/fetcher/base.rb b/lib/bundler/fetcher/base.rb index 6714ea2cd7..271729a534 100644 --- a/lib/bundler/fetcher/base.rb +++ b/lib/bundler/fetcher/base.rb @@ -36,6 +36,16 @@ module Bundler def api_fetcher? false end + + private + + def log_specs(debug_msg) + if Bundler.ui.debug? + Bundler.ui.debug debug_msg + else + Bundler.ui.info ".", false + end + end end end end diff --git a/lib/bundler/fetcher/dependency.rb b/lib/bundler/fetcher/dependency.rb index a145837a88..1cd5f9a213 100644 --- a/lib/bundler/fetcher/dependency.rb +++ b/lib/bundler/fetcher/dependency.rb @@ -23,7 +23,7 @@ module Bundler def specs(gem_names, full_dependency_list = [], last_spec_list = []) query_list = gem_names.uniq - full_dependency_list - log_specs(query_list) + log_specs "Query List: #{query_list.inspect}" return last_spec_list if query_list.empty? @@ -76,17 +76,6 @@ module Bundler uri.query = "gems=#{CGI.escape(gem_names.join(","))}" if gem_names.any? uri end - - private - - def log_specs(query_list) - # only display the message on the first run - if Bundler.ui.debug? - Bundler.ui.debug "Query List: #{query_list.inspect}" - else - Bundler.ui.info ".", false - end - end end end end |