aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-05-13 16:15:18 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-05-14 02:01:08 -0700
commit29bd8f7b8975bc0442f0b63e7da077f9a3f22dc6 (patch)
treead2eaec9502f433f540c74928b208e87f250b295 /actionpack
parentafcbdfc15f919a470e4cfca97fb0084eebd2ab1f (diff)
downloadrails-29bd8f7b8975bc0442f0b63e7da077f9a3f22dc6.tar.gz
rails-29bd8f7b8975bc0442f0b63e7da077f9a3f22dc6.tar.bz2
rails-29bd8f7b8975bc0442f0b63e7da077f9a3f22dc6.zip
Simple example for require profiling
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/examples/simple.rb17
1 files changed, 17 insertions, 0 deletions
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