From 048e30bda454293e36dc84b824b0c8fb3bf62dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 17 Jan 2012 13:55:47 +0100 Subject: update example/sample.ru to follow last updates --- example/sample.ru | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/example/sample.ru b/example/sample.ru index c7b22b2..a31aa8a 100644 --- a/example/sample.ru +++ b/example/sample.ru @@ -12,13 +12,6 @@ else require 'zorglub/session' end # -HAML_PROC = Proc.new { |path,obj| Haml::Engine.new( File.open(path,'r').read ).render(obj) } -Zorglub::Config.register_engine 'tmp-engine', 'haml', HAML_PROC -# -Zorglub::Config.engine = :haml -Zorglub::Config.session_on = true -Zorglub::Config.root = File.dirname( File.absolute_path(__FILE__) ) -# class Zorglub::Node @count=0 class << self @@ -64,7 +57,15 @@ class Node1 < Zorglub::Node # end # +HAML_PROC = Proc.new { |path,obj| Haml::Engine.new( File.open(path,'r').read ).render(obj) } +# APP = Zorglub::App.new do + register_engine! :haml, 'haml', Zorglub::Engines::Haml.method(:proc) + register_engine! 'tmp-engine', 'haml', HAML_PROC + opt! :debug, true + opt! :engine, :haml + opt!:root, File.dirname( File.absolute_path(__FILE__) ) + opt(:session_options)[:session_on] = true map '/url1', Node1 end # -- cgit v1.1-2-g2b99