doc/rdoc/files/README.html in gem_plugin-0.2.1 vs doc/rdoc/files/README.html in gem_plugin-0.2.2

- old
+ new

@@ -54,11 +54,11 @@ <td>README </td> </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Mon Mar 06 00:33:03 EST 2006</td> + <td>Fri Jun 30 12:43:01 -0700 2006</td> </tr> </table> </div> <!-- banner header --> @@ -79,51 +79,46 @@ </p> <p> <a href="../classes/GemPlugin.html">GemPlugin</a> works by listing the gems installed, and doing a require_gem on any that have the right dependencies. For example, if a gem depends on &quot;gem_plugin&quot; and -&quot;mongrel&quot; then it&#8217;ll load as a Mongrel plugin. This makes +&quot;mongrel&quot; then it&#8216;ll load as a Mongrel plugin. This makes it so that users of the plugins only need to gem install (and maybe config a bit), and plugin authors only need to make gems. </p> <h2>Implementers</h2> <p> To use <a href="../classes/GemPlugin.html">GemPlugin</a> in your system you -only have to require &#8216;gem_plugin&#8217; and then use the <a -href="../classes/GemPlugin/Manager.html#M000008">GemPlugin::Manager.create</a>, -<a -href="../classes/GemPlugin/Manager.html#M000006">GemPlugin::Manager.load</a>, -and GemPlugin::Manager.available methods to work with them. +only have to require &#8216;gem_plugin&#8217; and then use the +GemPlugin::Manager.create, GemPlugin::Manager.load, and +GemPlugin::Manager.available methods to work with them. </p> <ul> -<li><a -href="../classes/GemPlugin/Manager.html#M000006">GemPlugin::Manager.load</a> -&#8212; Takes a &quot;depend include/exclude map&quot; and loads plugins -based on it. +<li>GemPlugin::Manager.load &#8212; Takes a &quot;depend include/exclude +map&quot; and loads plugins based on it. </li> -<li><a -href="../classes/GemPlugin/Manager.html#M000008">GemPlugin::Manager.create</a> -&#8212; Takes a URI style name and some options then creates one for you. +<li>GemPlugin::Manager.create &#8212; Takes a URI style name and some options +then creates one for you. </li> <li>GemPlugin::Manager.available &#8212; Lets you inspect and mess with the internal plugin registry. </li> </ul> <h3>Loading Plugins</h3> <p> -As an example from Mongrel it&#8217;s necessary to load plugins that depend +As an example from Mongrel it&#8216;s necessary to load plugins that depend on rails after the Rails system is configured, but load other plugins right when Mongrel is ready. To do this we very first do: </p> <pre> GemPlugin::Manager.instance.load &quot;mongrel&quot; =&gt; GemPlugin::INCLUDE, &quot;rails&quot; =&gt; GemPlugin::EXCLUDE </pre> <p> -Later, when it&#8217;s ready to load Rails plugins as well we do this: +Later, when it&#8216;s ready to load Rails plugins as well we do this: </p> <pre> GemPlugin::Manager.instance.load &quot;mongrel&quot; =&gt; GemPlugin::INCLUDE </pre> <p> @@ -135,36 +130,36 @@ </p> <pre> plug = GemPlugin::Manager.instance.create(&quot;/commands/snazzy&quot;, &quot;something&quot; =&gt; &quot;yeah&quot;) </pre> <p> -In this case we&#8217;re making the snazzy command and passing a couple +In this case we&#8216;re making the snazzy command and passing a couple fake options. </p> <h3>Finding Available Plugins</h3> <p> Finding plugins is also very easy, you just call GemPlugin::Manager.instance.available and you get a Hash that maps categories to name =&gt; class. For example, if I had the -&quot;/commands/snazzy&quot; plugin registered above, then I&#8217;d get +&quot;/commands/snazzy&quot; plugin registered above, then I&#8216;d get the following: </p> <pre> puts GemPlugin::Manager.instance.available[&quot;/commands&quot;].inspect -&gt; { &quot;/snazzy&quot; =&gt; Snazzy} </pre> <h3>Plugins Inside Modules</h3> <p> Plugins that are placed in modules are also lowercased when registered but still retain their module. So, if Snazzy was actually MyModule::Snazzy, -then it&#8217;d be registered as &quot;/commands/mymodule::snazzy&quot;. +then it&#8216;d be registered as &quot;/commands/mymodule::snazzy&quot;. </p> <h2>Plugin Authors</h2> <p> People who wish to write gem plugins have a faily easy time of it, but need to know the particular rules for the target system. To keep this example -concrete we&#8217;ll assume you want to write a Mongrel command plugin. +concrete we&#8216;ll assume you want to write a Mongrel command plugin. </p> <p> First thing is create your project like normal and setup Rake to make your gem. Your plugin then needs to be created like so: </p> @@ -208,11 +203,11 @@ they get the plugin automagically. </p> <p> People writing GemPlugins for other systems would have to check the documentation from that project to get an idea of what extra requirements -might be needed. For example, you&#8217;d probably have to depend on +might be needed. For example, you&#8216;d probably have to depend on another project other that <b>mongrel</b> and most likely have a few more things to configure in your init.rb. </p> <h2>Plugin Users</h2> <p> @@ -220,20 +215,20 @@ </p> <pre> gem install mongrel_command_snazzy </pre> <p> -And that&#8217;s it. When they run mongrel_rails (given the above example) +And that&#8216;s it. When they run mongrel_rails (given the above example) this snazzy command get loaded automatically without any intervention. </p> <p> The only thing missing in this release is a way for end users to configure such a plugin. I really think this is the job of the implementers to define. </p> <h2>Contact</h2> <p> -E-mail zedshaw at zedshaw.com and I&#8217;ll help. Comments about the API +E-mail zedshaw at zedshaw.com and I&#8216;ll help. Comments about the API are welcome. </p> </div> \ No newline at end of file