blob: f033c814425876dd15750f1db9c431dfdae980c7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
Description:
The plugin generator creates stubs for a new plugin.
The generator takes a plugin name as its argument. The plugin name may be
given in CamelCase or under_score and should not be suffixed with 'Plugin'.
The generator creates a plugin directory in vendor/plugins that includes
both init.rb and README files as well as lib, task, and test directories.
It's also possible to generate stub files for a generator to go with the
plugin by using --with-generator
Example:
./script/generate plugin BrowserFilters
This will create:
vendor/plugins/browser_filters/README
vendor/plugins/browser_filters/init.rb
vendor/plugins/browser_filters/install.rb
vendor/plugins/browser_filters/lib/browser_filters.rb
vendor/plugins/browser_filters/test/browser_filters_test.rb
vendor/plugins/browser_filters/tasks/browser_filters_tasks.rake
./script/generate plugin BrowserFilters --with-generator
This will create:
vendor/plugins/browser_filters/README
vendor/plugins/browser_filters/init.rb
vendor/plugins/browser_filters/install.rb
vendor/plugins/browser_filters/lib/browser_filters.rb
vendor/plugins/browser_filters/test/browser_filters_test.rb
vendor/plugins/browser_filters/tasks/browser_filters_tasks.rake
vendor/plugins/browser_filters/generators/browser_filters/browser_filters_generator.rb
vendor/plugins/browser_filters/generators/browser_filters/USAGE
vendor/plugins/browser_filters/generators/browser_filters/templates/
|