move to liquid 2.1.2

This commit is contained in:
dinedine 2010-08-04 15:12:14 +02:00
parent c76cd6527c
commit cf3a177580
6 changed files with 10 additions and 7 deletions

View File

@ -3,7 +3,8 @@ source 'http://rubygems.org'
gem 'rails', '3.0.0.rc'
gem 'liquid', '2.0.0'
# gem 'liquid', '2.0.0'
gem 'liquid', '2.1.2'
# i think we'll need to fork our templating language
# gem 'locomotive-liquid'

View File

@ -133,7 +133,7 @@ GEM
configuration (>= 0.0.5)
rake (>= 0.8.1)
linecache (0.43)
liquid (2.0.0)
liquid (2.1.2)
mail (2.2.5)
activesupport (>= 2.3.6)
mime-types
@ -252,7 +252,7 @@ DEPENDENCIES
inherited_resources (= 1.1.2)
jeweler
launchy
liquid (= 2.0.0)
liquid (= 2.1.2)
mimetype-fu
mocha!
mongo_session_store (= 2.0.0.pre)

View File

@ -68,7 +68,7 @@ module Locomotive
registers = { :controller => self, :site => current_site, :page => @page }
::Liquid::Context.new(assigns, registers)
::Liquid::Context.new({}, assigns, registers)
end
def prepare_and_set_response(output)

View File

@ -41,7 +41,7 @@ describe Locomotive::Liquid::Tags::Nav do
def render_nav(source = 'site', registers = {}, template_option = '')
registers = { :site => @site, :page => @home }.merge(registers)
liquid_context = ::Liquid::Context.new({}, registers)
liquid_context = ::Liquid::Context.new({}, {}, registers)
output = Liquid::Template.parse("{% nav #{source} #{template_option} %}").render(liquid_context)
output.gsub(/\n\s{0,}/, '')

View File

@ -48,7 +48,9 @@ describe Locomotive::Liquid::Tags::Paginate do
# ___ helpers methods ___ #
def liquid_context(options = {})
::Liquid::Context.new({
::Liquid::Context.new(
{},
{
'projects' => options.has_key?(:collection) ? options[:collection] : PaginatedCollection.new(['Ruby on Rails', 'jQuery', 'mongodb', 'Liquid', 'sqlite3']),
'current_page' => options[:page] || 1
}, {}, true)

View File

@ -8,7 +8,7 @@ describe Locomotive::Liquid::Tags::Snippet do
snippet = Factory.build(:snippet, :site => site)
snippet.send(:store_template)
site.snippets.stubs(:where).returns([snippet])
@context = ::Liquid::Context.new({}, { :site => site })
@context = ::Liquid::Context.new({}, {}, { :site => site })
end
it 'should render it' do