Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Jun 5, 2012
1 parent e11b91c commit 31e2ddf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/ember/handlebars/assets/ember-precompiler.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
// DOM
var Element = {}
Element.firstChild = function () { return Element };
Element.innerHTML = function () { return Element };
var Element = {};
Element.firstChild = function () { return Element; };
Element.innerHTML = function () { return Element; };

var document = { createRange: false, createElement: function() { return Element } };
var document = { createRange: false, createElement: function() { return Element; } };
var window = this;
this.document = document;

// null out console.log and console.warn to avoid unexpected output
if (window.console) {
window.console.warn = function() {};
window.console.log = function() {};
}

//// jQuery
var jQuery = window.jQuery = function() { return jQuery };
jQuery.ready = function() { return jQuery };
jQuery.inArray = function() { return jQuery };
var jQuery = window.jQuery = function() { return jQuery; };
jQuery.ready = function() { return jQuery; };
jQuery.inArray = function() { return jQuery; };
jQuery.jquery = "1.7.2";

// Precompiler
Expand Down
3 changes: 3 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
require "fileutils"

Rails.backtrace_cleaner.remove_silencers!
Rails.application.config.ember.handlebars_location = File.expand_path("../../vendor/ember/development/handlebars.js", __FILE__)
Rails.application.config.ember.ember_location = File.expand_path("../../vendor/ember/development/ember.js", __FILE__)


# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
Expand Down

0 comments on commit 31e2ddf

Please sign in to comment.