aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/plugins.textile
diff options
context:
space:
mode:
authorMatthew McEachen <matthew+github@mceachen.org>2011-05-21 17:33:28 -0700
committerMatthew McEachen <matthew+github@mceachen.org>2011-05-21 17:33:28 -0700
commite368a3468ff209825a74075afcd4045f85963b66 (patch)
treed6e66af9b98eeca4eca15c70d9d51b060cd52dad /railties/guides/source/plugins.textile
parent31f09a2b1821886164ffb629085d0f5b75bd0a40 (diff)
downloadrails-e368a3468ff209825a74075afcd4045f85963b66.tar.gz
rails-e368a3468ff209825a74075afcd4045f85963b66.tar.bz2
rails-e368a3468ff209825a74075afcd4045f85963b66.zip
Removed the `enginex` plugin reference which is broken -- rails 3.1.0.beta1 has that functionality now.
Diffstat (limited to 'railties/guides/source/plugins.textile')
-rw-r--r--railties/guides/source/plugins.textile35
1 files changed, 19 insertions, 16 deletions
diff --git a/railties/guides/source/plugins.textile b/railties/guides/source/plugins.textile
index b12aa78947..842b538bc8 100644
--- a/railties/guides/source/plugins.textile
+++ b/railties/guides/source/plugins.textile
@@ -25,33 +25,36 @@ endprologue.
h3. Setup
-h4. Generating the Plugin Skeleton
+Before you continue, take a moment to decide if your new plugin will be potentially shared across different rails applications.
-Rails currently ships with a generator to generate a plugin within a Rails application. Help text is available that will explain
-how this generator works.
+* If your plugin is specific to your application, your new plugin will be a _vendored plugin_.
+* If you think your plugin may be used across applications, build it as a _gemified plugin_.
+
+h4. Either generate a vendored plugin...
+
+Use the +rails generate plugin+ command in your rails root directory
+ to create a new plugin that will live in the +vendor/plugins+
+ directory. See usage and options by asking for help:
<shell>
-$ rails generate plugin --help
+$ rails generate plugin new --help
</shell>
-This generator places the plugin into the vendor/plugins directory.
+h4. Or generate a gemified plugin.
-Vendored plugins are useful for quickly prototyping your plugin but current thinking in the Rails community is shifting towards
-packaging plugins as gems, especially with the inclusion of Bundler as the Rails dependency manager.
-Packaging a plugin as a gem may be overkill for any plugins that will not be shared across projects but doing so from the start makes it easier to share the plugin going forward without adding too much additional overhead during development.
+Writing your rails plugin as a gem, rather than as a vendored plugin,
+ lets you share your plugin across different rails applications using
+ rubygems and bundler.
-Rails 3.1 will ship with a plugin generator that will default to setting up a plugin
-as a gem. This tutorial will begin to bridge that gap by demonstrating how to create a gem based plugin using the
-"Enginex gem":http://www.github.com/josevalim/enginex.
+Rails 3.1 ships with a +rails plugin new+ command which creates a
+ skeleton for developing any kind of Rails extension with the ability
+ to run integration tests using a dummy Rails application. See usage
+ and options by asking for help:
<shell>
-$ gem install enginex
-$ enginex --help
-$ enginex yaffle
+$ rails plugin --help
</shell>
-This command will create a new directory named "yaffle" within the current directory.
-
h3. Testing your newly generated plugin
You can navigate to the directory that contains the plugin, run the +bundle install+ command