-
Notifications
You must be signed in to change notification settings - Fork 18
Main Page
A plugin.json file is the only requirement for a plugin. The following is an example plugin.json:
{
"name": "TestPlugin",
"description": "Test Plugin is a test.",
"link": "/TestPlugin/hello",
"enabled": false,
"report_view": false,
"admin_view": false
}
The values above are:
Name: Name of the plugin, cannot contain spaces.
Description: Describes the function of the plugin.
link: The main page of the plugin, linked from the plugin list page.
enabled: If the plugin is enabled or not.
report_view: Should the plugin be accessible in reports.
admin_view: Should the plugin be accessible from the administration menu.
Plugins can have their own views and pages written using HAML. The view should describe what the pages of the plug-in look like. To add views:
-
Create a view directory
-
Add the proper routes in routes.rb
See example.
Plugins can have their own routes. Routes add functionality written in Ruby.
Plugins can have prerequisites to install. These commands should be added as setup.sh. This can include Gems or other repositories.
TestPlugin - The most basic plugin example.
ExtraFindings - A more complicated example to include other findings.