Created
August 22, 2014 10:57
-
-
Save rummelonp/a1a693f586f957d89191 to your computer and use it in GitHub Desktop.
rails generate controller で生成される controller 取り敢えず skip にして action ごとの method も合わせるやつ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "$@" | xargs gsed -i " | |
s/describe \"\(.*\) \(.*\)\"/skip '\1 \"\2\"'/g; | |
s/it \"returns http success\" do/it do/g; | |
s/GET \"create\"/POST \"create\"/; | |
s/get :create/post :create/; | |
s/GET \"update\"/PATCH \"update\"/; | |
s/get :update/patch :update/; | |
s/GET \"destroy\"/DELETE \"destroy\"/; | |
s/get :destroy/delete :destroy/; | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment