README.mdown in handlebars-0.5.0 vs README.mdown in handlebars-0.6.0
- old
+ new
@@ -1,8 +1,12 @@
-
## Handlebars.rb
+[](http://badge.fury.io/rb/handlebars)
+[](https://travis-ci.org/cowboyd/handlebars.rb)
+[](https://gemnasium.com/cowboyd/handlebars.rb)
+
+
This uses [therubyracer][1] to bind to the _actual_ JavaScript implementation of
[Handlebars.js][2] so that you can use it from ruby.
## Usage
@@ -52,11 +56,11 @@
handlebars.partial_missing do |name|
"unable to find >#{name}"
end
handlebars.compile("{{>missing}}").call #=> unable to find >missing
-
+
Missing partials can also be returned as a function:
count = 0
handlebars.partial_missing do |name|
lambda do |this, context, options|
@@ -66,16 +70,12 @@
end
t = handlebars.compile("{{>missing}}")
t.call #=> 1 miss(es) when trying to look up a partial
t.call #=> 2 miss(es) when tyring to look up a partial
-## Hack
+## Test
- git clone git@github.com:cowboyd/handlebars.rb.git #git it
- cd handlebars.rb #go to it
- git submodule update --init #pull down handlebars.js
- rspec spec/ #test it
+ rspec spec/
[1]: http://github.com/cowboyd/therubyracer "The Ruby Racer"
[2]: http://github.com/wycats/handlebars.js "Handlebars JavaScript templating library"
-