lib/zold/remotes.rb
# The default TCP port all nodes are supposed to use.
The default TCP port all nodes are supposed to use.
The default TCP port all nodes are supposed to use .
def modify
      FileUtils.mkdir_p(File.dirname(@file))
      Futex.new(@file).open do
        list = yield(load)
        IO.write(
          @file,
          list.uniq { |r| "#{r[:host]}:#{r[:port]}" }.map do |r|
            [
              r[:host],
              r[:port],
              r[:score],
              r[:errors]
            ].join(',')
          end.join("\n")
        )
      end
    end
def modify FileUtils . mkdir_p ( File . dirname ( @file ) ) Futex . new ( @file ) . open do list = yield ( load ) IO . write ( @file , list . uniq { | r | "#{r[:host]}:#{r[:port]}" } . map do | r | [ r [ :host ] , r [ :port ] , r [ :score ] , r [ :errors ] ] . join ( ',' ) end . join ( "\n" ) ) end end
The default TCP port all nodes are supposed to use.
The default TCP port all nodes are supposed to use .