Commit Graph

16 Commits

Author SHA1 Message Date
Markus Prinz 53c6609f39 Deal correctly with paths that contain spaces 2008-04-11 13:56:59 -07:00
Blake Mizerany 307f93c6f1 RESTful testing
To be used in one of two ways:

  post_it '/', :foo => 'bar', :env => { :agent => 'Mac Intel' }

  or

  post_it '/', '<myxml></myxml>', :agent => 'Mac Intel'

to receive this in your EventContext

  For query params:

  post '/' do
    params.inspect
  end

  For XML/JSON/etc.. :

  post '/' do
    request.body.string
  end
2008-04-09 22:50:56 -07:00
Blake Mizerany be5f5270ec bringing back the string.
Symbols are not garbage collected and I don't want to use the large (but cool) HashWithIndifferentAccess.  I could use OpenStruct ala camping but that seems unnecessary.

Long live the string.
2008-03-31 18:48:59 -07:00
Blake Mizerany 0b485a96a3 capture agent captures in params 2008-03-24 18:05:23 -07:00
Blake Mizerany 0fa5de7484 making better use of Rack::Request 2008-03-04 16:45:19 -08:00
Blake Mizerany 59199dcc13 FIX: sloppy. run setup! for tests! 2008-02-24 18:30:04 -08:00
Blake Mizerany 593511ec52 Better testing 2008-01-15 15:00:40 -08:00
Blake Mizerany bf896df252 * Splat works
* Filter by agent
2008-01-11 17:01:00 -08:00
Blake Mizerany 4a24696643 Custom 404 2007-11-29 17:44:59 -08:00
Blake Mizerany de6f9818b9 Using :halt to set body 2007-11-28 13:25:14 -08:00
Blake Mizerany 14c12df898 returning 2007-11-28 00:10:12 -08:00
Blake Mizerany 538567319f in context 2007-11-27 23:47:48 -08:00
Blake Mizerany 414c80a324 evaluate in context 2007-11-27 23:24:13 -08:00
Blake Mizerany d454854253 serving simple events 2007-11-27 22:52:52 -08:00
Blake Mizerany 03b080973b invoke results with a block; not the body 2007-11-27 22:31:31 -08:00
Blake Mizerany 18d3c8714f more tests 2007-11-27 21:55:05 -08:00