0
0
A ruby toolset to build web pages.
Go to file
2014-03-05 10:06:07 +01:00
lib correct forwarded-for header 2014-03-05 10:06:07 +01:00
spec correct forwarded-for header 2014-03-05 10:06:07 +01:00
.gitignore don't commit sample apps 2012-11-08 21:36:57 +01:00
.rspec added rspec for testing and a thor task 2012-10-11 06:36:36 +02:00
.travis.yml travis does not know about rbx-head anymore 2014-03-05 09:54:41 +01:00
Gemfile update dependencies 2014-03-05 09:44:06 +01:00
Gemfile.lock update dependencies 2014-03-05 09:44:06 +01:00
Guardfile guard should now be able to find the correct specs 2013-01-09 20:09:40 +01:00
LICENSE added LICENSE and release new version 2012-12-13 20:42:27 +01:00
README.md added travis build status 2012-12-17 22:14:31 +01:00
Thorfile added rspec for testing and a thor task 2012-10-11 06:36:36 +02:00
zero.gemspec drop 1.8 support and add 2.0 2013-07-29 08:45:15 +02:00

zero - a toolkit for web services

Build Status

The focus of this project is to provide small helpers for building web services without the need of learning a complete new web stack from the bottom to the top.

As this project is still at the beginning, some things may change or may not be as good as other parts. But we are working on these parts to make them easier to use and stable enough.

The following is a small list of things, the project already provides and at the end you can find a small sample on what is already possible.

parts of the toolkit

Request

A new request implementation is provided to make it easier for accessing all the various elements of a request. It provides an interface for all access headers through the method #access. It also provides a method #params, which returns an object with parameters seperated between query and payload parameters.

Response

A new response is also provided. which is just some lines of code at the moment, but will grow in functionality. We aim at a response which will take care of all the http specific stuff itself, to make it easier for you.

Router

A small router with variables is also provided. It can take static urls, but also dynamic routes and push them to the appropiate controller. It is very lightweight and can therefore be used in other projects, where a Rack::Router is needed but can't do as much and other implementations are just to big.

Renderer

This part should do the work for you to decide, which template to use. You can define a template directory and a mapping of simple shortcuts of types to all types the template should be rendered with. With these two information the renderer will take care of selecting the correct template, so that you can concentrate on the hard parts.

Controller

This is in a very rough state at the moment, but already shows the potential in which direction this hole project should go. It defines a very simple interface for your own controllers, in that it only wants #render to be implemented, but also calls #process to seperate the processing and rendering. It uses the Zero tools at the moment, but later should be able to use other libs too.

example

To give you an impression on what these parts can already do for you, you can take a look at the sample application here and try it out. It does not take much.