<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -227,6 +227,11 @@ module Sinatra
       render :erb, template, options, locals
     end
 
+    def liquid(template, options={}, locals={})
+      require 'liquid'
+      render :liquid, template, options, locals
+    end
+
     def haml(template, options={}, locals={})
       require 'haml' unless defined? ::Haml::Engine
       render :haml, template, options, locals
@@ -304,7 +309,17 @@ module Sinatra
       @_out_buf, result = original_out_buf, @_out_buf
       result
     end
-
+    
+    def render_liquid(template, data, options, locals, &amp;block)
+      tem=::Liquid::Template.parse(data)
+      content=''
+      if(not block.nil?)
+        content = yield
+      end
+      locals['content']=content
+      result = tem.render(locals)
+      result
+    end
     def render_haml(template, data, options, locals, &amp;block)
       ::Haml::Engine.new(data, options).render(self, locals, &amp;block)
     end</diff>
      <filename>lib/sinatra/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ class LiquidTest &lt; Test::Unit::TestCase
   end
 
   it 'renders inline Liquid strings' do
-    liquid_app { liquid '&lt;%= 1 + 1 %&gt;' }
+    liquid_app { liquid '{{ 1|plus:1 }}' }
     assert ok?
     assert_equal '2', body
   end
@@ -23,7 +23,7 @@ class LiquidTest &lt; Test::Unit::TestCase
 
   it 'takes a :locals option' do
     liquid_app {
-      locals = {:foo =&gt; 'Bar'}
+      locals = {'foo' =&gt; 'Bar'}
       liquid '{{ foo }}', :locals =&gt; locals
     }
     assert ok?
@@ -32,7 +32,7 @@ class LiquidTest &lt; Test::Unit::TestCase
 
   it &quot;renders with inline layouts&quot; do
     mock_app {
-      layout { 'THIS. IS. {{ content.upcase }}!' }
+      layout { 'THIS. IS. {{ content|upcase }}!' }
       get('/') { liquid 'Sparta' }
     }
     get '/'</diff>
      <filename>test/liquid_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a5531f1887ee46450426a59e6a46df93a193b91a</id>
    </parent>
  </parents>
  <author>
    <name>sjh</name>
    <email>sarvajanahitam@gmail.com</email>
  </author>
  <url>http://github.com/vagmi/sinatra/commit/20d75ec5b8adf98b326c63377f5eaa175a0a935c</url>
  <id>20d75ec5b8adf98b326c63377f5eaa175a0a935c</id>
  <committed-date>2009-04-22T01:54:41-07:00</committed-date>
  <authored-date>2009-04-22T01:54:41-07:00</authored-date>
  <message>add liquid engine to sinatra</message>
  <tree>d34632a6a9f3ab310ecf61b7790bd14c69363fd9</tree>
  <committer>
    <name>sjh</name>
    <email>sarvajanahitam@gmail.com</email>
  </committer>
</commit>
