public
Rubygem
Description: Resource-oriented open source Ruby framework for Web apps.
Homepage: http://rubywaves.com/
Clone URL: git://github.com/dyoder/waves.git
Search Repo:
Fixed bug with Module [] operator that sometimes loaded global constants 
instead of module constants. Added a Pattern functor to handle 
"root" patterns (specified with an empty Array).
dyoder (author)
Thu Jul 24 23:11:36 -0700 2008
commit  753bab0c8160035908a950e47f71a1ef1585e039
tree    fc47f4e9490570272f26b2bc6559bd13e8655b0c
parent  7fcb087b683a3400a4cc70ca84ce163535f63564
...
12
13
14
 
15
 
16
17
18
...
12
13
14
15
16
17
18
19
20
0
@@ -12,7 +12,9 @@ module Waves
0
       
0
       functor( :match, Waves::Request ) { | request | match( @pattern, request.path ) }
0
       functor( :match, nil, String ) { |pattern, path| {} }
0
+ functor( :match, [], '/' ) { | pattern, path | {} }
0
       functor( :match, Array, String ) { | pattern, path | match( pattern, path.split('/')[1..-1] ) }
0
+ functor( :match, Array, nil ) { | pattern, path | nil }
0
       functor( :match, Array, Array ) do | wants, gots |
0
         r = {}; matches = wants.all? { | want | match( r, want, gots.shift ) }
0
         r if matches and gots.empty?
...
10
11
12
13
 
14
15
16
...
10
11
12
 
13
14
15
16
0
@@ -10,7 +10,7 @@ module Waves
0
 
0
       # Just a convenience method for accessing a const within a Module
0
       def []( cname )
0
- const_get( cname.to_s.camel_case )
0
+ eval( "self::#{cname.to_s.camel_case}" )
0
       end
0
     end
0
   end
...
16
17
18
19
 
20
21
22
...
16
17
18
 
19
20
21
22
0
@@ -16,7 +16,7 @@ module Waves
0
       def / ( string )
0
         File.join(self,string.to_s)
0
       end
0
-
0
+
0
       # produces stringsLikeThis
0
       def lower_camel_case
0
         gsub(/(_)(\w)/) { $2.upcase }

Comments

    No one has commented yet.