query: rapt

RaptのサブコマンドをZshで補完するためのスクリプトです。

.rapt_completion.zsh

sh>>
_rapt () {
rapt help | grep "^ [a-z:][a-z:]*" | sed 's/^ *//' | sed 's/ *.*//' | sed 's/^/compadd /'
}

compdef _rapt rapt
<<--

何度か欲しいと思ったので書いてみました。

posted by genki genki on Thu 24 Apr 2008 at 10:59 with 0 comments

RaPT
については以前
RaPT: Railsプラグイン管理ツール
で紹介しましたが、
手短にRaPTを使ってRailsプラグインを使う方法をまとめておきます。

インストール

sh>>

gem install rapt

<<--

プラグインをインストール

RAILS_ROOTで以下を実行。

sh>>
$ rapt install http://repo.pragprog.com/svn/Public/plugins/annotate_models
<<--

プラグインをアップデート

まさにこの為にRaptを使う価値があるという代物。

sh>>
$ rapt update annotate_models
<<--

便利です。

posted by genki genki on Thu 6 Mar 2008 at 15:11 with 2 comments
[RaPT](http://rapt.rubyforge.org/) は、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として提供されています。 shell>> % sudo gem install rapt <<-- おなじみのコマンドですね。これでOK。 **使い方** shell>> % rapt -h Usage: rapt [OPTIONS] command Rails plugin manager. GENERAL OPTIONS -r, --root=DIR Set an explicit rails app directory. Default: /home/takiuchi/blog -s, --source=URL1,URL2 Use the specified plugin repositories instead of the defaults. -v, --verbose Turn on verbose output. -h, --help Show this help message. <<-- **サブコマンド** shell>> discover Discover plugin repositories. list List available plugins. search Search for available plugins. about Show basic info about a plugin. install Install plugin(s) from known repositories or URLs. update Update installed plugins. remove Uninstall plugins. source Add a plugin source repository. unsource Remove a plugin repository. sources List currently configured plugin repositories. pack:install Install plugins from plugin pack file or URL pack:uninstall Uninstall plugins from plugin pack file or URL pack:about Display plugin pack information <<-- **使用例** 長くなったので、 Click to toggle display Example.
posted by genki genki on Sun 2 Dec 2007 at 03:05 with 0 comments