waf
HTTP::Engineから拝借したんですが、Test::TCP + Devel::NYTProfの組み合わせで、WAFのprofilingが簡単にできます。 #!/usr/bin/env perl use strict; use HTTP::Engine; use LWP::UserAgent; my $module = shift || 'ServerSimple'; my $port = shi…
http://advent2008.hackruby.com/past/2008/12/15/a_collection_of_rack_middlewares/ Rack::ETag - Automatically sets the ETag header on all String bodies. Rack::JSONP - Adds JSON-P support by stripping out the callback param and padding the re…
route.freezeがカオス!前回書いていたたんですが、ようやく何をやってるのか(何故このような処理をしているのか)を理解しました。freezeメソッドは、以下のようになっています。 def freeze unless frozen? write_generation! write_recognition! prepare_…
route設定の初期化してるところから読んできますか。routing, initあたりでackで調べると、それっぽいメソッドありますね。以下のメソッドのようですねrailties/lib/initializer.rb def initialize_routing return unless configuration.frameworks.include?…
config/routes.rbをみると、以下のようなブロックで囲まれています。ここがディスパッチルールの設定部分ですね。 ActionController::Routing:Routes.draw do |map| map.connect ':controller/:action/:id', :controller => 'blog' end Rout…