会社がProxy経由の為「script/plugin install」が出来なかったんで無理やり動かしてみた。
尚、Proxyでscript/pluginが使えない事への対応は以下のようにgemを使うという手も有る。
http://www.fdiary.net/ml/rails/msg/1194
script/pluginが何をやっているかというとはSVNサイトからデータを取ってきてC:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.3\lib\rails_generatorとかに保存してるだけ
なので、これを手動でやってあげれば問題なく動く。
?対象のリポジトリをブラウザで開く
今回は「http://svn.techno-weenie.net/projects/plugins/acts_as_authenticated/」から「authenticated」ジェネレータを取得したいとする
開いてみると「generators/」てのがあるから開く。
んで「authenticated/」が今回欲しいプラグインなので開く
?対象のディレクトリ及び配下に存在するファイルを全部DLし
「C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.3\lib\rails_generator\generators\components」に「authenticated」ディレクトリを作りそこに全部保存する。
─authenticated │ authenticated_generator.rb │ USAGE.htm │ └─templates authenticated_system.rb authenticated_test_helper.rb controller.rb fixtures.yml functional_test.rb helper.rb index.rhtml login.rhtml migration.rb model.rb signup.rhtml unit_test.rb
?あとは動かすだけ
ruby script/generate authenticated user とか打てばだだだだ〜と動いてくれる。
書いてて思ったんだけどブラウザでDLするより普通にSVNで繋いで取得した方が速かったね。。