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.
Install a plugin: shell>> % rapt install continuous_builder <<-- Install a plugin from a subversion URL: shell>> % rapt install http://dev.rubyonrails.com/svn/rails/plugins/continuous_builder <<-- Install a plugin and add a svn:externals entry to vendor/plugins shell>> % rapt install -x continuous_builder <<-- Show information about the acts_as_chunky_bacon plugin: shell>> % rapt about acts_as_chunky_bacon <<-- List all available plugins: shell>> % rapt list <<-- List plugins in the specified repository: shell>> % rapt list --source=http://dev.rubyonrails.com/svn/rails/plugins/ <<-- Search available plugins: shell>> % rapt search "authentication" <<-- Discover and prompt to add new repositories: shell>> % rapt discover <<-- Discover new repositories but just list them, don't add anything: shell>> % rapt discover -l <<-- Add a new repository to the source list: shell>> % rapt source http://dev.rubyonrails.com/svn/rails/plugins/ <<-- Remove a repository from the source list: shell>> rapt unsource http://dev.rubyonrails.com/svn/rails/plugins/ <<-- Show currently configured repositories: shell>> % rapt sources <<-- Show the options for the list command: shell>> % rapt list -h <<-- Install a plugin pack: shell>> % rapt pack:install http://opensource.agileevolved.com/pluginpacks/standard.pluginpack <<-- View plugin pack meta data: shell>> % rapt pack:about http://opensource.agileevolved.com/pluginpacks/standard.pluginpack <<--
posted by genki genki on Sun 2 Dec 2007 at 03:05 with 0 comments