Have you ever tried to install a Rails plugin in front of 40 people? If so, you know that no matter what plugin you choose, it will take at least 3 minutes and 18 seconds for
./script/plugin to discover the plugin you requested, and another 36 seconds to copy the files to your application. By that time you’ve finished writing an entire blog and a Flickr clone in Rails.
The first product of this is RaPT (Rails Plugin Tool). It keeps a cache of plugin repositories and metadata to make plugin installation speedy.
Rick also suggested that we develop it separately until it is completely ready to be submitted back to the Rails core.
# Install the gem $ sudo gem install rapt # Reload the shell's executable paths $ rehash # Rebuild cache at ~/.rails/plugin_source_cache.yml $ rapt discover --no-prompt discovered: http://mattmccray.com/svn/rails/plugins/ $ rapt install comatose + ./comatose/CHANGELOG + ./comatose/INSTALL + ./comatose/about.yml ...
If your plugin has it’s own about.yml, you can do this:
$ rapt about comatose --- plugin: http://mattmccray.com/svn/rails/plugins/comatose license: MIT author: Matt McCray rails_version: 1.0+ summary: A micro CMS for embedding in Rails applications. version: 0.3 homepage: http://mattmccray.com
Future enhancements include a central repository for plugins, auto-announcing of plugins you’ve developed (but only if you choose to open-source them), and auto-upgrading. I’m going to try to match the syntax of RubyGems for the commands since the functionality is similar.