瀏覽代碼

Remove trailing score

master
aeris 2 年之前
父節點
當前提交
0f45195170
共有 1 個檔案被更改,包括 2 行新增9 行删除
  1. 2
    9
      lib/cryptcheck.rb

+ 2
- 9
lib/cryptcheck.rb 查看文件

@@ -29,10 +29,6 @@ module CryptCheck
def grade
'X'
end

def score
0
end
end

autoload :Logger, 'cryptcheck/logger'
@@ -147,10 +143,7 @@ module CryptCheck
results[d].sort! do |a, b|
cmp = score(a) <=> score(b)
if cmp == 0
cmp = b.score <=> a.score
if cmp == 0
cmp = a.server.hostname <=> b.server.hostname
end
cmp = a.server.hostname <=> b.server.hostname
end
cmp
end
@@ -174,7 +167,7 @@ module CryptCheck
end

private
SCORES = %w(A+ A A- B C D E F T M X)
SCORES = %w(A+ A B+ B C+ C D E F G M T X)

def self.score(a)
SCORES.index a.grade

Loading…
取消
儲存