gem install hobo --pre
としてからhobo new my_app
これで次のようなWizardの質問に答えると、あっというまにアプリの骨組みが出来上がる。
Hobo Setup Wizard
Do you want to start the Setup Wizard now?
(Choose 'no' if you need to manually customize any file before running the Wizard.
You can rerun it at any time with `hobo g setup_wizard` from the application root dir.) [y|n]
Test Framework
Do you want to customize the test_framework? [y|n] n
Invite Only Option
Do you want to add the features for an invite only website? [y|n] n
User Resource
Choose a name for the user resource [=user|]:
Do you want to send an activation email to activate the user? [y|n] y
Front Controller
Choose a name for the front controller [=front|]:
Admin Subsite
Do you want to add an admin subsite? [y|n] n
=> "n"
DB Migration
Initial Migration: [s]kip, [g]enerate migration file only, generate and [m]igrate [s|g|m]: m
I18n
The available Hobo internal locales are :en, :"es-DO", :it (please, contribute to more translations)
Do you want to set a default locale? Type the locale or to skip:
Git Repository
Do you want to initialize a git repository now? [y|n] n
けっこう適当に答えてできあがったプロジェクトでrails sすると、次のようになります。少なくてもuser関連のあれこれをまとめて面倒みてくれて、テーマとかも簡単に切り替えられるらしい。
このplugin(よりももっと上の階層の振る舞いをするのかな)のすごいところは、ドキュメントがものすごく充実していることで、ここから本当に丁寧にStep by Stepなチュートリアルを記述してあるPDFの「本」がダウンロードできます。ざっと読んでみて、明日からしばらくこのチュートリアルをやってみようかな、と思わせる丁寧さです。
・・・でも結局今日も自分で何もコード書いてないなあ、と反省。(^^;)これじゃいつまでたっても何も始まらない。このままいくと、plugin紹介のblogになりそう。それでもいいけど。(^^;)

0 件のコメント:
コメントを投稿