1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
Commit graph

7 commits

Author SHA1 Message Date
Tim Felgentreff
5fdfa0d5d4 therubyracer is very unstable/crashes often on rbx,jruby and maglev - revert to less 1.x for those 2011-10-06 21:47:06 -07:00
Konstantin Haase
bcc1d34443 adjust tests for less 2.0 2011-09-30 17:18:06 -05:00
Konstantin Haase
e001d62669 adjust require lines for test helper, so it also works properly on 1.9.2 2011-05-11 09:44:02 +02:00
elij
e16bc71590 Explicitly handle the exception for failed loading.
The exception handler was only catching RuntimeError, which probably
should not be caught by the harness (so a test fails), when it should
have been catching LoadError exceptions (module not present to test).

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
2011-01-31 10:34:41 +01:00
Konstantin Haase
1d676f41f8 Sets default content type according to template engine used instead of just text/html.
It does so by including a Mixin into the the returned string offering a content_type method. Therefore all of the following examples produce the expected results:

    # text/html
    get('/') do
      haml :index
    end

    # text/css
    get('/') do
      sass :index
    end

    # text/css
    get('/') do
      haml :index
      sass :index
    end

    # text/html
    get('/') do
      haml '= sass :index'
    end

It also allows setting the default content type for a template engine:

    set :builder, :content_type => :html

Tests and README adjustments (all languages) included.
2010-09-27 13:25:10 +02:00
Simon Rozet
ceac46f0bc fix whitespace errors 2010-03-01 16:07:57 -08:00
Andrey Savchenko
621bfcbd6a Added Less support
Signed-off-by: Simon Rozet <simon@rozet.name>
2010-03-01 16:04:44 -08:00