public
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/nex3/haml.git
Fix Sass Merb plugin to work with merb 0.9.0+

Adds support to the Merb Sass plugin for merb 0.9.0+

Signed-off-by: Brian Johnson <brijohn@gmail.com>
brijohn (author)
Wed Feb 13 13:40:24 -0800 2008
nex3 (committer)
Thu Feb 14 06:45:31 -0800 2008
commit  edbd43b148044ecb8922c386cca22c606373dab7
tree    32379809dcadb8071efd1a1644da4d9b4ff55223
parent  f5af4d478dff87181404f87114dab8e5f440ce38
...
18
19
20
21
22
23
24
25
 
 
 
 
 
 
 
 
 
 
26
 
 
 
 
 
 
 
 
 
 
 
 
27
28
 
 
 
 
29
30
31
 
32
33
...
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
44
 
45
46
47
48
49
 
 
50
51
52
0
@@ -18,16 +18,35 @@ unless defined?(Sass::MERB_LOADED)
0
   config.symbolize_keys!
0
   Sass::Plugin.options.merge!(config)
0
   
0
- class MerbHandler # :nodoc:
0
- def process_with_sass(request, response)
0
- if !Sass::Plugin.checked_for_updates ||
0
- Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check]
0
- Sass::Plugin.update_stylesheets
0
+ if version[0] > 0 || version[1] >= 9
0
+
0
+ class Merb::Rack::Application # :nodoc:
0
+ def call_with_sass(env)
0
+ if !Sass::Plugin.checked_for_updates ||
0
+ Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check]
0
+ Sass::Plugin.update_stylesheets
0
+ end
0
+
0
+ call_without_sass(env)
0
       end
0
+ alias_method :call_without_sass, :call
0
+ alias_method :call, :call_with_sass
0
+ end
0
+
0
+ else
0
+
0
+ class MerbHandler # :nodoc:
0
+ def process_with_sass(request, response)
0
+ if !Sass::Plugin.checked_for_updates ||
0
+ Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check]
0
+ Sass::Plugin.update_stylesheets
0
+ end
0
 
0
- process_without_sass(request, response)
0
+ process_without_sass(request, response)
0
+ end
0
+ alias_method :process_without_sass, :process
0
+ alias_method :process, :process_with_sass
0
     end
0
- alias_method :process_without_sass, :process
0
- alias_method :process, :process_with_sass
0
+
0
   end
0
 end

Comments

    No one has commented yet.