lib/zold/commands/remote.rb in zold-0.18.9 vs lib/zold/commands/remote.rb in zold-0.19.0

- old
+ new

@@ -61,12 +61,12 @@ Show all registered remote nodes #{Rainbow('remote clean').green} Remove all registered remote nodes #{Rainbow('remote reset').green} Restore it back to the default list of nodes - #{Rainbow('remote defaults').green} - Add all default nodes to the list + #{Rainbow('remote masters').green} + Add all \"master\" nodes to the list #{Rainbow('remote add').green} host [port] Add a new remote node #{Rainbow('remote remove').green} host [port] Remove the remote node #{Rainbow('remote elect').green} @@ -137,12 +137,12 @@ show when 'clean' clean when 'reset' reset(opts) - when 'defaults' - defaults(opts) + when 'masters' + masters(opts) when 'add' add(mine[1], mine[2] ? mine[2].to_i : Remotes::PORT, opts) when 'remove' remove(mine[1], mine[2] ? mine[2].to_i : Remotes::PORT, opts) when 'elect' @@ -173,17 +173,17 @@ @log.debug("All #{before} remote nodes deleted") end def reset(opts) clean - defaults(opts) + masters(opts) end - def defaults(opts) - @remotes.defaults do |host, port| + def masters(opts) + @remotes.masters do |host, port| !opts['ignore-node'].include?("#{host}:#{port}") end - @log.debug("Default remote nodes were added to the list, #{@remotes.all.count} total") + @log.debug("Masters nodes were added to the list, #{@remotes.all.count} total") end def add(host, port, opts) if opts['ignore-node'].include?("#{host}:#{port}") @log.debug("#{host}:#{port} won't be added since it's in the --ignore-node list")