Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The invisible framework
Ruby
branch: master

This branch is 12 commits ahead, 40 commits behind macournoyer:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
lib
spec
README
Rakefile

README

= The Invisible framework class
If Camping is a micro-framwork at 4K in size then Invisible is a pico-framework
of 2K (around 200 LOC). Half the size mainly because of Rack. Many ideas were
borrowed from Sinatra, but with a few more opinions on my own and a strong emphasis
on compactness.

== Build an app in an object
Invisible supports multiple applications running in the same VM. Each instance
of this class represents a runnable application.

 app = Invisible.new do
   get "/" do
     render "ohaie"
   end
 end

You can also build a restful application easily.

app = Invisible.new do
  rest :product
end

This expects to find a Product class that includes DataMapper::Resource. Support
for ActiveRecord based models is planned.

== Build an app in a file
DSL like Sinatra is also supported, put all your `get`, `post`, `layout` in your
naked file and Invisible will do the method_missing magic for you.

== Your app is a Rack config file (or not)
Often the problem with new frameworks is you have to find how to deploy it.
You either can make your app file standalone and runnable on its own, put this
at the end of your file:

 app.run

Or to use as a Rack config file, switch the 2 and remove the dot

 run app

Then you'll be able to run with Thin:

 thin start -R app.ru

See example directory for more example.

=== License
Ruby License, http://www.ruby-lang.org/en/LICENSE.txt.

=== Credits
Invisible is copyright Marc-Andre Cournoyer <macournoyer@gmail.com>
rest extensions copyright Paul Vaillant <paul.vaillant@gmail.com>
Something went wrong with that request. Please try again.