Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 13, 2012
  1. @rkh
  2. @zzak
Commits on Jul 18, 2012
  1. @etehtsea

    Remove trailing whitespaces

    etehtsea authored
Commits on May 21, 2012
  1. @zzak

    First pass at block styles for tests

    zzak authored
    TODO:
    * test/routing_test.rb
    * test/settings_test.rb
Commits on May 11, 2011
  1. @rkh
Commits on Mar 23, 2011
  1. @rkh

    deprecate Sinatra::Base#options

    rkh authored
Commits on Mar 14, 2011
  1. @rkh
Commits on Feb 19, 2011
  1. @rkh
  2. @rkh

    fix test for template scopes

    rkh authored
  3. @rkh

    new template rendering option: :scope - eval in a scope other than self

    Paul Walker authored rkh committed
    Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
Commits on Feb 17, 2011
  1. @rkh
Commits on Dec 24, 2010
  1. @rkh

    depend on Tilt 1.2

    rkh authored
Commits on Dec 14, 2010
  1. @rkh

    Add layout_engine option to #render.

    rkh authored
    This will render an erb file with a haml layout:
    
        get('/') { erb :index, :layout_engine => :haml }
    
    Whereas this will cause all markdown templates to be rendered with an erb
    layout (unless, of course, `:layout_engine` is set explicitly):
    
        set :markdown, :layout_engine => :erb
    
    Fixes #110.
Commits on Dec 13, 2010
  1. @rkh

    Set encoding for inline templates correctly.

    rkh authored
    * If Ruby version is not encoding aware, do nothing
    * If file contains a magic comment in the first line, use that encoding
    * Otherwise use settings.default_encoding
    
    Allows one to use unicode characters without having to escape them and deploy
    on Linux systems, like Heroku, on 1.9.2 (on OSX encodings always default to
    UTF-8, which makes it hard to spot this issue before deployment).
    
    Fixes #136.
Commits on Nov 11, 2010
  1. @rkh

    Make neste layout usage independed of the outer template's :layout va…

    rkh authored
    …lue. Allows using partials in layouts.
Commits on Sep 27, 2010
  1. @rkh

    Sets default content type according to template engine used instead o…

    rkh authored
    …f 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.
  2. @rkh

    Skip implicit layouts for nested templates.

    rkh authored
    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.
Commits on Sep 19, 2010
  1. @rkh
Commits on Sep 16, 2010
  1. @rkh
Commits on Sep 12, 2010
  1. @rkh
Commits on Mar 4, 2010
  1. @rtomayko
Commits on Jan 29, 2010
  1. @sr
Commits on Dec 26, 2009
  1. @sr

    Get rid of use_in_file_templates!

    sr authored
Commits on Dec 23, 2009
  1. @sr

    Revert "closes #308 - Depricate use_in_file_templates! in favor of sl…

    sr authored
    …urp_file_templates"
    
    This reverts commit 056bd7b.
Commits on Dec 18, 2009
  1. closes #308 - Depricate use_in_file_templates! in favor of slurp_file…

    Blake Mizerany authored
    …_templates
Commits on Oct 3, 2009
  1. @rtomayko @sr

    Use Tilt for templating

    rtomayko authored sr committed
    This fixes a whole slew of issues with templates and adds some
    new features:
    
     * Template files are read from disk once
     * Template compilation is cached. For instance, ERB templates are
       converted to Ruby once leaving only the eval for subsequent
       renders. HAML templates use a single engine instance.
     * Backtraces from file templates have the templates file and line
       number.
     * Backtraces from in-file templates have correct file/line numbers :)
Commits on Jun 27, 2009
  1. @wbzyl @sr

    Remove superfluous argument in render_* methods

    wbzyl authored sr committed
    Signed-off-by: Simon Rozet <simon@rozet.name>
Commits on Jun 7, 2009
  1. @rtomayko

    Better template inheritance

    rtomayko authored
Commits on May 23, 2009
  1. @sr
Commits on May 21, 2009
  1. @mikejones @rtomayko

    Fix that locals are not passed to layout

    mikejones authored rtomayko committed
    Signed-off-by: Simon Rozet <simon@rozet.name>
Commits on Apr 25, 2009
  1. @rtomayko

    template backtraces ftw [#198] [#51]

    S. Brent Faulkner authored rtomayko committed
Commits on Apr 20, 2009
  1. @rtomayko

    Better handling of in file templates

    Yoji Shidara authored rtomayko committed
    `__END__` in the middle of lines should not be recognized as the end of
    the ruby script. Ruby only accepts the line just contain `__END__`.
    Beginning/tailing whitespaces are not allowed.
    
    Signed-off-by: Simon Rozet <simon@rozet.name>
  2. @rtomayko

    Fixed an uncought exception when run on the Google App Engine infrast…

    Samuel Goebert authored rtomayko committed
    …ructure.
    
    Signed-off-by: Simon Rozet <simon@rozet.name>
Commits on Mar 31, 2009
  1. @sr @rtomayko

    Use contest instead of test/spec/mini

    sr authored rtomayko committed
    See <http://github.com/citrusbyte/contest> for more info. The
    contest.rb file is included under the test/ directory.
  2. @rtomayko

    Sane template options [#191]

    rtomayko authored
    * The options hash now takes the :views, :layout, and :locals
      options but also any template-specific options. The generic
      options are removed before calling the template specific render
      method.
    
    * The haml ":options" and ":haml" options are deprecated. These
      should be merged in directly with the options hash.
    
    * The sass ":sass" option is deprecated. Merge directly with the
      options hash instead.
    
    * All template engines have an app-level option named the same as
      their engine (erb, haml, sass, etc.). This must be a hash and is
      merged with the options passed to the render method.
    
    * The :views_directory option is deprecated; renamed :views.
Something went wrong with that request. Please try again.