From 8be2cb061e7159ad64f6399837c0bb4c7fd15c0f Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 11 Dec 2014 14:52:42 +1100 Subject: [PATCH] barber upgrade, get assets precompile working on 1.9 --- Gemfile.lock | 4 ++-- lib/freedom_patches/ember_compat_handlebars.rb | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7a108e0c4..afeed17e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,10 +41,10 @@ GEM activerecord (>= 2.3.0) rake (>= 0.8.7) arel (5.0.1.20140414130214) - barber (0.4.2) + barber (0.5.0) ember-source execjs - handlebars-source + handlebars-source (>= 1.0.0.rc.4) better_errors (2.0.0) coderay (>= 1.0.0) erubis (>= 2.6.6) diff --git a/lib/freedom_patches/ember_compat_handlebars.rb b/lib/freedom_patches/ember_compat_handlebars.rb index 978619472..b3cdd4285 100644 --- a/lib/freedom_patches/ember_compat_handlebars.rb +++ b/lib/freedom_patches/ember_compat_handlebars.rb @@ -4,10 +4,6 @@ module Barber class EmberCompatPrecompiler < Barber::Precompiler - def self.call(template) - "Handlebars.template(#{compile(template)})" - end - def sources [handlebars, precompiler] end @@ -18,7 +14,7 @@ module Barber #{File.read(Rails.root + "app/assets/javascripts/discourse/lib/ember_compat_handlebars.js")} var Barber = { precompile: function(string) { - return Discourse.EmberCompatHandlebars.precompile(string).toString(); + return Discourse.EmberCompatHandlebars.precompile(string,false).toString(); } }; END