ruil

Basic tools for build web applications on top of rack

Install

$ gem install ruil

Usage

This library helps you to buil web applications on top of rack.

Simple hello application

class MyController
  include Ruil::Controller

  resource 'GET', '/foo/:bar' do |request|
    ok :text, 'hello ' + request[:path_info_params][:bar]
  end
end

Using ACL

class MyController
  include Ruil::Controller

  resource 'GET', '/foo/:bar' do |request|
    ok :text, 'hello ' + request[:path_info_params][:bar]
  end
end

Ruil::Authorizer << '/foo/:bar', lambda { |r| not r.session[:user].nil? }

Install from code

First download the code from the repository:

$ git clone git://github.com/danielhz/ruil.git

This project uses jeweler to build the gem, so you can use this commands:

$ rake build            # to build the gem
$ rake install          # to build and install the gem in one step

Also, if you want test the gem you can use the spec task:

$ rake spec

This project uses rcov so you can check the coverage opening the HTML file in the coverage directory after running the spec.

Other Stuff

Author

Daniel Hernández

License

GPL V3

Warranty

This software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.