Commit Graph

30 Commits

Author SHA1 Message Date
elij 85473875cb remove haml requirement for running the base tests
fixes #193

this removes the last 'hard' template test requirement that sinatra itself does
not require

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
2011-02-26 10:27:51 +01:00
Konstantin Haase 441b17ead9 extract template lookup logic, fixes #48 2011-02-19 15:37:49 +01:00
Konstantin Haase 5467056237 make sure we check every alternative extension registered for a template engine, fixes #179. 2011-02-17 15:57:03 +01:00
Steve Hodgkiss 4b38f3b8be Added slim support
Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
2010-10-29 14:27:50 +02:00
Konstantin Haase dd81da11bb Add nokogiri helper method. Tilt supports Nokogiri for quite some time now, but it was not as easy to use as builder, and not documented. Tests and documentation included. 2010-10-10 13:53:43 +02:00
Konstantin Haase e5e00471fe Skip implicit layouts for nested templates.
That way the following will produce valid HTML:

@@ layout
!!!
= yield

@@ content
%html
  %head= haml :head
  %body= haml :body

That way using render methods for partials is a lot easier.
Tests included.
2010-09-27 13:25:10 +02:00
Konstantin Haase f58d015b6d Add coffee helper method. Tilt supports CoffeeScript again, but it was not as easy to use as sass or scss, and not documented. Tests and documentation (English and German) included. 2010-09-12 23:09:10 +02:00
Konstantin Haase 8ce74b3ad2 Add markaby helper method. Tilt supports Markaby for quite some time now, but it was not as easy to use as haml or erb, and not documented. Tests and documentation (English and German) included. 2010-09-12 17:00:33 +02:00
Konstantin Haase 7cb94f2d3f Add radius helper method. Tilt supports radius for quite some time now, but it was not as easy to use as haml or erb, and not documented. Tests and documentation (English and German) included. 2010-09-12 15:14:45 +02:00
Konstantin Haase c248dbac9d Add rdoc helper method. Tilt supports RDoc for quite some time now, but it was not as easy to use as haml or erb, and not documented. Tests and documentation (English and German) included. 2010-09-12 13:59:00 +02:00
Konstantin Haase b464e024a8 Add textile helper method. Tilt supports textile for quite some time now, but it was not as easy to use as haml or erb, and not documented. Tests and documentation (English and German) included. 2010-09-11 14:53:04 +02:00
Konstantin Haase 970169b1fb Add markdown helper method. Tilt supports markdown for quite some time now, but it was not as easy to use as haml or erb, and not documented. Tests and documentation (English and German) included. 2010-09-11 14:35:29 +02:00
Konstantin Haase 28a3a350bb Add liquid helper method. Tilt supports liquid for quite some time now, but it was not as easy to use as haml or erb, and not documented. Tests and documentation (English and German) included. 2010-09-11 13:54:01 +02:00
Konstantin Haase ea1426f38b Proper encoding test. 2010-09-10 18:21:30 +02:00
Konstantin Haase 7289cd905c Better handling of encodings in Ruby 1.9, defaults to UTF-8. Fixes GH #27, GH #38 and params issue that came up in IRC. 2010-09-07 09:43:31 +02:00
Pedro Menezes cf3c218a6c Adding scss support through specific command 2010-09-01 11:31:46 +02:00
Simon Rozet b5bc740c12 fix test for haml 3 2010-05-12 07:11:37 +02:00
Andrey Savchenko 621bfcbd6a Added Less support
Signed-off-by: Simon Rozet <simon@rozet.name>
2010-03-01 16:04:44 -08:00
Dylan Egan 1b2ab3a269 ERubis support in to sinatra. With tests!
Signed-off-by: Simon Rozet <simon@rozet.name>
2009-10-18 01:04:54 +02:00
Simon Rozet 428a1ec51d Add a test for the :views render option 2009-05-23 17:02:25 +02:00
S. Brent Faulkner cfdf97d495 template backtraces ftw [#198] [#51] 2009-04-25 05:16:14 -07:00
Ryan Tomayko a734cf38ac I knew I shoulda taken that left turn at Hoboken
This is a fairly large reworking of Sinatra's innards. Although
most of the internal implementation has been modified, it
provides the same basic feature set and is meant to be compatible
with Sinatra 0.3.2.

* The Event and EventContext classes have been removed. Sinatra
  applications are now defined within the class context of a
  Sinatra::Base subclass; each request is processed within a new
  instance.

* Sinatra::Base can be used as a base class for multiple
  Rack applications within a single process and can be used as
  Rack middleware.

* The routing and result type processing implementation has been
  simplified and enhanced a bit. There's a new route conditions
  system for things like :agent/:host matching and a request
  level #pass method has been added to allow an event handler to
  exit immediately, passing control to the next matching route.

* Regular expressions may now be used in route patterns. Captures
  are available as an array from "params[:captures]".

* The #body helper method now takes a block. The block is not
  evaluated until an attempt is made to read the body.

* Options are now dynamically generated class attributes on the
  Sinatra::Base subclass (instead of OpenStruct); options are
  inherited by subclasses and may be overridden up the
  inheritance hierarchy. The Base.set manages all option related
  stuff.

* The application file (app_file) detection heuristics are bit
  more sane now. This fixes some bugs with reloading and
  public/views directory detection. All thin / passenger issues
  of these type should be better now.

* Error mappings are now split into to distinct layers: exception
  mappings and custom error pages. Exception mappings are registered
  with 'error(Exception)' and are run only when the app raises an
  exception. Custom error pages are registered with error(status_code)
  and are run any time the response has the status code specified.
  It's also possible to register an error page for a range of status
  codes: 'error(500..599)'.

* The spec and unit testing extensions have been modified to take
  advantage of the ability to have multiple Sinatra applications.
  The Sinatra::Test module must be included within the TestCase
  in order to take advantage of these methods (unless the
  'sinatra/compat' library has been required).

* Rebuilt specs from scratch for better coverage and
  organization. Sinatra 3.2 unit tests have been retained
  under ./compat to ensure a baseline level of compatibility with
  previous versions; use the 'rake compat' task to run these.

A large number of existing Sinatra idioms have been deprecated but
continue to be supported through the 'sinatra/compat' library.

* The "set_option" and "set_options" methods have been deprecated
  due to redundancy; use "set".

* The "env" option (Sinatra::Base.env) has been renamed to "environment"
  and deprecated because it's too easy to confuse with the request-level
  Rack environment Hash (Sinatra::Base#env).

* The request level "stop" method has been renamed "halt" and
  deprecated. This is for consistency with `throw :halt`.

* The request level "entity_tag" method has been renamed "etag" and
  deprecated. Both versions were previously supported.

* The request level "headers" method has been deprecated. Use
  response['Header-Name'] to access and modify response headers.

* Sinatra.application is deprecated. Use Sinatra::Application instead.

* Setting Sinatra.application = nil to reset an application is
  deprecated. You shouldn't have to reset objects anymore.

* The Sinatra.default_options Hash is deprecated. Modifying this object now
  results in "set(key, value)" invocations on the Sinatra::Base
  subclass.

* The "body.to_result" convention has been deprecated.

* The ServerError exception has been deprecated. Any Exception is now
  considered a ServerError.
2008-12-20 18:45:28 -08:00
Nickolas Means 41b7a3181e Added sass_test.rb and supporting template/layout files. 2008-04-08 19:51:20 -05:00
Ryan Tomayko caf4857024 Builder Rendering Helper (.builder templates) w/ doco and tests. 2008-03-12 09:04:05 -04:00
Blake Mizerany ccbb070300 FIX: Render without layout 2008-02-28 00:49:09 -08:00
Blake Mizerany 7d5bc1f0da Haml & Erb redo 2008-02-27 21:07:06 -08:00
Blake Mizerany 4f8038833c not used 2008-02-24 16:03:48 -08:00
Blake Mizerany 520ac2e918 Haml 2008-02-24 01:32:52 -08:00
Blake Mizerany becd6d8ab0 ERB in place 2008-02-20 22:57:05 -08:00
Blake Mizerany eaa3227fed layouts and templates from files 2007-11-28 21:13:51 -08:00