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

public
Rubygem
Description: Resource-oriented open source Ruby framework for Web apps.
Homepage: http://rubywaves.com/
Clone URL: git://github.com/dyoder/waves.git
actually use block to path, guy
automatthew (author)
Tue Jun 10 21:39:40 -0700 2008
commit  9e678f5274615fb8c31a88f62a9119e5e4c78c8a
tree    cebc51608ea948ae603e3efb88321323fb164555
parent  0e3c5614ece4975360c9ef91bd9625ce02e3cb34
...
12
13
14
15
 
16
17
18
...
12
13
14
 
15
16
17
18
0
@@ -12,7 +12,7 @@ module Waves
0
         matcher = Constraints.new( options )
0
         descriptors = Descriptors.new( options )
0
         resource = Waves.application[:resources][ options[:resource] ]
0
- resource.instance_eval{ define_method n, &block } if block_given?
0
+ resource.instance_eval{ define_method name, &block } if block_given?
0
       end
0
       
0
       # how / when can i take the results of the pattern match
...
5
6
7
8
9
 
 
10
11
12
13
14
15
 
16
17
18
19
...
5
6
7
 
 
8
9
10
11
12
13
14
 
15
16
17
18
19
0
@@ -5,14 +5,14 @@ describe "A Mapping that specifies the resource in the with()" do
0
   
0
   before do
0
     mapping.with :resource => :smurf do
0
- path :list, :get => '/smurves'
0
- path :single, :get => '/smurf/<name>'
0
+ path( :list, :get => '/smurves' ) { "smurfy" }
0
+ path( :single, :get => '/smurf/<name>' ) { "not smurfy" }
0
       # path :multiple, :get => ['/smurf/<name>', '/smurf/<name>.<ext>']
0
     end
0
   end
0
   
0
   it "works miracles" do
0
-
0
+ request.get( '/smurves' )
0
   end
0
   
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.