bin/check-all-gpg-keys-for-expiry.rb
# Set the key's level to the appropriate level by checking its number of days left
Set the key's level to the appropriate level by checking its number of days left
Set the key ' s level to the appropriate level by checking its number of days left
def update_key_level(key)
    num_of_days_left = key.num_of_days_left
    case num_of_days_left.to_s
    when /^-\d+$/
      key.level = 2
    when /^\d+$/
      return key.level = 0 if num_of_days_left > config[:warning]
      return key.level = 2 if num_of_days_left <= config[:critical]
      return key.level = 1
    else
      return key.level = 3
    end
  end
def update_key_level ( key ) num_of_days_left = key . num_of_days_left case num_of_days_left . to_s when / ^- \d +$ / key . level = 2 when / ^ \d +$ / return key . level = 0 if num_of_days_left > config [ :warning ] return key . level = 2 if num_of_days_left <= config [ :critical ] return key . level = 1 else return key . level = 3 end end
Set the key's level to the appropriate level by checking its number of days left
Set the key ' s level to the appropriate level by checking its number of days left
key