From 29bd8f7b8975bc0442f0b63e7da077f9a3f22dc6 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 13 May 2009 16:15:18 -0700 Subject: Simple example for require profiling --- actionpack/examples/simple.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 actionpack/examples/simple.rb diff --git a/actionpack/examples/simple.rb b/actionpack/examples/simple.rb new file mode 100644 index 0000000000..4ecb824688 --- /dev/null +++ b/actionpack/examples/simple.rb @@ -0,0 +1,17 @@ +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" +require 'action_controller' + +class PeopleController < ActionController::Base + def index + head :ok + end +end + +status, headers, body = PeopleController.action(:index).call({ 'rack.input' => StringIO.new('') }) + +puts status +puts headers.to_yaml +puts '---' +body.each do |part| + puts part +end -- cgit v1.2.3