lib/zold/commands/remote.rb in zold-0.16.24 vs lib/zold/commands/remote.rb in zold-0.16.25
- old
+ new
@@ -155,11 +155,11 @@
private
def show
@remotes.all.each do |r|
score = Rainbow("/#{r[:score]}").color(r[:score].positive? ? :green : :red)
- @log.info(r[:host] + Rainbow(":#{r[:port]}").gray + score)
+ @log.info("#{r[:host]}:#{r[:port]}#{score} #{r[:errors]} errors#{r[:default] ? ' default' : ''}")
end
end
def clean
before = @remotes.all.count
@@ -181,15 +181,15 @@
if opts['ignore-node'].include?("#{host}:#{port}")
@log.info("#{host}:#{port} won't be added since it's in the --ignore-node list")
return
end
if opts['ignore-if-exists'] && @remotes.exists?(host, port)
- @log.info("#{host}:#{port} already exists, won't add because of --ignore-if-exists")
+ @log.debug("#{host}:#{port} already exists, won't add because of --ignore-if-exists")
return
end
unless opts['skip-ping']
res = Http.new(uri: "http://#{host}:#{port}/version", network: opts['network']).get
- raise "The node #{host}:#{port} is not responding, #{res.code}:#{res.message}" unless res.code == '200'
+ raise "The node #{host}:#{port} is not responding, #{res.status}:#{res.status_line}" unless res.status == 200
end
@remotes.add(host, port)
@log.info("#{host}:#{port} added to the list, #{@remotes.all.count} total")
end