GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: the 4k pocket full-of-gags web microframework
Homepage: http://code.whytheluckystiff.net/camping/
Clone URL: git://github.com/why/camping.git
New try: This should really fix #113
judofyr (author)
Wed Jun 11 00:41:18 -0700 2008
commit  74aa21c595957680a2a0329b480f5790fa5b408f
tree    0a3408afcc7da2820d68abf85b457e0025bd51b9
parent  5950b54cbca094d2543f70440f15d3853a38b309
...
419
420
421
422
 
423
424
425
...
505
506
507
508
 
509
510
511
...
419
420
421
 
422
423
424
425
...
505
506
507
 
508
509
510
511
0
@@ -419,7 +419,7 @@ module Camping
0
       @request.script_name.sub(/\/$/,''),
0
       H[@request.params], H[@request.cookies],
0
       @response.headers, @response.status
0
-
0
+
0
       @input.each do |k, v|
0
         if k[-2..-1] == "[]"
0
           @input[k[0..-3]] = @input.delete(k)
0
@@ -505,7 +505,7 @@ module Camping
0
       #
0
       # So, define your catch-all controllers last.
0
       def D(p, m)
0
- p ||= '/'
0
+ p = '/' if !p || !p[0]
0
         r.map { |k|
0
           k.urls.map { |x|
0
             return (k.instance_method(m) rescue nil) ?
...
35
36
37
38
 
39
40
41
...
35
36
37
 
38
39
40
41
0
@@ -35,7 +35,7 @@ H[@request.cookies],@response.headers,@response.status
0
 r=catch(:halt){send(@request.request_method.downcase,*a)};@body||=r
0
 self;end;end;X=module Controllers;@r=[];class<<self;def r;@r end;def R *u;r=@r
0
 Class.new{meta_def(:urls){u};meta_def(:inherited){|x|r<<x}}end
0
-def D p,m;p||='/'
0
+def D p,m;p='/'if !p||!p[0]
0
 r.map{|k|k.urls.map{|x|return(k.instance_method(m)rescue nil)?
0
 [k,m,*$~[1..-1]]:[I,'r501',m]if p=~/^#{x}\/?$/}};[I,'r404',p]
0
 end;def M;def M;end;constants.map{|c|k=const_get(c)

Comments

    No one has commented yet.