ember-source 2.0.3.1 → 2.1.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ember-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-template-compiler.js +1455 -1072
- data/dist/ember-testing.js +233 -151
- data/dist/ember.debug.js +2609 -2019
- data/dist/ember.js +2609 -2019
- data/dist/ember.min.js +14 -14
- data/dist/ember.prod.js +2152 -1713
- data/dist/version-test.js +13 -0
- metadata +5 -8
- data/dist/ember-runtime.js +0 -21795
- data/dist/ember-tests.js +0 -67864
- data/dist/ember-tests.prod.js +0 -67737
- data/dist/ember.debug.cjs.js +0 -52806
data/dist/ember-testing.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 2.0.
|
8
|
+
* @version 2.1.0-beta.1
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -67,7 +67,7 @@ var mainContext = this;
|
|
67
67
|
var reified = [];
|
68
68
|
var length = deps.length;
|
69
69
|
|
70
|
-
for (var i=0; i<length; i++) {
|
70
|
+
for (var i = 0; i < length; i++) {
|
71
71
|
if (deps[i] === 'exports') {
|
72
72
|
reified.push(exports);
|
73
73
|
} else {
|
@@ -87,7 +87,7 @@ var mainContext = this;
|
|
87
87
|
var parts = child.split('/');
|
88
88
|
var parentBase = name.split('/').slice(0, -1);
|
89
89
|
|
90
|
-
for (var i=0, l=parts.length; i<l; i++) {
|
90
|
+
for (var i = 0, l = parts.length; i < l; i++) {
|
91
91
|
var part = parts[i];
|
92
92
|
|
93
93
|
if (part === '..') {
|
@@ -115,13 +115,13 @@ var mainContext = this;
|
|
115
115
|
}
|
116
116
|
})();
|
117
117
|
|
118
|
-
enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'ember-metal/error', 'ember-metal/logger', 'ember-debug/
|
119
|
-
/*global __fail__*/
|
120
|
-
|
118
|
+
enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/assert', 'ember-metal/features', 'ember-metal/error', 'ember-metal/logger', 'ember-metal/environment', 'ember-debug/deprecate', 'ember-debug/warn', 'ember-debug/is-plain-function'], function (exports, _emberMetalCore, _emberMetalAssert, _emberMetalFeatures, _emberMetalError, _emberMetalLogger, _emberMetalEnvironment, _emberDebugDeprecate, _emberDebugWarn, _emberDebugIsPlainFunction) {
|
121
119
|
'use strict';
|
122
120
|
|
123
121
|
exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;
|
124
122
|
|
123
|
+
_emberMetalCore.default.deprecate = _emberDebugDeprecate.default;
|
124
|
+
|
125
125
|
/**
|
126
126
|
@module ember
|
127
127
|
@submodule ember-debug
|
@@ -132,10 +132,6 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
132
132
|
@public
|
133
133
|
*/
|
134
134
|
|
135
|
-
function isPlainFunction(test) {
|
136
|
-
return typeof test === 'function' && test.PrototypeMixin === undefined;
|
137
|
-
}
|
138
|
-
|
139
135
|
/**
|
140
136
|
Define an assertion that will throw an exception if the condition is not
|
141
137
|
met. Ember build tools will remove any calls to `Ember.assert()` when
|
@@ -157,10 +153,10 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
157
153
|
its return value will be used as condition.
|
158
154
|
@public
|
159
155
|
*/
|
160
|
-
|
156
|
+
function assert(desc, test) {
|
161
157
|
var throwAssertion;
|
162
158
|
|
163
|
-
if (
|
159
|
+
if (_emberDebugIsPlainFunction.default(test)) {
|
164
160
|
throwAssertion = !test();
|
165
161
|
} else {
|
166
162
|
throwAssertion = !test;
|
@@ -169,26 +165,7 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
169
165
|
if (throwAssertion) {
|
170
166
|
throw new _emberMetalError.default('Assertion Failed: ' + desc);
|
171
167
|
}
|
172
|
-
}
|
173
|
-
|
174
|
-
/**
|
175
|
-
Display a warning with the provided message. Ember build tools will
|
176
|
-
remove any calls to `Ember.warn()` when doing a production build.
|
177
|
-
|
178
|
-
@method warn
|
179
|
-
@param {String} message A warning to display.
|
180
|
-
@param {Boolean} test An optional boolean. If falsy, the warning
|
181
|
-
will be displayed.
|
182
|
-
@public
|
183
|
-
*/
|
184
|
-
_emberMetalCore.default.warn = function (message, test) {
|
185
|
-
if (!test) {
|
186
|
-
_emberMetalLogger.default.warn('WARNING: ' + message);
|
187
|
-
if ('trace' in _emberMetalLogger.default) {
|
188
|
-
_emberMetalLogger.default.trace();
|
189
|
-
}
|
190
|
-
}
|
191
|
-
};
|
168
|
+
}
|
192
169
|
|
193
170
|
/**
|
194
171
|
Display a debug notice. Ember build tools will remove any calls to
|
@@ -202,90 +179,9 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
202
179
|
@param {String} message A debug message to display.
|
203
180
|
@public
|
204
181
|
*/
|
205
|
-
|
182
|
+
function debug(message) {
|
206
183
|
_emberMetalLogger.default.debug('DEBUG: ' + message);
|
207
|
-
}
|
208
|
-
|
209
|
-
/**
|
210
|
-
Display a deprecation warning with the provided message and a stack trace
|
211
|
-
(Chrome and Firefox only). Ember build tools will remove any calls to
|
212
|
-
`Ember.deprecate()` when doing a production build.
|
213
|
-
|
214
|
-
@method deprecate
|
215
|
-
@param {String} message A description of the deprecation.
|
216
|
-
@param {Boolean|Function} test An optional boolean. If falsy, the deprecation
|
217
|
-
will be displayed. If this is a function, it will be executed and its return
|
218
|
-
value will be used as condition.
|
219
|
-
@param {Object} options An optional object that can be used to pass
|
220
|
-
in a `url` to the transition guide on the emberjs.com website, and a unique
|
221
|
-
`id` for this deprecation. The `id` can be used by Ember debugging tools
|
222
|
-
to change the behavior (raise, log or silence) for that specific deprecation.
|
223
|
-
The `id` should be namespaced by dots, e.g. "view.helper.select".
|
224
|
-
@public
|
225
|
-
*/
|
226
|
-
_emberMetalCore.default.deprecate = function (message, test, options) {
|
227
|
-
if (_emberMetalCore.default.ENV.RAISE_ON_DEPRECATION) {
|
228
|
-
_emberDebugDeprecationManager.default.setDefaultLevel(_emberDebugDeprecationManager.deprecationLevels.RAISE);
|
229
|
-
}
|
230
|
-
if (_emberDebugDeprecationManager.default.getLevel(options && options.id) === _emberDebugDeprecationManager.deprecationLevels.SILENCE) {
|
231
|
-
return;
|
232
|
-
}
|
233
|
-
|
234
|
-
var noDeprecation;
|
235
|
-
|
236
|
-
if (isPlainFunction(test)) {
|
237
|
-
noDeprecation = test();
|
238
|
-
} else {
|
239
|
-
noDeprecation = test;
|
240
|
-
}
|
241
|
-
|
242
|
-
if (noDeprecation) {
|
243
|
-
return;
|
244
|
-
}
|
245
|
-
|
246
|
-
if (options && options.id) {
|
247
|
-
message = message + (' [deprecation id: ' + options.id + ']');
|
248
|
-
}
|
249
|
-
|
250
|
-
if (_emberDebugDeprecationManager.default.getLevel(options && options.id) === _emberDebugDeprecationManager.deprecationLevels.RAISE) {
|
251
|
-
throw new _emberMetalError.default(message);
|
252
|
-
}
|
253
|
-
|
254
|
-
var error;
|
255
|
-
|
256
|
-
// When using new Error, we can't do the arguments check for Chrome. Alternatives are welcome
|
257
|
-
try {
|
258
|
-
__fail__.fail();
|
259
|
-
} catch (e) {
|
260
|
-
error = e;
|
261
|
-
}
|
262
|
-
|
263
|
-
if (arguments.length === 3) {
|
264
|
-
_emberMetalCore.default.assert('options argument to Ember.deprecate should be an object', options && typeof options === 'object');
|
265
|
-
if (options.url) {
|
266
|
-
message += ' See ' + options.url + ' for more details.';
|
267
|
-
}
|
268
|
-
}
|
269
|
-
|
270
|
-
if (_emberMetalCore.default.LOG_STACKTRACE_ON_DEPRECATION && error.stack) {
|
271
|
-
var stack;
|
272
|
-
var stackStr = '';
|
273
|
-
|
274
|
-
if (error['arguments']) {
|
275
|
-
// Chrome
|
276
|
-
stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n');
|
277
|
-
stack.shift();
|
278
|
-
} else {
|
279
|
-
// Firefox
|
280
|
-
stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n');
|
281
|
-
}
|
282
|
-
|
283
|
-
stackStr = '\n ' + stack.slice(2).join('\n ');
|
284
|
-
message = message + stackStr;
|
285
|
-
}
|
286
|
-
|
287
|
-
_emberMetalLogger.default.warn('DEPRECATION: ' + message);
|
288
|
-
};
|
184
|
+
}
|
289
185
|
|
290
186
|
/**
|
291
187
|
Alias an old, deprecated method with its new counterpart.
|
@@ -307,7 +203,7 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
307
203
|
@return {Function} a new function that wrapped the original function with a deprecation warning
|
308
204
|
@private
|
309
205
|
*/
|
310
|
-
|
206
|
+
function deprecateFunc() {
|
311
207
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
312
208
|
args[_key] = arguments[_key];
|
313
209
|
}
|
@@ -342,7 +238,7 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
342
238
|
|
343
239
|
if (typeof _ret2 === 'object') return _ret2.v;
|
344
240
|
}
|
345
|
-
}
|
241
|
+
}
|
346
242
|
|
347
243
|
/**
|
348
244
|
Run a function meant for debugging. Ember build tools will remove any calls to
|
@@ -363,9 +259,16 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
363
259
|
@since 1.5.0
|
364
260
|
@public
|
365
261
|
*/
|
366
|
-
|
262
|
+
function runInDebug(func) {
|
367
263
|
func();
|
368
|
-
}
|
264
|
+
}
|
265
|
+
|
266
|
+
_emberMetalAssert.registerDebugFunction('assert', assert);
|
267
|
+
_emberMetalAssert.registerDebugFunction('warn', _emberDebugWarn.default);
|
268
|
+
_emberMetalAssert.registerDebugFunction('debug', debug);
|
269
|
+
_emberMetalAssert.registerDebugFunction('deprecate', _emberDebugDeprecate.default);
|
270
|
+
_emberMetalAssert.registerDebugFunction('deprecateFunc', deprecateFunc);
|
271
|
+
_emberMetalAssert.registerDebugFunction('runInDebug', runInDebug);
|
369
272
|
|
370
273
|
/**
|
371
274
|
Will call `Ember.warn()` if ENABLE_ALL_FEATURES, ENABLE_OPTIONAL_FEATURES, or
|
@@ -380,12 +283,12 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
380
283
|
|
381
284
|
function _warnIfUsingStrippedFeatureFlags(FEATURES, featuresWereStripped) {
|
382
285
|
if (featuresWereStripped) {
|
383
|
-
_emberMetalCore.default.warn('Ember.ENV.ENABLE_ALL_FEATURES is only available in canary builds.', !_emberMetalCore.default.ENV.ENABLE_ALL_FEATURES);
|
384
|
-
_emberMetalCore.default.warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberMetalCore.default.ENV.ENABLE_OPTIONAL_FEATURES);
|
286
|
+
_emberMetalCore.default.warn('Ember.ENV.ENABLE_ALL_FEATURES is only available in canary builds.', !_emberMetalCore.default.ENV.ENABLE_ALL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
|
287
|
+
_emberMetalCore.default.warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberMetalCore.default.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
|
385
288
|
|
386
289
|
for (var key in FEATURES) {
|
387
290
|
if (FEATURES.hasOwnProperty(key) && key !== 'isEnabled') {
|
388
|
-
_emberMetalCore.default.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key]);
|
291
|
+
_emberMetalCore.default.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
|
389
292
|
}
|
390
293
|
}
|
391
294
|
}
|
@@ -420,12 +323,10 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
420
323
|
}
|
421
324
|
}
|
422
325
|
|
423
|
-
_emberMetalCore.default.Debug = {
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
_deprecationLevels: _emberDebugDeprecationManager.deprecationLevels
|
428
|
-
};
|
326
|
+
_emberMetalCore.default.Debug = {};
|
327
|
+
|
328
|
+
_emberMetalCore.default.Debug.registerDeprecationHandler = _emberDebugDeprecate.registerHandler;
|
329
|
+
_emberMetalCore.default.Debug.registerWarnHandler = _emberDebugWarn.registerHandler;
|
429
330
|
|
430
331
|
/*
|
431
332
|
We are transitioning away from `ember.js` to `ember.debug.js` to make
|
@@ -441,33 +342,214 @@ enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'e
|
|
441
342
|
_emberMetalCore.default.warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.');
|
442
343
|
}
|
443
344
|
});
|
444
|
-
enifed('ember-debug/
|
345
|
+
enifed('ember-debug/deprecate', ['exports', 'ember-metal/core', 'ember-metal/error', 'ember-metal/logger', 'ember-debug/handlers'], function (exports, _emberMetalCore, _emberMetalError, _emberMetalLogger, _emberDebugHandlers) {
|
346
|
+
/*global __fail__*/
|
347
|
+
|
445
348
|
'use strict';
|
446
349
|
|
447
|
-
var
|
448
|
-
|
449
|
-
|
450
|
-
SILENCE: _emberMetalUtils.symbol('SILENCE')
|
451
|
-
};
|
350
|
+
var _slice = Array.prototype.slice;
|
351
|
+
exports.registerHandler = registerHandler;
|
352
|
+
exports.default = deprecate;
|
452
353
|
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
}
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
354
|
+
function registerHandler(handler) {
|
355
|
+
_emberDebugHandlers.registerHandler('deprecate', handler);
|
356
|
+
}
|
357
|
+
|
358
|
+
function formatMessage(_message, options) {
|
359
|
+
var message = _message;
|
360
|
+
|
361
|
+
if (options && options.id) {
|
362
|
+
message = message + (' [deprecation id: ' + options.id + ']');
|
363
|
+
}
|
364
|
+
|
365
|
+
if (options && options.url) {
|
366
|
+
message += ' See ' + options.url + ' for more details.';
|
367
|
+
}
|
368
|
+
|
369
|
+
return message;
|
370
|
+
}
|
371
|
+
|
372
|
+
registerHandler(function logDeprecationToConsole(message, options) {
|
373
|
+
var updatedMessage = formatMessage(message, options);
|
374
|
+
|
375
|
+
_emberMetalLogger.default.warn('DEPRECATION: ' + updatedMessage);
|
376
|
+
});
|
377
|
+
|
378
|
+
registerHandler(function logDeprecationStackTrace(message, options, next) {
|
379
|
+
if (_emberMetalCore.default.LOG_STACKTRACE_ON_DEPRECATION) {
|
380
|
+
var stackStr = '';
|
381
|
+
var error = undefined,
|
382
|
+
stack = undefined;
|
383
|
+
|
384
|
+
// When using new Error, we can't do the arguments check for Chrome. Alternatives are welcome
|
385
|
+
try {
|
386
|
+
__fail__.fail();
|
387
|
+
} catch (e) {
|
388
|
+
error = e;
|
467
389
|
}
|
468
|
-
|
390
|
+
|
391
|
+
if (error.stack) {
|
392
|
+
if (error['arguments']) {
|
393
|
+
// Chrome
|
394
|
+
stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n');
|
395
|
+
stack.shift();
|
396
|
+
} else {
|
397
|
+
// Firefox
|
398
|
+
stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n');
|
399
|
+
}
|
400
|
+
|
401
|
+
stackStr = '\n ' + stack.slice(2).join('\n ');
|
402
|
+
}
|
403
|
+
|
404
|
+
var updatedMessage = formatMessage(message, options);
|
405
|
+
|
406
|
+
_emberMetalLogger.default.warn('DEPRECATION: ' + updatedMessage + stackStr);
|
407
|
+
} else {
|
408
|
+
next.apply(undefined, arguments);
|
469
409
|
}
|
470
|
-
};
|
410
|
+
});
|
411
|
+
|
412
|
+
registerHandler(function raiseOnDeprecation(message, options, next) {
|
413
|
+
if (_emberMetalCore.default.ENV.RAISE_ON_DEPRECATION) {
|
414
|
+
var updatedMessage = formatMessage(message);
|
415
|
+
|
416
|
+
throw new _emberMetalError.default(updatedMessage);
|
417
|
+
} else {
|
418
|
+
next.apply(undefined, arguments);
|
419
|
+
}
|
420
|
+
});
|
421
|
+
|
422
|
+
var missingOptionsDeprecation = 'When calling `Ember.deprecate` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include `id` and `until` properties.';
|
423
|
+
exports.missingOptionsDeprecation = missingOptionsDeprecation;
|
424
|
+
var missingOptionsIdDeprecation = 'When calling `Ember.deprecate` you must provide `id` in options.';
|
425
|
+
exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;
|
426
|
+
var missingOptionsUntilDeprecation = 'When calling `Ember.deprecate` you must provide `until` in options.';
|
427
|
+
|
428
|
+
exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation;
|
429
|
+
/**
|
430
|
+
Display a deprecation warning with the provided message and a stack trace
|
431
|
+
(Chrome and Firefox only). Ember build tools will remove any calls to
|
432
|
+
`Ember.deprecate()` when doing a production build.
|
433
|
+
|
434
|
+
@method deprecate
|
435
|
+
@param {String} message A description of the deprecation.
|
436
|
+
@param {Boolean|Function} test A boolean. If falsy, the deprecation
|
437
|
+
will be displayed. If this is a function, it will be executed and its return
|
438
|
+
value will be used as condition.
|
439
|
+
@param {Object} options An object that can be used to pass
|
440
|
+
in a `url` to the transition guide on the emberjs.com website, and a unique
|
441
|
+
`id` for this deprecation. The `id` can be used by Ember debugging tools
|
442
|
+
to change the behavior (raise, log or silence) for that specific deprecation.
|
443
|
+
The `id` should be namespaced by dots, e.g. "view.helper.select".
|
444
|
+
@public
|
445
|
+
*/
|
446
|
+
|
447
|
+
function deprecate(message, test, options) {
|
448
|
+
if (!options || !options.id && !options.until) {
|
449
|
+
deprecate(missingOptionsDeprecation, false, { id: 'ember-debug.deprecate-options-missing', until: '3.0.0' });
|
450
|
+
}
|
451
|
+
|
452
|
+
if (options && !options.id) {
|
453
|
+
deprecate(missingOptionsIdDeprecation, false, { id: 'ember-debug.deprecate-id-missing', until: '3.0.0' });
|
454
|
+
}
|
455
|
+
|
456
|
+
if (options && !options.until) {
|
457
|
+
deprecate(missingOptionsUntilDeprecation, options && options.until, { id: 'ember-debug.deprecate-until-missing', until: '3.0.0' });
|
458
|
+
}
|
459
|
+
|
460
|
+
_emberDebugHandlers.invoke.apply(undefined, ['deprecate'].concat(_slice.call(arguments)));
|
461
|
+
}
|
462
|
+
});
|
463
|
+
enifed('ember-debug/handlers', ['exports', 'ember-debug/is-plain-function'], function (exports, _emberDebugIsPlainFunction) {
|
464
|
+
'use strict';
|
465
|
+
|
466
|
+
exports.registerHandler = registerHandler;
|
467
|
+
exports.invoke = invoke;
|
468
|
+
var HANDLERS = {};
|
469
|
+
|
470
|
+
exports.HANDLERS = HANDLERS;
|
471
|
+
function normalizeTest(test) {
|
472
|
+
return _emberDebugIsPlainFunction.default(test) ? test() : test;
|
473
|
+
}
|
474
|
+
|
475
|
+
function registerHandler(type, callback) {
|
476
|
+
var nextHandler = HANDLERS[type] || function () {};
|
477
|
+
|
478
|
+
HANDLERS[type] = function (message, options) {
|
479
|
+
callback(message, options, nextHandler);
|
480
|
+
};
|
481
|
+
}
|
482
|
+
|
483
|
+
function invoke(type, message, test, options) {
|
484
|
+
if (normalizeTest(test)) {
|
485
|
+
return;
|
486
|
+
}
|
487
|
+
|
488
|
+
var handlerForType = HANDLERS[type];
|
489
|
+
|
490
|
+
if (!handlerForType) {
|
491
|
+
return;
|
492
|
+
}
|
493
|
+
|
494
|
+
if (handlerForType) {
|
495
|
+
handlerForType(message, options);
|
496
|
+
}
|
497
|
+
}
|
498
|
+
});
|
499
|
+
enifed('ember-debug/is-plain-function', ['exports'], function (exports) {
|
500
|
+
'use strict';
|
501
|
+
|
502
|
+
exports.default = isPlainFunction;
|
503
|
+
|
504
|
+
function isPlainFunction(test) {
|
505
|
+
return typeof test === 'function' && test.PrototypeMixin === undefined;
|
506
|
+
}
|
507
|
+
});
|
508
|
+
enifed('ember-debug/warn', ['exports', 'ember-metal/core', 'ember-metal/logger', 'ember-debug/handlers'], function (exports, _emberMetalCore, _emberMetalLogger, _emberDebugHandlers) {
|
509
|
+
'use strict';
|
510
|
+
|
511
|
+
var _slice = Array.prototype.slice;
|
512
|
+
exports.registerHandler = registerHandler;
|
513
|
+
exports.default = warn;
|
514
|
+
|
515
|
+
function registerHandler(handler) {
|
516
|
+
_emberDebugHandlers.registerHandler('warn', handler);
|
517
|
+
}
|
518
|
+
|
519
|
+
registerHandler(function logWarning(message, options) {
|
520
|
+
_emberMetalLogger.default.warn('WARNING: ' + message);
|
521
|
+
if ('trace' in _emberMetalLogger.default) {
|
522
|
+
_emberMetalLogger.default.trace();
|
523
|
+
}
|
524
|
+
});
|
525
|
+
|
526
|
+
var missingOptionsDeprecation = 'When calling `Ember.warn` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include an `id` property.';
|
527
|
+
exports.missingOptionsDeprecation = missingOptionsDeprecation;
|
528
|
+
var missingOptionsIdDeprecation = 'When calling `Ember.warn` you must provide `id` in options.';
|
529
|
+
|
530
|
+
exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;
|
531
|
+
/**
|
532
|
+
Display a warning with the provided message. Ember build tools will
|
533
|
+
remove any calls to `Ember.warn()` when doing a production build.
|
534
|
+
|
535
|
+
@method warn
|
536
|
+
@param {String} message A warning to display.
|
537
|
+
@param {Boolean} test An optional boolean. If falsy, the warning
|
538
|
+
will be displayed.
|
539
|
+
@public
|
540
|
+
*/
|
541
|
+
|
542
|
+
function warn(message, test, options) {
|
543
|
+
if (!options) {
|
544
|
+
_emberMetalCore.default.deprecate(missingOptionsDeprecation, false, { id: 'ember-debug.warn-options-missing', until: '3.0.0' });
|
545
|
+
}
|
546
|
+
|
547
|
+
if (options && !options.id) {
|
548
|
+
_emberMetalCore.default.deprecate(missingOptionsIdDeprecation, false, { id: 'ember-debug.warn-id-missing', until: '3.0.0' });
|
549
|
+
}
|
550
|
+
|
551
|
+
_emberDebugHandlers.invoke.apply(undefined, ['warn'].concat(_slice.call(arguments)));
|
552
|
+
}
|
471
553
|
});
|
472
554
|
enifed('ember-testing', ['exports', 'ember-metal/core', 'ember-testing/initializers', 'ember-testing/support', 'ember-testing/setup_for_testing', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit', 'ember-testing/helpers'], function (exports, _emberMetalCore, _emberTestingInitializers, _emberTestingSupport, _emberTestingSetup_for_testing, _emberTestingTest, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit, _emberTestingHelpers) {
|
473
555
|
'use strict';
|
@@ -1099,7 +1181,7 @@ enifed('ember-testing/initializers', ['exports', 'ember-runtime/system/lazy_load
|
|
1099
1181
|
Application.initializer({
|
1100
1182
|
name: name,
|
1101
1183
|
|
1102
|
-
initialize: function (
|
1184
|
+
initialize: function (application) {
|
1103
1185
|
if (application.testing) {
|
1104
1186
|
application.deferReadiness();
|
1105
1187
|
}
|