yui/yui3 — pull request #357 by unkillbob (2012-12-10 21:01:07+00:00)
Title:  Bump Handlebars to 1.0.rc.1. Fixes 2532995.

Bump Handlebars to 1.0.rc.1 primarily to fix http://yuilibrary.com/projects/yui3/ticket/2532995. Also added a couple of sanity test cases to handlebars-test.js for the scoping issue relevant to the linked ticket.

Note https://github.com/yui/handlebars.js/tree/yui should be updated to https://github.com/wycats/handlebars.js/tree/1.0.rc.1 (should I submit a separate pull request for that?).

Also I encountered an issue when after running the Makefile that imports handlebars into the YUI tree - the handlebars-base.js ended up as:

this.Handlebars = {};

(function(Handlebars) {
...
}(this.Handlebars));

which would proceed to blow up at the line

Handlebars.VERSION += '-yui';

in yui-handlebars-base-after.js.

I had to manually update handlebars-base.js to declare the Handlebars global:

var Handlebars = {};

(function(Handlebars) {
...
}(Handlebars));

The change from a global Handlebars variable seemed to have been done prior to the last version of Handlebars YUI pulled in so I assume the last person to bump versions did the same... Maybe there's a better way to do this? Or perhaps the Makefile should be updated to do this for you?