Class: Koji::Plugins::PHPDebugBar
- Inherits:
-
Base
- Object
- Base
- Koji::Plugins::PHPDebugBar
show all
- Defined in:
- lib/koji/plugins/php_debugbar.rb
Instance Attribute Summary
Attributes inherited from Base
#website
Instance Method Summary
collapse
Methods inherited from Base
inherited, #initialize, #name, #report
Instance Method Details
#debug_bar ⇒ Object
10
11
12
|
# File 'lib/koji/plugins/php_debugbar.rb', line 10
def debug_bar
website.body&.to_s&.include?("debugbar/debugbar.js") && website.body&.to_s&.include?("debugbar/debugbar.css")
end
|
#evidence_list ⇒ Object
14
15
16
17
18
|
# File 'lib/koji/plugins/php_debugbar.rb', line 14
def evidence_list
@evidence_list ||= [].tap do |out|
out << "The website contains PHP DebugBar" if debug_bar || js_debug_bar
end
end
|
#js_debug_bar ⇒ Object
6
7
8
|
# File 'lib/koji/plugins/php_debugbar.rb', line 6
def js_debug_bar
website.body&.to_s&.include? "var phpdebugbar = new PhpDebugBar.DebugBar()"
end
|
#score ⇒ Object
20
21
22
|
# File 'lib/koji/plugins/php_debugbar.rb', line 20
def score
evidence_list.empty? ? 0 : 100
end
|