WEBrick

WEBrick で Basic 認証を行う

趣旨 WEBrick で Basic 認証を行ってみる。 #!/usr/local/bin/ruby require 'webrick' include WEBrick mime_types = HTTPUtils::DefaultMimeTypes mime_types['rhtml'] = 'text/html' server = HTTPServer.new( :Port => 2000, :MimeTypes => mime_types, :…

WEBRick を使ってプラグインを公開する方法

WEBRick の問題点 プラグインを自動的にインストールできる plugin コマンドにはいつもお世話になっている。このコマンドの実体は、(Rails gem home directory)/lib/commands/plugin.rb にある。ソースコードをつらつらと眺めていると、% ruby script/plugin…