dist/ember-testing.js in ember-source-1.10.0.beta.3 vs dist/ember-testing.js in ember-source-1.10.0.beta.4
- old
+ new
@@ -3,11 +3,11 @@
* @copyright Copyright 2011-2014 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.10.0-beta.3
+ * @version 1.10.0-beta.4
*/
(function() {
var enifed, requireModule, eriuqer, requirejs, Ember;
@@ -181,12 +181,14 @@
@method deprecate
@param {String} message A description of the deprecation.
@param {Boolean} test An optional boolean. If falsy, the deprecation
will be displayed.
+ @param {Object} options An optional object that can be used to pass
+ in a `url` to the transition guide on the emberjs.com website.
*/
- Ember.deprecate = function(message, test) {
+ Ember.deprecate = function(message, test, options) {
var noDeprecation;
if (typeof test === 'function') {
noDeprecation = test();
} else {
@@ -199,9 +201,16 @@
var error;
// When using new Error, we can't do the arguments check for Chrome. Alternatives are welcome
try { __fail__.fail(); } catch (e) { error = e; }
+
+ if (arguments.length === 3) {
+ Ember.assert('options argument to Ember.deprecate should be an object', options && typeof options === 'object');
+ if (options.url) {
+ message += ' See ' + options.url + ' for more details.';
+ }
+ }
if (Ember.LOG_STACKTRACE_ON_DEPRECATION && error.stack) {
var stack;
var stackStr = '';
\ No newline at end of file