Class: GemsStatus::NotASecurityAlertChecker
- Inherits:
-
GemChecker
- Object
- GemChecker
- GemsStatus::NotASecurityAlertChecker
- Defined in:
- lib/gems-status/checkers/not_a_security_alert_checker.rb
Instance Attribute Summary collapse
-
#gem ⇒ Object
readonly
Returns the value of attribute gem.
-
#security_messages ⇒ Object
readonly
Returns the value of attribute security_messages.
Instance Method Summary collapse
- #check?(gem) ⇒ Boolean
- #description ⇒ Object
-
#initialize(conf) ⇒ NotASecurityAlertChecker
constructor
A new instance of NotASecurityAlertChecker.
Constructor Details
#initialize(conf) ⇒ NotASecurityAlertChecker
Returns a new instance of NotASecurityAlertChecker.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gems-status/checkers/not_a_security_alert_checker.rb', line 13 def initialize(conf) Utils::check_parameters('NotASecurityAlertChecker', conf, ["fixed", "source_repos", "email_username", "email_password", "mailing_lists", "email_to"]) @fixed = conf["fixed"] @source_repos = conf["source_repos"] @security_messages = {} @email_username = conf["email_username"] @email_password = conf["email_password"] @mailing_lists = conf["mailing_lists"] @email_to = conf["email_to"] @emails = {} @gem = nil @emails = Utils.download_emails(@email_username, @email_password, @mailing_lists) end |
Instance Attribute Details
#gem ⇒ Object (readonly)
Returns the value of attribute gem.
12 13 14 |
# File 'lib/gems-status/checkers/not_a_security_alert_checker.rb', line 12 def gem @gem end |
#security_messages ⇒ Object (readonly)
Returns the value of attribute security_messages.
12 13 14 |
# File 'lib/gems-status/checkers/not_a_security_alert_checker.rb', line 12 def @security_messages end |
Instance Method Details
#check?(gem) ⇒ Boolean
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/gems-status/checkers/not_a_security_alert_checker.rb', line 27 def check?(gem) @gem = gem #ignore upstream checks return true if gem.origin == gem.gems_url @security_messages = {} look_in_scm(gem) look_in_emails(gem) (gem.version, gem.date) send_emails(gem) return @security_messages.length == 0 end |