I’m a big fan of using PHPUnit with console colours turned on (using the --colors option). Eg: It helps gets into the natural “red, green, refactor” rhythm. I’m currently totally immersed in Django, and greatly miss the lack of colour support within the “test” management command. A simple workaround for this is to use Fabric with a few modified color commands. Your fabric file should include the f
Fabricは指定したコマンドを各ホストで実行する実行モデルです。この場合は特にホストの指定がなかったので、全部ローカルで、一回実行することになります。 これは結構つまんないので、本当の例を見ましょう。これは最近、仕事で作ったコマンドです。Nginxサーバーでメンテ画面を出すようなコマンドです。各ロードバランサーで実行します。 from fabric.api import run, cd, abort, require, sudo, env from fabric.decorators import runs_once, roles from fabric.contrib.console import confirm ... @roles('loadbalancers') def start_maintenance(): """ メンテナンス画面に切り替える """ _production
Python版のCapistranoと言われて久しいFabricだけど、ドキュメント通りにやっても全く動かなかった経験があるのでずっとスルーしてきた。http://pypi.python.org/pypi/Fabric/0.9rc1http://docs.fabfile.org/0.9/PyPIに上がっている0.9というバージョンは、まずまず動くので検討する価値がある。インストールはいつも通り、 $ pip install Fabric 基本的なことFabricをインストールするとfabというスクリプトがインストールされるので、 $ fab -H localhost -f fabfile.py command> のようにして実行する。fabfile.pyは設定ファイルの名前だが、fabfile.pyという名前で設定ファイルを保存しておけば省略できる。-Hオプションはホスト名の指定。オプショ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く