public
Description: The invisible framework
Homepage: http://macournoyer.com/
Clone URL: git://github.com/macournoyer/invisible.git
macournoyer (author)
Wed Jul 23 19:21:25 -0700 2008
commit  92a00ba7a676e3c4946364701f9e8a3c166ecbf8
tree    cfbe225a1d94e4592ca089e1df73de76ec6940ec
parent  02cb6761740fb76565743f7ef495aaf4ded7ba67
invisible / README
100644 43 lines (30 sloc) 1.256 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
= 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
 
== 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>