0
0
Fork 0
Commit Graph

124 Commits

Author SHA1 Message Date
Gibheer a95f1436c4 replaced .create with .new on Zero::Request 2012-12-12 18:38:46 +01:00
Gibheer e0919c87e5 define the renderer at initialization 2012-12-10 21:12:45 +01:00
Gibheer 55052f83ef avoid changing existing environment keys 2012-12-01 07:23:37 +01:00
Gibheer 5c07e72076 delete all.rb in favorite of zero.rb 2012-11-30 19:57:30 +01:00
Stormwind 6b9f34cb61 Optional setting of status code on redirect 2012-11-30 19:13:41 +01:00
Stormwind facd4f143b Add redirect to response
Now a relocation can be done, by calling redirect with the URL you want
relocate to.
This will set the Location header and set the status code to 302.
2012-11-30 18:58:32 +01:00
Gibheer f89ef14687 specs for the renderer access 2012-11-30 16:22:49 +01:00
Gibheer ec446a53b1 use URI to get parameters 2012-11-30 14:46:52 +01:00
Gibheer 9cea623595 don't overwrite the request 2012-11-29 22:22:50 +01:00
Stormwind 74bbc7f186 Throws an ArgumentError, if no template fits given types 2012-11-29 21:41:13 +01:00
Stormwind 67dd2aa4d5 Throws ArgumentError, if given template does not exist 2012-11-29 21:25:50 +01:00
Stormwind eccd314e23 Add default value for default templates
If a template has no type specifcation in it's name, then we use
'default' as map name now.
2012-11-29 21:11:31 +01:00
Gibheer c6623d47df added custom parameters in the router 2012-11-29 20:02:28 +01:00
Gibheer 8c7eed073c added custom parameter 2012-11-29 19:44:12 +01:00
Gibheer 2762f68363 better specs for render 2012-11-27 21:02:07 +01:00
Gibheer 43a6ada2ed now the renderer correctly saves all templates
Before this fix the renderer was not able to save the templates and
types in the correct way. It still needs some cleanup, but it works now.
2012-11-26 21:41:09 +01:00
Gibheer 2a1499479a specs for rendering 2012-11-26 21:41:09 +01:00
Gibheer 9e062519ba first commit for the new renderer
This part handles the building of the template tree, which then gets
used later by the containers.
2012-11-26 21:41:09 +01:00
Stormwind 7213e3e8f6 Content-Length must be a String 2012-11-24 16:17:14 +01:00
Stormwind 8a75f9462d Add an = at the end of the content_type method
Shall made use of this functionality more confortable, even if it's not
a real attribute of this class.
2012-11-24 15:35:23 +01:00
Stormwind 5c45e1e20b Delete Content-Length. Conten-Type and body on status 304 2012-11-24 15:28:42 +01:00
Gibheer 82bafca46c SimpleCov runs on latest rbx head 2012-11-24 15:14:59 +01:00
Stormwind bffdca6cb1 Delete Content-Length. Conten-Type and body on status 204
Should work, but somehow it doesn't...
2012-11-23 21:24:37 +01:00
Stormwind fea8ac2bbd Sets the Content-Type in to_a unless it is already set before
The default value is 'text/html'.
2012-11-23 20:05:58 +01:00
Stormwind 16eef08688 content_type sets the Content-Type header to the given value 2012-11-23 19:54:17 +01:00
Stormwind 78121c6eea Sets the Content-Length in to_a unless it is already set before 2012-11-23 19:39:56 +01:00
Stormwind c15e8bdacb Sets Content-Type header in to_a 2012-11-23 19:35:14 +01:00
Stormwind 1b96ebb36d Merge remote-tracking branch 'origin/master' 2012-11-23 18:10:27 +01:00
Stormwind a2e6c299cd Sets Content-Length to body string bytesize
Sets the Conten-Length to the bytesize of the joined body to cover UTF-8
2012-11-23 18:06:53 +01:00
Stormwind b4e56c6868 Sets Content-Length to body string length
It joins the body array to a string and sets the Content-Length header
to its length.
2012-11-23 17:59:33 +01:00
Stormwind 963adb8ddc content_length sets the Content-Length to 0
The method content_length creates a header named Content-Length and sets
its value to 0.
2012-11-23 17:43:39 +01:00
Gibheer 495d8f6503 add simplecov to get metrics
This only works with MRI, but should be good enough.
2012-11-20 20:37:10 +01:00
Gibheer 8e1b79663c added a basic spec for the controller 2012-11-20 20:37:10 +01:00
Gibheer 019bccd4a2 add a spec controller 2012-11-20 20:37:10 +01:00
Stormwind 2b79c3e840 Rename #finish to #to_a in response specs 2012-11-19 19:39:45 +01:00
Stormwind 2e073a07fa Restructure response specs
Also no change in behaviour
2012-11-18 16:38:38 +01:00
Stormwind 3ff56d815a Add default value for the body 2012-11-18 16:09:41 +01:00
Stormwind 3c3850a02b Add default value for header 2012-11-18 15:02:07 +01:00
Stormwind a76b08fbb3 Add default value to status code 2012-11-17 14:46:53 +01:00
Stormwind 633d5fb7c8 Converts any input in status to an integer 2012-11-17 14:35:15 +01:00
Gibheer 41cf83c525 added specs for Renderer.transform 2012-11-16 18:13:07 +01:00
Gibheer 2f57c9965e not needed anymore 2012-11-16 18:13:07 +01:00
Gibheer 63fe8abe98 documentet the renderer and added a spec 2012-11-16 18:13:07 +01:00
Gibheer 90445fb473 corrected the naming of #accept, before #media_types 2012-11-16 18:13:07 +01:00
Gibheer ba6e3214b5 added specs for accept 2012-11-16 18:13:07 +01:00
Gibheer a7d3106df2 added specs for new type 2012-11-16 18:13:07 +01:00
Stormwind 0986ca27f5 Add simple response object 2012-11-16 17:56:34 +01:00
Gibheer a5a2e6276b added rack to generate environments 2012-11-16 10:56:29 +01:00
Gibheer 77e94f58cc delete old specs for router
These specs did not work and are cleanup with the unit specs, so there
is no need for them now.
2012-11-16 10:52:27 +01:00
Gibheer a138da7e84 add unit specs for router 2012-11-16 10:50:49 +01:00
Gibheer 75ccc3195d call is a class function 2012-11-16 10:50:12 +01:00
Gibheer 8a1c464c8b added self.create to the request
With this it is possible to reuse an already set request and therefore
safe some memory and time.
2012-11-16 09:33:25 +01:00
Gibheer 331ee7c53c added the required line for spec_helper 2012-11-15 22:35:19 +01:00
Gibheer 14191d45fe added specs for #media_types 2012-11-15 22:27:56 +01:00
Gibheer 063cb77c1c add specs for #server 2012-11-15 19:11:18 +01:00
Gibheer 553bf48fb9 add specs for #client 2012-11-15 17:28:25 +01:00
Gibheer 35150a7c09 check for an instance of parameter 2012-11-15 17:27:56 +01:00
Gibheer ad16e2e931 clean up the accept map after all tests 2012-11-15 17:16:55 +01:00
Gibheer 721e1e61d9 spec files for Request::Client 2012-11-15 06:43:14 +01:00
Gibheer cc831ff9df added spec for #each on Accept 2012-11-14 22:04:01 +01:00
Gibheer 673e5c8508 added specs for #preferred 2012-11-14 21:38:45 +01:00
Gibheer 77ea256afb added specs for #payload 2012-11-14 20:57:18 +01:00
Gibheer 51d2612dc5 added specs for #query 2012-11-14 20:11:54 +01:00
Gibheer d3d5859a99 added specs for #param 2012-11-13 22:08:05 +01:00
Gibheer 0a81098061 added specs for #content_type 2012-11-13 21:57:40 +01:00
Gibheer 95cb897c07 added spec for #path 2012-11-13 07:53:27 +01:00
Gibheer 348ec5b74e added spec for #method 2012-11-13 07:50:49 +01:00
Gibheer fccf1df912 use the environment generator 2012-11-13 07:47:26 +01:00
Gibheer 646d3a9e23 more specs for the #? methods of request 2012-11-13 07:47:05 +01:00
Gibheer e56d74c140 added specs for #get? 2012-11-12 20:33:28 +01:00
Gibheer 7f8aab2e92 extend the helper a bit 2012-11-12 20:33:18 +01:00
Gibheer ea20ebf46c use zero/all to require everything 2012-11-08 21:36:56 +01:00
Gibheer 299229f9cb added spec for the root url 2012-11-08 21:36:56 +01:00
Gibheer 79537632ac added new router to the tools
This small router is intended to work like URLMap, but with the feature
that it can extract variables from routes.
2012-10-13 11:48:11 +02:00