Permalink
Switch branches/tags
Nothing to show
Commits on Oct 10, 2009
  1. Add rails support

    foca committed Oct 10, 2009
    * Templates go in app/templates/{controller}/{action}.{mime}.mustache
    
    * Mustaches (ie, the ruby classes) go under
      app/views/{controller}/{action}.rb and should inherit from
      Mustache::Rails
    
    * Controller ivars will be copied to your mustache class.
    
    * You can omit declaring the Mustache. In that case, an instance of
      Mustache::Rails will be used for evaluation. If this is the case, then
      attr_readers will be defined for your controller ivars, since you can't
      access them directly from the template.
    
    * Mustache::Rails also delegates any methods to the ActionView::Base
      instance used by rails, so helpers should work fine.
    
    * You can't use Mustache's {{< partial }} syntax. Yet.
    
    * There's no way to use the form helpers from rails in a mustache
      template, but alternate solutions like Bureaeucrat
      (http://github.com/tizoc/bureaucrat) which ports django's form objects
      into ruby might be useful.
    
    * Templates can go in app/views/{controller}/{action}.{mime}.mustache
      still, if you prefer to keep them alongside your views. Mustache will
      just look for them in app/templates before.
Commits on Oct 9, 2009
  1. push the tag too

    defunkt committed Oct 9, 2009
  2. v0.1.4

    defunkt committed Oct 9, 2009
  3. git clean after publishing

    defunkt committed Oct 9, 2009
  4. Improved Sinatra support, but you'll need to update your app.

    defunkt committed Oct 9, 2009
    Notably we added the `mustaches` and `namespace` settings. You can use
    `mustaches` to tell Mustache where Ruby view files are located, e.g.
    
        set :mustaches, "path/to/mustache/views"
    
    The `namespace` option is used for telling Mustache which namespace
    the Views classes all live under. If you have a view named
    `Hurl::Views::Stats`, you'll want to set `namespace` to Hurl:
    
        set :namespace, Hurl
    
    and put the class into a file named `stats.rb` that lives under the
    `mustaches` setting:
    
        $ cat path/to/mustache/views/stats.rb
        module Hurl
          module Views
            class Stats < Mustache
              # blah
            end
          end
        end
    
    The `mustaches` setting defaults to the Sinatra `views` setting and
    the `namespace` setting defaults to `Object`.
Commits on Oct 8, 2009
  1. bump version

    defunkt committed Oct 8, 2009
Commits on Oct 7, 2009
  1. 0.1.1

    defunkt committed Oct 7, 2009
  2. Fixed Mustache.render with options.

    Francesc Esplugas authored and defunkt committed Oct 7, 2009
  3. Render from file.

    Francesc Esplugas authored and defunkt committed Oct 7, 2009
  4. Quick example.

    Francesc Esplugas authored and defunkt committed Oct 7, 2009
  5. Test render with options. Was working on Version 0.1.0.

    Francesc Esplugas authored and defunkt committed Oct 7, 2009
  6. We already know the file we want to load, we only but we want to set …

    Francesc Esplugas authored and defunkt committed Oct 7, 2009
    …the extension.
  7. Use by default klass.render to generate files.

    Francesc Esplugas authored and defunkt committed Oct 7, 2009
  8. Updated comment to match latest changes.

    Francesc Esplugas authored and defunkt committed Oct 7, 2009
  9. Mustache it's really nice for creating configuration files.

    Francesc Esplugas authored and defunkt committed Oct 7, 2009
  10. add Home link

    defunkt committed Oct 7, 2009
  11. comment out private

    defunkt committed Oct 7, 2009
  12. whitespace

    defunkt committed Oct 7, 2009
  13. add Gems link

    defunkt committed Oct 7, 2009