dist/ember-testing.js in ember-source-1.13.3 vs dist/ember-testing.js in ember-source-1.13.4

- old
+ new

@@ -3,11 +3,11 @@ * @copyright Copyright 2011-2015 Tilde Inc. and contributors * Portions Copyright 2006-2011 Strobe Inc. * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 1.13.3 + * @version 1.13.4 */ (function() { var enifed, requireModule, eriuqer, requirejs, Ember; var mainContext = this; @@ -295,29 +295,60 @@ Ember.oldMethod = Ember.deprecateFunc('Please use the new, updated method', Ember.newMethod); ``` @method deprecateFunc @param {String} message A description of the deprecation. + @param {Object} [options] The options object for Ember.deprecate. @param {Function} func The new function called to replace its deprecated counterpart. @return {Function} a new function that wrapped the original function with a deprecation warning @private */ - _emberMetalCore["default"].deprecateFunc = function (message, func) { - return function () { - _emberMetalCore["default"].deprecate(message); - return func.apply(this, arguments); - }; + _emberMetalCore["default"].deprecateFunc = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (args.length === 3) { + var _ret = (function () { + var message = args[0]; + var options = args[1]; + var func = args[2]; + + return { + v: function () { + _emberMetalCore["default"].deprecate(message, false, options); + return func.apply(this, arguments); + } + }; + })(); + + if (typeof _ret === "object") return _ret.v; + } else { + var _ret2 = (function () { + var message = args[0]; + var func = args[1]; + + return { + v: function () { + _emberMetalCore["default"].deprecate(message); + return func.apply(this, arguments); + } + }; + })(); + + if (typeof _ret2 === "object") return _ret2.v; + } }; /** Run a function meant for debugging. Ember build tools will remove any calls to `Ember.runInDebug()` when doing a production build. ```javascript - Ember.runInDebug(function() { - Ember.Handlebars.EachView.reopen({ - didInsertElement: function() { - console.log('I\'m happy'); + Ember.runInDebug(() => { + Ember.Component.reopen({ + didInsertElement() { + console.log("I'm happy"); } }); }); ``` \ No newline at end of file