RaPT は、Ruby on Railsのプラグインを管理するためのツールです。
RaPT is a replacemen
t for the plugin script included with the Rails distributi on. It's a little more fault-tole rant 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=DIRSet an explicit rails app directory. 7 Default: /home/taki uchi/blog 8 -s, --source=U RL1,URL2 Use the specified plugin repositori es 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 repositori es 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 repositori es. 11 pack:insta ll Install plugins from plugin pack file or URL 12 pack:unins tall Uninstall plugins from plugin pack file or URL 13 pack:about Display plugin pack informatio n
使用例
長くなったので、 Click to toggle display Example.
Install a plugin:
1 % rapt install continuous_builder
Install a plugin from a subversion
1 % rapt install http://dev.rubyonrai ls.com/svn /rails/plu gins/conti nuous_buil der
Install a plugin and add a svn:extern
1 % rapt install -x continuous_builder
Show informatio
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. rubyonrail s.com/svn/ rails/plug ins/
Search available plugins:
1 % rapt search "authentication"
Discover and prompt to add new repositori
1 % rapt discover
Discover new repositori
1 % rapt discover -l
Add a new repository
1 % rapt source http://dev.rubyonrai ls.com/svn /rails/plu gins/
Remove a repository
1 rapt unsource http://dev.rubyonrai ls.com/svn /rails/plu gins/
Show currently configured
1 % rapt sources
Show the options for the list command:
1 % rapt list -h
Install a plugin pack:
1 % rapt pack:install http://ope nsource.ag ileevolved .com/plugi npacks/sta ndard.plug inpack
View plugin pack meta data:
1 % rapt pack:abouthttp://ope nsource.ag ileevolved .com/plugi npacks/sta ndard.plug inpack