lib/zold/remotes.rb in zold-0.17.5 vs lib/zold/remotes.rb in zold-0.17.6

- old
+ new

@@ -102,23 +102,24 @@ raise "#{msg} (HTTP code #{response.status}, instead of #{code})" end def assert_valid_score(score) raise "Invalid score #{score}" unless score.valid? - raise "Expired score (#{Age.new(score.time)}) #{score}" if score.expired? + raise "Expired score (#{Age.new(score.time)}) #{score.reduce(4)}" if score.expired? end def assert_score_ownership(score) - raise "Masqueraded host #{@host} as #{score.host}: #{score}" if @host != score.host - raise "Masqueraded port #{@port} as #{score.port}: #{score}" if @port != score.port + raise "Masqueraded host #{@host} as #{score.host}: #{score.reduce(4)}" if @host != score.host + raise "Masqueraded port #{@port} as #{score.port}: #{score.reduce(4)}" if @port != score.port end def assert_score_strength(score) - raise "Score #{score.strength} is too weak (<#{Score::STRENGTH}): #{score}" if score.strength < Score::STRENGTH + return if score.strength >= Score::STRENGTH + raise "Score #{score.strength} is too weak (<#{Score::STRENGTH}): #{score.reduce(4)}" end def assert_score_value(score, min) - raise "Score #{score.value} is too small (<#{min}): #{score}" if score.value < min + raise "Score #{score.value} is too small (<#{min}): #{score.reduce(4)}" if score.value < min end end def initialize(file:, network: 'test', timeout: 60) @file = file