Prev | Current Page 122 | Next

Brad Ediger

"Advanced Rails"

This
can be a much more flexible model than normal centralized version control systems.
We examine decentralized version control systems in more detail in Chapter 10.
* http://piston.rubyforge.org/
Writing Plugins | 83
Plugins and other vendor code can be managed very well with a decentralized version
control system. These systems afford much more flexibility, especially in complicated
situations with multiple developers and vendors.
A tool is available, hgsvn,* which will migrate changes from a SVN repository to a
Mercurial repository. This can be used to set up a system similar to Piston, but with
much more flexibility. One repository (the ???upstream??? or ???incoming???) can mirror
the remote repository, and other projects can cherry-pick desired patches from the
upstream and ignore undesired ones. Local modifications suitable for the upstream
can be exported to patches and sent to the project maintainer.
Writing Plugins
Once you know how to extend Rails by opening classes, it is easy to write a plugin.
First, let??™s look at the directory structure of a typical plugin (see Figure 3-1).
There are several files and directories involved in a Rails plugin:
about.yml (not shown)
This is the newest feature of Rails plugins??”embedded metadata. Right now, this
feature works only with RaPT. The command rapt about plugin_name will give a
summary of the plugin??™s information.


Pages:
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134