0
0
Fork 0
Commit Graph

242 Commits

Author SHA1 Message Date
Gibheer 029781bbda guard should now be able to find the correct specs 2013-01-09 20:09:40 +01:00
Gibheer ae0b32a58f take strings for body
This makes the assignment for bodies easier when using plain Strings.
They get wrapped in an array as per rack definition.
For every other type, they have to implement each and get directly set
as body or have to be rendered to Strings first.
2013-01-09 20:08:26 +01:00
Gibheer d10862ce51 use devutils to see, if that works okay 2013-01-08 13:35:29 +01:00
Gibheer 0f8cc4ac53 prepare for version 0.2.0 2013-01-08 13:35:07 +01:00
Stormwind 69aa01cabc Split response_spec.rb into single test files 2013-01-06 20:46:29 +01:00
Stormwind 3a82183563 Improve test structure
Created folder spec/unit/zero and moved all unittest into this folder.
2013-01-06 20:24:39 +01:00
Stormwind b54c2569a4 Kill all mutants in Zero::Router 2013-01-06 19:09:44 +01:00
Stormwind 2c558846ec Kill all mutants in Zero::Renderer 2013-01-06 17:39:57 +01:00
Stormwind e81dff9c07 Kill all mutants i Zero::Request
Fix tests for PATCH, because spec_helper didn't support it and the tests where
wrong.
Remove if statement from "conent_type", because ruby already returns nil, if the
requested key in a hash is not found. (Sounds a bit ugly, but it's true.)
2013-01-06 12:37:07 +01:00
Stormwind cd97198e22 Kill all mutants in Zero::Request::Parameter
I've also changed "extract_query_params" because it does not matter, if the
query string it empty or not for the "parse_string" method.
2013-01-06 10:28:13 +01:00
Stormwind 3bb53d7343 Kill almost all mutants in Zero::Request:AcceptType
Killed 13 of 14 mutants. I will see later, how it's possible to kill the last
one.
I also fixed the return value of "preferred", if the in initialize given string
is empty. Fixed the default value here.
2013-01-05 18:30:36 +01:00
Stormwind 5ca122b84c Kill all mutants in Zero::Request::Accept 2013-01-04 20:25:48 +01:00
Stormwind 7870c5c51f Kill mutant in Zero::Request::Server 2013-01-04 19:42:25 +01:00
Stormwind f4fa025b4d Add check if body is empty on 204 and 304 in specs 2013-01-04 16:46:21 +01:00
Stormwind ff1a8220f8 Add zero-fix18 to dependencies
Will make URI.decode_www_form usable with Ruby 1.8.
2012-12-23 15:23:16 +01:00
Stormwind 65b1d3a1da Remove 1.8 fixes
The fixes for Ruby 1.8 will take place in a seperate gem. So I remove
all the changes here.
2012-12-23 12:23:14 +01:00
Stormwind ca2273e700 Merge remote-tracking branch 'origin/master' 2012-12-22 20:00:34 +01:00
Stormwind 96f2b7a6c4 Replace 'parse_query_string' with 'decode_www_form_18' in test 2012-12-22 19:58:59 +01:00
Stormwind fac934af6d Renamed specfile. Will test other method here. 2012-12-22 19:19:02 +01:00
Stormwind 0e3d995325 Remove backports from dependencies
... not used.
2012-12-22 19:10:04 +01:00
Stormwind 835234a52c Improve query valid regex
Now a query string cannot look like 'foo=bar=foo' anymore.
2012-12-22 19:08:02 +01:00
Gibheer 5057a8df45 kick out Zero::Request from router
To make the router more loose, I replaced the router with the plain
environment. The custom parameters are stored in the same key, so can be
used by the request later.
2012-12-22 16:06:30 +01:00
Stormwind 0e12faff22 Add and use decode_www_form_component_18
This replaces URI encoded chars back into their original form.
2012-12-22 15:25:35 +01:00
Stormwind bfca378f8f Add first implementation of decode_www_form_18
Seperates now foo=bar&bar=foo;baz=foo queries. But does not fix url
encoded strings and such things.
Also added testcase for an empty query string.
2012-12-22 13:09:15 +01:00
Stormwind 443958f885 Add patch for URI decode_www_form
Plus some specs.
This should it make later possible to make Zero work with Ruby 1.8. But
at the moment it only routes to the original decode_www_form method, if
it exists. Otherwise it returns an empty Array. So this will still fail
on the 1.8 versions at the moment.
2012-12-22 11:44:26 +01:00
Gibheer b20c0c527c reuse render for actual rendering
The splitting of rendering and processing is good, but on the other side
it makes some double steps or even introduce workarounds.
That is why I made the method #render just a call to the renderer. This
should help much more than the strict seperation.

The method will only return the resulting string and not add it to the
body of the response. That still has to be taken care of by the user.
2012-12-18 04:24:24 +01:00
Gibheer b0954de7dc added travis build status 2012-12-17 22:14:31 +01:00
Gibheer 09a179b256 allow 1.8 to fail 2012-12-17 22:11:02 +01:00
Gibheer 84829f81f5 require backports for ruby 1.8 2012-12-17 20:53:41 +01:00
Gibheer aec85615de add backports for ruby 1.8 2012-12-17 20:29:24 +01:00
Gibheer b44ae754b3 fix gemfile for jruby 2012-12-17 20:05:53 +01:00
Gibheer 39acc44742 remove require_relative to make it 1.8 compatible 2012-12-17 19:36:41 +01:00
Gibheer aa751668a3 don't install development gems on travis 2012-12-17 19:23:13 +01:00
Gibheer 6fbb12c0fd cleanup gemfile for jruby on travis 2012-12-17 19:22:20 +01:00
Gibheer daee3c5975 run simplecov only when needed 2012-12-17 18:18:20 +01:00
Gibheer d578a8d9af use more recent Gemfile 2012-12-17 18:16:03 +01:00
Gibheer 314e8feeef release 0.1.2 2012-12-17 17:55:12 +01:00
Gibheer 2353a579ca initialize the response 2012-12-17 16:29:29 +01:00
Gibheer e437deee34 added LICENSE and release new version 2012-12-13 20:42:27 +01:00
Gibheer 7bda0ec7e5 added options to controller
This avoids hardcoding the options into the controller and therefore
should it make possible to use Rack::Request or Sinatra apps as
requests. (That sounds so weird.)
2012-12-13 08:45:03 +01:00
Gibheer 38bde320ac typo in the documentation 2012-12-12 18:39:40 +01:00
Gibheer 6e705fdf49 added yard to Gemfile 2012-12-12 18:39:16 +01:00
Gibheer a95f1436c4 replaced .create with .new on Zero::Request 2012-12-12 18:38:46 +01:00
Gibheer 34a7a04a04 added script command for travis 2012-12-10 21:24:41 +01:00
Gibheer 3418d262b3 newer versions of gems 2012-12-10 21:14:05 +01:00
Gibheer e0919c87e5 define the renderer at initialization 2012-12-10 21:12:45 +01:00
Gibheer 2e356837c2 release version 0.1.0 2012-12-01 07:31:03 +01:00
Gibheer 55052f83ef avoid changing existing environment keys 2012-12-01 07:23:37 +01:00
Gibheer cd1d3d6e63 it is a toolkit not a tool set 2012-11-30 22:07:05 +01:00
Gibheer 5c07e72076 delete all.rb in favorite of zero.rb 2012-11-30 19:57:30 +01:00