RaPT
は、Ruby on Railsのプラグインを管理するためのツールです。
RaPT is a replacement for the plugin script included with the Rails distribution. It's a little more fault-tolerant and featured than the default plugin script. The main additional feature is the ability to search for Rails plugins from the command line.
なんとなく、名前がdebianのaptに似てると思うのは僕だけでしょうか。
以前から、RailsプラグインにもRubyGemsに相当するような
パッケージ管理ツールがほしいと思っていたのですが、
これを使えば目的を達することができるかも。
インストール
RaPT自体はRubyGemsとして提供されています。
1 % sudo gem install rapt
おなじみのコマンドですね。これでOK。
使い方
1 % rapt -h
2 Usage: rapt [OPTIONS] command
3 Rails plugin manager.
4
5 GENERAL OPTIONS
6 -r, --root=DIR Set an explicit rails app directory.
7 Default: /home/takiuchi/blog
8 -s, --source=URL1,URL2 Use the specified plugin repositories instead
9 of the defaults.
10 -v, --verbose Turn on verbose output.
11 -h, --help Show this help message.
サブコマンド
1 discover Discover plugin repositories.
2 list List available plugins.
3 search Search for available plugins.
4 about Show basic info about a plugin.
5 install Install plugin(s) from known repositories or URLs.
6 update Update installed plugins.
7 remove Uninstall plugins.
8 source Add a plugin source repository.
9 unsource Remove a plugin repository.
10 sources List currently configured plugin repositories.
11 pack:install Install plugins from plugin pack file or URL
12 pack:uninstall Uninstall plugins from plugin pack file or URL
13 pack:about Display plugin pack information
使用例
長くなったので、
Click to toggle display Example.
Install a plugin:
1 % rapt install continuous_builder
Install a plugin from a subversion URL:
1 % rapt install http://dev.rubyonrails.com/svn/rails/plugins/continuous_builder
Install a plugin and add a svn:externals entry to vendor/plugins
1 % rapt install -x continuous_builder
Show information about the acts_as_chunky_bacon plugin:
1 % rapt about acts_as_chunky_bacon
List all available plugins:
1 % rapt list
List plugins in the specified repository:
1 % rapt list --source=http://dev.rubyonrails.com/svn/rails/plugins/
Search available plugins:
1 % rapt search "authentication"
Discover and prompt to add new repositories:
1 % rapt discover
Discover new repositories but just list them, don't add anything:
1 % rapt discover -l
Add a new repository to the source list:
1 % rapt source http://dev.rubyonrails.com/svn/rails/plugins/
Remove a repository from the source list:
1 rapt unsource http://dev.rubyonrails.com/svn/rails/plugins/
Show currently configured repositories:
1 % rapt sources
Show the options for the list command:
1 % rapt list -h
Install a plugin pack:
1 % rapt pack:install http://opensource.agileevolved.com/pluginpacks/standard.pluginpack
View plugin pack meta data:
1 % rapt pack:about http://opensource.agileevolved.com/pluginpacks/standard.pluginpack