Class: Koji::Plugins::CakePHP

Inherits:
Base
  • Object
show all
Defined in:
lib/koji/plugins/cakephp.rb

Instance Attribute Summary

Attributes inherited from Base

#website

Instance Method Summary collapse

Methods inherited from Base

inherited, #initialize, #name, #report

Constructor Details

This class inherits a constructor from Koji::Plugins::Base

Instance Method Details

#debug_toolbarObject



6
7
8
# File 'lib/koji/plugins/cakephp.rb', line 6

def debug_toolbar
  website.body&.to_s&.include?("js_debug_toolbar.js") && website.body&.to_s&.include?("debug_toolbar.css")
end

#evidence_listObject



10
11
12
13
14
# File 'lib/koji/plugins/cakephp.rb', line 10

def evidence_list
  @evidence_list ||= [].tap do |out|
    out << "The website contains CakePHP's debug toolbar" if debug_toolbar
  end
end

#scoreObject



16
17
18
# File 'lib/koji/plugins/cakephp.rb', line 16

def score
  evidence_list.empty? ? 0 : 100
end