aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/plugins.textile
diff options
context:
space:
mode:
Diffstat (limited to 'railties/guides/source/plugins.textile')
-rw-r--r--railties/guides/source/plugins.textile37
1 files changed, 20 insertions, 17 deletions
diff --git a/railties/guides/source/plugins.textile b/railties/guides/source/plugins.textile
index 4bd07114d9..f7eeea0061 100644
--- a/railties/guides/source/plugins.textile
+++ b/railties/guides/source/plugins.textile
@@ -52,44 +52,47 @@ NOTE: The aforementioned instructions will work for sqlite3. For more detailed
h4. Generate the Plugin Skeleton
-Rails ships with a plugin generator which creates a basic plugin skeleton. Pass the plugin name, either 'CamelCased' or 'under_scored', as an argument. Pass +--with-generator+ to add an example generator also.
+Rails ships with a plugin generator which creates a basic plugin skeleton. Pass the plugin name, either 'CamelCased' or 'under_scored', as an argument. Pass +--generator+ to add an example generator also.
This creates a plugin in +vendor/plugins+ including an +init.rb+ and +README+ as well as standard +lib+, +task+, and +test+ directories.
Examples:
<shell>
rails generate plugin yaffle
-rails generate plugin yaffle --with-generator
+rails generate plugin yaffle --generator
</shell>
To get more detailed help on the plugin generator, type +rails generate plugin+.
-Later on this guide will describe how to work with generators, so go ahead and generate your plugin with the +--with-generator+ option now:
+Later on this guide will describe how to work with generators, so go ahead and generate your plugin with the +--generator+ option now:
<shell>
-rails generate plugin yaffle --with-generator
+rails generate plugin yaffle --generator
</shell>
You should see the following output:
<shell>
-create vendor/plugins/yaffle/lib
-create vendor/plugins/yaffle/tasks
-create vendor/plugins/yaffle/test
-create vendor/plugins/yaffle/README
-create vendor/plugins/yaffle/MIT-LICENSE
-create vendor/plugins/yaffle/Rakefile
+create vendor/plugins/yaffle
create vendor/plugins/yaffle/init.rb
create vendor/plugins/yaffle/install.rb
+create vendor/plugins/yaffle/MIT-LICENSE
+create vendor/plugins/yaffle/Rakefile
+create vendor/plugins/yaffle/README
create vendor/plugins/yaffle/uninstall.rb
+create vendor/plugins/yaffle/lib
create vendor/plugins/yaffle/lib/yaffle.rb
-create vendor/plugins/yaffle/tasks/yaffle_tasks.rake
-create vendor/plugins/yaffle/test/core_ext_test.rb
-create vendor/plugins/yaffle/generators
-create vendor/plugins/yaffle/generators/yaffle
-create vendor/plugins/yaffle/generators/yaffle/templates
-create vendor/plugins/yaffle/generators/yaffle/yaffle_generator.rb
-create vendor/plugins/yaffle/generators/yaffle/USAGE
+invoke generator
+inside vendor/plugins/yaffle
+create lib/generators
+create lib/generators/yaffle_generator.rb
+create lib/generators/USAGE
+create lib/generators/templates
+invoke test_unit
+inside vendor/plugins/yaffle
+create test
+create test/yaffle_test.rb
+create test/test_helper.rb
</shell>
h4. Organize Your Files