lib/zold/commands/push.rb in zold-0.6.2 vs lib/zold/commands/push.rb in zold-0.6.3

- old
+ new

@@ -64,23 +64,27 @@ if response.code == '304' @log.info("#{uri}: same version there") next end unless response.code == '200' + @remotes.error(r[:host], r[:port]) @log.error("#{uri} failed as #{response.code}/#{response.message}") next end json = JSON.parse(response.body)['score'] score = Score.parse_json(json) unless score.valid? + @remotes.error(r[:host], r[:port]) @log.error("#{uri} invalid score: #{score}") next end if score.expired? + @remotes.error(r[:host], r[:port]) @log.error("#{uri} expired score: #{score}") next end if score.strength < Score::STRENGTH + @remotes.error(r[:host], r[:port]) @log.error("#{uri} score is too weak") next end @log.info("#{uri} accepted: #{Rainbow(score.value).green}") total += score.value