cowboyd / handlebars.rb

Ruby Bindings for Handlebars.js
http://www.handlebarsjs.com
160 stars 68 forks source link

Is #if and #each supported out of the box? #34

Closed nealsanche closed 9 years ago

nealsanche commented 9 years ago

I am assuming that I'd have to register helpers to get the standard #if and #each functionality to work with this Ruby implementation by default? I'm just looking at http://handlebarsjs.com/builtin_helpers.html and finding that this implementation generates the following error:

/Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mustache-0.99.7/lib/mustache/parser.rb:267:in `error': Unclosed tag (Mustache::Parser::SyntaxError)
  Line 70
    {{#if credentialBindings}}
         ^
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mustache-0.99.7/lib/mustache/parser.rb:192:in `scan_tags'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mustache-0.99.7/lib/mustache/parser.rb:122:in `compile'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mustache-0.99.7/lib/mustache/template.rb:55:in `tokens'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mustache-0.99.7/lib/mustache/template.rb:49:in `compile'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mustache-0.99.7/lib/mustache/template.rb:35:in `render'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mustache-0.99.7/lib/mustache.rb:125:in `render'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mustache-0.99.7/lib/mustache.rb:85:in `render'
    from /Users/Shared/Jenkins/Home/jobs/__JenkinsConfig/workspace/d2:86:in `create_android_gradle_build_config'
    from /Users/Shared/Jenkins/Home/jobs/__JenkinsConfig/workspace/d2:241:in `block in create_jenkins_config'
    from /Users/Shared/Jenkins/Home/jobs/__JenkinsConfig/workspace/d2:222:in `each'
    from /Users/Shared/Jenkins/Home/jobs/__JenkinsConfig/workspace/d2:222:in `create_jenkins_config'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /Users/Shared/Jenkins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /Users/Shared/Jenkins/Home/jobs/__JenkinsConfig/workspace/d2:461:in `<main>'
nealsanche commented 9 years ago

Clearly I am off my rocker. Sorry, this isn't your library at all. ;)