ember-source 2.17.0.beta.6 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.17.0-beta.6
9
+ * @version 2.17.0
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -47244,6 +47244,24 @@ enifed('ember-runtime/tests/computed/reduce_computed_macros_test', ['ember-metal
47244
47244
  deepEqual(obj.get('filtered'), [20, 22, 24], 'computed array is updated when array is changed');
47245
47245
  });
47246
47246
 
47247
+ QUnit.test('it updates properly on @each with {} dependencies', function () {
47248
+ var item = _object.default.create({ prop: true });
47249
+
47250
+ obj = _object.default.extend({
47251
+ filtered: (0, _reduce_computed_macros.filter)('items.@each.{prop}', function (item) {
47252
+ return item.get('prop') === true;
47253
+ })
47254
+ }).create({
47255
+ items: (0, _native_array.A)([item])
47256
+ });
47257
+
47258
+ deepEqual(obj.get('filtered'), [item]);
47259
+
47260
+ item.set('prop', false);
47261
+
47262
+ deepEqual(obj.get('filtered'), []);
47263
+ });
47264
+
47247
47265
  QUnit.module('filterBy', {
47248
47266
  setup: function () {
47249
47267
  obj = _object.default.extend({
@@ -47545,7 +47563,7 @@ enifed('ember-runtime/tests/computed/reduce_computed_macros_test', ['ember-metal
47545
47563
  array: (0, _native_array.A)([1, 2, 3, 4, 5, 6, 7]),
47546
47564
  array2: (0, _native_array.A)([3, 4, 5])
47547
47565
  });
47548
- }, /Ember\.computed\.setDiff requires exactly two dependent arrays/, 'setDiff requires two dependent arrays');
47566
+ }, /\`Ember\.computed\.setDiff\` requires exactly two dependent arrays/, 'setDiff requires two dependent arrays');
47549
47567
 
47550
47568
  expectAssertion(function () {
47551
47569
  _object.default.extend({
@@ -47555,7 +47573,7 @@ enifed('ember-runtime/tests/computed/reduce_computed_macros_test', ['ember-metal
47555
47573
  array2: (0, _native_array.A)([3, 4, 5]),
47556
47574
  array3: (0, _native_array.A)([7])
47557
47575
  });
47558
- }, /Ember\.computed\.setDiff requires exactly two dependent arrays/, 'setDiff requires two dependent arrays');
47576
+ }, /\`Ember\.computed\.setDiff\` requires exactly two dependent arrays/, 'setDiff requires two dependent arrays');
47559
47577
  });
47560
47578
 
47561
47579
  QUnit.test('it has set-diff semantics', function () {
@@ -49039,12 +49057,10 @@ enifed('ember-runtime/tests/ext/rsvp_test', ['ember-metal', 'ember-runtime/ext/r
49039
49057
  try {
49040
49058
  (0, _emberMetal.run)(_rsvp.default, 'reject', 'foo');
49041
49059
  } catch (e) {
49042
- ok(false, 'should not throw');
49060
+ equal(e, 'foo', 'should throw with rejection message');
49043
49061
  } finally {
49044
49062
  (0, _emberDebug.setTesting)(wasEmberTesting);
49045
49063
  }
49046
-
49047
- ok(true);
49048
49064
  });
49049
49065
 
49050
49066
  QUnit.test('Can reject with no arguments', function () {
@@ -61389,12 +61405,13 @@ enifed('ember-testing/tests/adapters/qunit_test', ['ember-metal', 'ember-testing
61389
61405
  enifed('ember-testing/tests/adapters_test', ['ember-metal', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit', 'ember-application'], function (_emberMetal, _test, _adapter, _qunit, _emberApplication) {
61390
61406
  'use strict';
61391
61407
 
61392
- var App, originalAdapter, originalQUnit;
61408
+ var App, originalAdapter, originalQUnit, originalWindowOnerror;
61393
61409
 
61394
61410
  QUnit.module('ember-testing Adapters', {
61395
61411
  setup: function () {
61396
61412
  originalAdapter = _test.default.adapter;
61397
61413
  originalQUnit = window.QUnit;
61414
+ originalWindowOnerror = window.onerror;
61398
61415
  },
61399
61416
  teardown: function () {
61400
61417
  if (App) {
@@ -61405,6 +61422,7 @@ enifed('ember-testing/tests/adapters_test', ['ember-metal', 'ember-testing/test'
61405
61422
 
61406
61423
  _test.default.adapter = originalAdapter;
61407
61424
  window.QUnit = originalQUnit;
61425
+ window.onerror = originalWindowOnerror;
61408
61426
  }
61409
61427
  });
61410
61428
 
@@ -61454,21 +61472,27 @@ enifed('ember-testing/tests/adapters_test', ['ember-metal', 'ember-testing/test'
61454
61472
  ok(!(_test.default.adapter instanceof _qunit.default));
61455
61473
  });
61456
61474
 
61457
- QUnit.test('With Ember.Test.adapter set, errors in Ember.run are caught', function () {
61475
+ QUnit.test('With Ember.Test.adapter set, errors in synchronous Ember.run are bubbled out', function (assert) {
61458
61476
  var thrown = new Error('Boom!');
61459
61477
 
61460
- var caught = void 0;
61478
+ var caughtInAdapter = void 0,
61479
+ caughtInCatch = void 0;
61461
61480
  _test.default.adapter = _qunit.default.create({
61462
61481
  exception: function (error) {
61463
- caught = error;
61482
+ caughtInAdapter = error;
61464
61483
  }
61465
61484
  });
61466
61485
 
61467
- (0, _emberMetal.run)(function () {
61468
- throw thrown;
61469
- });
61486
+ try {
61487
+ (0, _emberMetal.run)(function () {
61488
+ throw thrown;
61489
+ });
61490
+ } catch (e) {
61491
+ caughtInCatch = e;
61492
+ }
61470
61493
 
61471
- deepEqual(caught, thrown);
61494
+ assert.equal(caughtInAdapter, undefined, 'test adapter should never receive synchronous errors');
61495
+ assert.equal(caughtInCatch, thrown, 'a "normal" try/catch should catch errors in sync run');
61472
61496
  });
61473
61497
  });
61474
61498
  enifed('ember-testing/tests/ext/rsvp_test', ['ember-testing/ext/rsvp', 'ember-testing/test/adapter', 'ember-testing/test/promise', 'ember-metal', 'ember-debug'], function (_rsvp, _adapter, _promise, _emberMetal, _emberDebug) {
@@ -64054,57 +64078,309 @@ enifed('ember/tests/error_handler_test', ['ember', 'ember-metal'], function (_em
64054
64078
  var ADAPTER = _ember.default.Test && _ember.default.Test.adapter;
64055
64079
  var TESTING = _ember.default.testing;
64056
64080
 
64081
+ var WINDOW_ONERROR = void 0;
64082
+
64057
64083
  QUnit.module('error_handler', {
64084
+ setup: function () {
64085
+ // capturing this outside of module scope to ensure we grab
64086
+ // the test frameworks own window.onerror to reset it
64087
+ WINDOW_ONERROR = window.onerror;
64088
+ },
64058
64089
  teardown: function () {
64059
64090
  _ember.default.onerror = ONERROR;
64060
64091
  _ember.default.testing = TESTING;
64092
+ window.onerror = WINDOW_ONERROR;
64061
64093
  if (_ember.default.Test) {
64062
64094
  _ember.default.Test.adapter = ADAPTER;
64063
64095
  }
64064
64096
  }
64065
64097
  });
64066
64098
 
64067
- function runThatThrows(message) {
64099
+ function runThatThrowsSync() {
64100
+ var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Error for testing error handling';
64101
+
64068
64102
  return (0, _emberMetal.run)(function () {
64069
64103
  throw new Error(message);
64070
64104
  });
64071
64105
  }
64072
64106
 
64073
- test('by default there is no onerror', function (assert) {
64074
- _ember.default.onerror = undefined;
64075
- assert.throws(runThatThrows, Error);
64076
- assert.equal(_ember.default.onerror, undefined);
64107
+ test('by default there is no onerror - sync run', function (assert) {
64108
+ assert.strictEqual(_ember.default.onerror, undefined, 'precond - there should be no Ember.onerror set by default');
64109
+ assert.throws(runThatThrowsSync, Error, 'errors thrown sync are catchable');
64077
64110
  });
64078
64111
 
64079
- test('when Ember.onerror is registered', function (assert) {
64112
+ test('when Ember.onerror (which rethrows) is registered - sync run', function (assert) {
64080
64113
  assert.expect(2);
64081
64114
  _ember.default.onerror = function (error) {
64082
64115
  assert.ok(true, 'onerror called');
64083
64116
  throw error;
64084
64117
  };
64085
- assert.throws(runThatThrows, Error);
64086
- // Ember.onerror = ONERROR;
64118
+ assert.throws(runThatThrowsSync, Error, 'error is thrown');
64119
+ });
64120
+
64121
+ test('when Ember.onerror (which does not rethrow) is registered - sync run', function (assert) {
64122
+ assert.expect(2);
64123
+ _ember.default.onerror = function () {
64124
+ assert.ok(true, 'onerror called');
64125
+ };
64126
+ runThatThrowsSync();
64127
+ assert.ok(true, 'no error was thrown, Ember.onerror can intercept errors');
64087
64128
  });
64088
64129
 
64089
- QUnit.test('Ember.run does not swallow exceptions by default (Ember.testing = true)', function () {
64130
+ QUnit.test('does not swallow exceptions by default (Ember.testing = true, no Ember.onerror) - sync run', function (assert) {
64090
64131
  _ember.default.testing = true;
64132
+
64091
64133
  var error = new Error('the error');
64092
- throws(function () {
64134
+ assert.throws(function () {
64093
64135
  _ember.default.run(function () {
64094
64136
  throw error;
64095
64137
  });
64096
64138
  }, error);
64097
64139
  });
64098
64140
 
64099
- QUnit.test('Ember.run does not swallow exceptions by default (Ember.testing = false)', function () {
64141
+ QUnit.test('does not swallow exceptions by default (Ember.testing = false, no Ember.onerror) - sync run', function (assert) {
64100
64142
  _ember.default.testing = false;
64101
64143
  var error = new Error('the error');
64102
- throws(function () {
64144
+ assert.throws(function () {
64145
+ _ember.default.run(function () {
64146
+ throw error;
64147
+ });
64148
+ }, error);
64149
+ });
64150
+
64151
+ QUnit.test('does not swallow exceptions (Ember.testing = false, Ember.onerror which rethrows) - sync run', function (assert) {
64152
+ assert.expect(2);
64153
+ _ember.default.testing = false;
64154
+
64155
+ _ember.default.onerror = function (error) {
64156
+ assert.ok(true, 'Ember.onerror was called');
64157
+ throw error;
64158
+ };
64159
+
64160
+ var error = new Error('the error');
64161
+ assert.throws(function () {
64103
64162
  _ember.default.run(function () {
64104
64163
  throw error;
64105
64164
  });
64106
64165
  }, error);
64107
64166
  });
64167
+
64168
+ QUnit.test('Ember.onerror can intercept errors (aka swallow) by not rethrowing (Ember.testing = false) - sync run', function (assert) {
64169
+ assert.expect(1);
64170
+ _ember.default.testing = false;
64171
+
64172
+ _ember.default.onerror = function () {
64173
+ assert.ok(true, 'Ember.onerror was called');
64174
+ };
64175
+
64176
+ var error = new Error('the error');
64177
+ try {
64178
+ _ember.default.run(function () {
64179
+ throw error;
64180
+ });
64181
+ } catch (e) {
64182
+ assert.notOk(true, 'Ember.onerror that does not rethrow is intentionally swallowing errors, try / catch wrapping does not see error');
64183
+ }
64184
+ });
64185
+
64186
+ QUnit.test('does not swallow exceptions by default (Ember.testing = true, no Ember.onerror) - async run', function (assert) {
64187
+ var done = assert.async();
64188
+ var caughtByWindowOnerror = void 0;
64189
+
64190
+ _ember.default.testing = true;
64191
+
64192
+ window.onerror = function (message) {
64193
+ caughtByWindowOnerror = message;
64194
+ // prevent "bubbling" and therefore failing the test
64195
+ return true;
64196
+ };
64197
+
64198
+ _ember.default.run.later(function () {
64199
+ throw new Error('the error');
64200
+ }, 10);
64201
+
64202
+ setTimeout(function () {
64203
+ assert.pushResult({
64204
+ result: /the error/.test(caughtByWindowOnerror),
64205
+ actual: caughtByWindowOnerror,
64206
+ expected: 'to include `the error`',
64207
+ message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'
64208
+ });
64209
+
64210
+ done();
64211
+ }, 20);
64212
+ });
64213
+
64214
+ QUnit.test('does not swallow exceptions by default (Ember.testing = false, no Ember.onerror) - async run', function (assert) {
64215
+ var done = assert.async();
64216
+ var caughtByWindowOnerror = void 0;
64217
+
64218
+ _ember.default.testing = false;
64219
+
64220
+ window.onerror = function (message) {
64221
+ caughtByWindowOnerror = message;
64222
+ // prevent "bubbling" and therefore failing the test
64223
+ return true;
64224
+ };
64225
+
64226
+ _ember.default.run.later(function () {
64227
+ throw new Error('the error');
64228
+ }, 10);
64229
+
64230
+ setTimeout(function () {
64231
+ assert.pushResult({
64232
+ result: /the error/.test(caughtByWindowOnerror),
64233
+ actual: caughtByWindowOnerror,
64234
+ expected: 'to include `the error`',
64235
+ message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'
64236
+ });
64237
+
64238
+ done();
64239
+ }, 20);
64240
+ });
64241
+
64242
+ QUnit.test('Ember.onerror can intercept errors (aka swallow) by not rethrowing (Ember.testing = false) - async run', function (assert) {
64243
+ var done = assert.async();
64244
+
64245
+ _ember.default.testing = false;
64246
+
64247
+ window.onerror = function () {
64248
+ assert.notOk(true, 'window.onerror is never invoked when Ember.onerror intentionally swallows errors');
64249
+ // prevent "bubbling" and therefore failing the test
64250
+ return true;
64251
+ };
64252
+
64253
+ var thrown = new Error('the error');
64254
+ _ember.default.onerror = function (error) {
64255
+ assert.strictEqual(error, thrown, 'Ember.onerror is called with the error');
64256
+ };
64257
+
64258
+ _ember.default.run.later(function () {
64259
+ throw thrown;
64260
+ }, 10);
64261
+
64262
+ setTimeout(done, 20);
64263
+ });
64264
+
64265
+ function generateRSVPErrorHandlingTests(message, generatePromise) {
64266
+ var timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
64267
+
64268
+ test(message + ' when Ember.onerror which does not rethrow is present - rsvp', function (assert) {
64269
+ assert.expect(1);
64270
+
64271
+ var thrown = new Error('the error');
64272
+ _ember.default.onerror = function (error) {
64273
+ assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises');
64274
+ };
64275
+
64276
+ generatePromise(thrown);
64277
+
64278
+ // RSVP.Promise's are configured to settle within the run loop, this
64279
+ // ensures that run loop has completed
64280
+ return new _ember.default.RSVP.Promise(function (resolve) {
64281
+ return setTimeout(resolve, timeout);
64282
+ });
64283
+ });
64284
+
64285
+ test(message + ' when Ember.onerror which does rethrow is present - rsvp', function (assert) {
64286
+ assert.expect(2);
64287
+
64288
+ var thrown = new Error('the error');
64289
+ _ember.default.onerror = function (error) {
64290
+ assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises');
64291
+ throw error;
64292
+ };
64293
+
64294
+ window.onerror = function (message) {
64295
+ assert.pushResult({
64296
+ result: /the error/.test(message),
64297
+ actual: message,
64298
+ expected: 'to include `the error`',
64299
+ message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'
64300
+ });
64301
+
64302
+ // prevent "bubbling" and therefore failing the test
64303
+ return true;
64304
+ };
64305
+
64306
+ generatePromise(thrown);
64307
+
64308
+ // RSVP.Promise's are configured to settle within the run loop, this
64309
+ // ensures that run loop has completed
64310
+ return new _ember.default.RSVP.Promise(function (resolve) {
64311
+ return setTimeout(resolve, timeout);
64312
+ });
64313
+ });
64314
+
64315
+ test(message + ' when Ember.onerror which does not rethrow is present (Ember.testing = false) - rsvp', function (assert) {
64316
+ assert.expect(1);
64317
+
64318
+ _ember.default.testing = false;
64319
+ var thrown = new Error('the error');
64320
+ _ember.default.onerror = function (error) {
64321
+ assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises');
64322
+ };
64323
+
64324
+ generatePromise(thrown);
64325
+
64326
+ // RSVP.Promise's are configured to settle within the run loop, this
64327
+ // ensures that run loop has completed
64328
+ return new _ember.default.RSVP.Promise(function (resolve) {
64329
+ return setTimeout(resolve, timeout);
64330
+ });
64331
+ });
64332
+
64333
+ test(message + ' when Ember.onerror which does rethrow is present (Ember.testing = false) - rsvp', function (assert) {
64334
+ assert.expect(2);
64335
+
64336
+ _ember.default.testing = false;
64337
+ var thrown = new Error('the error');
64338
+ _ember.default.onerror = function (error) {
64339
+ assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises');
64340
+ throw error;
64341
+ };
64342
+
64343
+ window.onerror = function (message) {
64344
+ assert.pushResult({
64345
+ result: /the error/.test(message),
64346
+ actual: message,
64347
+ expected: 'to include `the error`',
64348
+ message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'
64349
+ });
64350
+
64351
+ // prevent "bubbling" and therefore failing the test
64352
+ return true;
64353
+ };
64354
+
64355
+ generatePromise(thrown);
64356
+
64357
+ // RSVP.Promise's are configured to settle within the run loop, this
64358
+ // ensures that run loop has completed
64359
+ return new _ember.default.RSVP.Promise(function (resolve) {
64360
+ return setTimeout(resolve, timeout);
64361
+ });
64362
+ });
64363
+ }
64364
+
64365
+ generateRSVPErrorHandlingTests('errors in promise constructor', function (error) {
64366
+ new _ember.default.RSVP.Promise(function () {
64367
+ throw error;
64368
+ });
64369
+ });
64370
+
64371
+ generateRSVPErrorHandlingTests('errors in promise .then callback', function (error) {
64372
+ _ember.default.RSVP.resolve().then(function () {
64373
+ throw error;
64374
+ });
64375
+ });
64376
+
64377
+ generateRSVPErrorHandlingTests('errors in async promise .then callback', function (error) {
64378
+ new _ember.default.RSVP.Promise(function (resolve) {
64379
+ return setTimeout(resolve, 10);
64380
+ }).then(function () {
64381
+ throw error;
64382
+ });
64383
+ }, 20);
64108
64384
  });
64109
64385
  enifed('ember/tests/global-api-test', ['ember-metal', 'ember-runtime'], function (_emberMetal, _emberRuntime) {
64110
64386
  'use strict';
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.17.0-beta.6
9
+ * @version 2.17.0
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -9646,13 +9646,10 @@ enifed('backburner', ['exports', 'ember-babel'], function (exports, _emberBabel)
9646
9646
  }
9647
9647
  }
9648
9648
  }
9649
- var onError = getOnError(this.options);
9650
- if (onError) {
9651
- try {
9652
- return method.apply(target, args);
9653
- } catch (error) {
9654
- onError(error);
9655
- }
9649
+ if (length === 1) {
9650
+ return method();
9651
+ } else if (length === 2) {
9652
+ return method.call(target);
9656
9653
  } else {
9657
9654
  return method.apply(target, args);
9658
9655
  }
@@ -26829,22 +26826,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26829
26826
  cache = {};
26830
26827
  }
26831
26828
 
26832
- // To maintain stacktrace consistency across browsers
26833
- var getStack = function (error) {
26834
- var stack = error.stack;
26835
- var message = error.message;
26836
-
26837
- if (stack && stack.indexOf(message) === -1) {
26838
- stack = message + '\n' + stack;
26839
- }
26840
-
26841
- return stack;
26842
- };
26843
-
26844
26829
  var onerror = void 0;
26845
26830
  var onErrorTarget = {
26846
26831
  get onerror() {
26847
- return dispatchOverride || onerror;
26832
+ return onerror;
26848
26833
  }
26849
26834
  };
26850
26835
 
@@ -26858,14 +26843,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26858
26843
  }
26859
26844
 
26860
26845
  var dispatchOverride = void 0;
26861
- // dispatch error
26862
- function dispatchError(error) {
26863
- if (dispatchOverride) {
26864
- dispatchOverride(error);
26865
- } else {
26866
- defaultDispatch(error);
26867
- }
26868
- }
26869
26846
 
26870
26847
  // allows testing adapter to override dispatch
26871
26848
  function getDispatchOverride() {
@@ -26875,17 +26852,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26875
26852
  dispatchOverride = handler;
26876
26853
  }
26877
26854
 
26878
- function defaultDispatch(error) {
26879
- if (emberDebug.isTesting()) {
26880
- throw error;
26881
- }
26882
- if (onerror) {
26883
- onerror(error);
26884
- } else {
26885
- Logger.error(getStack(error));
26886
- }
26887
- }
26888
-
26889
26855
  /**
26890
26856
  @module @ember/utils
26891
26857
  */
@@ -30046,7 +30012,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
30046
30012
  exports.instrumentationUnsubscribe = unsubscribe;
30047
30013
  exports.getOnerror = getOnerror;
30048
30014
  exports.setOnerror = setOnerror;
30049
- exports.dispatchError = dispatchError;
30050
30015
  exports.setDispatchOverride = setDispatchOverride;
30051
30016
  exports.getDispatchOverride = getDispatchOverride;
30052
30017
  exports.META_DESC = META_DESC;
@@ -35667,7 +35632,10 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
35667
35632
  @module @ember/object
35668
35633
  */
35669
35634
 
35670
- function reduceMacro(dependentKey, callback, initialValue) {
35635
+ function reduceMacro(dependentKey, callback, initialValue, name) {
35636
+ (true && !(!/[\[\]\{\}]/g.test(dependentKey)) && (0, _emberDebug.assert)('Dependent key passed to `Ember.computed.' + name + '` shouldn\'t contain brace expanding pattern.', !/[\[\]\{\}]/g.test(dependentKey)));
35637
+
35638
+
35671
35639
  var cp = new _emberMetal.ComputedProperty(function () {
35672
35640
  var arr = (0, _emberMetal.get)(this, dependentKey);
35673
35641
  if (arr === null || typeof arr !== 'object') {
@@ -35696,12 +35664,20 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
35696
35664
  } else {
35697
35665
  return (0, _native_array.A)();
35698
35666
  }
35699
- }, { dependentKeys: [dependentKey], readOnly: true });
35667
+ }, { readOnly: true });
35668
+
35669
+ cp.property(dependentKey); // this forces to expand properties GH #15855
35700
35670
 
35701
35671
  return cp;
35702
35672
  }
35703
35673
 
35704
- function multiArrayMacro(_dependentKeys, callback) {
35674
+ function multiArrayMacro(_dependentKeys, callback, name) {
35675
+ (true && !(_dependentKeys.every(function (dependentKey) {
35676
+ return !/[\[\]\{\}]/g.test(dependentKey);
35677
+ })) && (0, _emberDebug.assert)('Dependent keys passed to `Ember.computed.' + name + '` shouldn\'t contain brace expanding pattern.', _dependentKeys.every(function (dependentKey) {
35678
+ return !/[\[\]\{\}]/g.test(dependentKey);
35679
+ })));
35680
+
35705
35681
  var dependentKeys = _dependentKeys.map(function (key) {
35706
35682
  return key + '.[]';
35707
35683
  });
@@ -35728,7 +35704,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
35728
35704
  function sum(dependentKey) {
35729
35705
  return reduceMacro(dependentKey, function (sum, item) {
35730
35706
  return sum + item;
35731
- }, 0);
35707
+ }, 0, 'sum');
35732
35708
  }
35733
35709
 
35734
35710
  /**
@@ -35776,7 +35752,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
35776
35752
  function max(dependentKey) {
35777
35753
  return reduceMacro(dependentKey, function (max, item) {
35778
35754
  return Math.max(max, item);
35779
- }, -Infinity);
35755
+ }, -Infinity, 'max');
35780
35756
  }
35781
35757
 
35782
35758
  /**
@@ -35824,7 +35800,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
35824
35800
  function min(dependentKey) {
35825
35801
  return reduceMacro(dependentKey, function (min, item) {
35826
35802
  return Math.min(min, item);
35827
- }, Infinity);
35803
+ }, Infinity, 'min');
35828
35804
  }
35829
35805
 
35830
35806
  /**
@@ -35900,7 +35876,8 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
35900
35876
  @public
35901
35877
  */
35902
35878
  function mapBy(dependentKey, propertyKey) {
35903
- (true && !(typeof propertyKey === 'string') && (0, _emberDebug.assert)('Ember.computed.mapBy expects a property string for its second argument, ' + 'perhaps you meant to use "map"', typeof propertyKey === 'string'));
35879
+ (true && !(typeof propertyKey === 'string') && (0, _emberDebug.assert)('\`Ember.computed.mapBy\` expects a property string for its second argument, ' + 'perhaps you meant to use "map"', typeof propertyKey === 'string'));
35880
+ (true && !(!/[\[\]\{\}]/g.test(dependentKey)) && (0, _emberDebug.assert)('Dependent key passed to `Ember.computed.mapBy` shouldn\'t contain brace expanding pattern.', !/[\[\]\{\}]/g.test(dependentKey)));
35904
35881
 
35905
35882
 
35906
35883
  return map(dependentKey + '.@each.' + propertyKey, function (item) {
@@ -36003,8 +35980,10 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
36003
35980
  @public
36004
35981
  */
36005
35982
  function filterBy(dependentKey, propertyKey, value) {
36006
- var callback = void 0;
35983
+ (true && !(!/[\[\]\{\}]/g.test(dependentKey)) && (0, _emberDebug.assert)('Dependent key passed to `Ember.computed.filterBy` shouldn\'t contain brace expanding pattern.', !/[\[\]\{\}]/g.test(dependentKey)));
35984
+
36007
35985
 
35986
+ var callback = void 0;
36008
35987
  if (arguments.length === 2) {
36009
35988
  callback = function (item) {
36010
35989
  return (0, _emberMetal.get)(item, propertyKey);
@@ -36071,7 +36050,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
36071
36050
  });
36072
36051
 
36073
36052
  return uniq;
36074
- });
36053
+ }, 'uniq');
36075
36054
  }
36076
36055
 
36077
36056
  /**
@@ -36105,6 +36084,9 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
36105
36084
  @public
36106
36085
  */
36107
36086
  function uniqBy(dependentKey, propertyKey) {
36087
+ (true && !(!/[\[\]\{\}]/g.test(dependentKey)) && (0, _emberDebug.assert)('Dependent key passed to `Ember.computed.uniqBy` shouldn\'t contain brace expanding pattern.', !/[\[\]\{\}]/g.test(dependentKey)));
36088
+
36089
+
36108
36090
  var cp = new _emberMetal.ComputedProperty(function () {
36109
36091
  var uniq = (0, _native_array.A)();
36110
36092
  var seen = Object.create(null);
@@ -36218,7 +36200,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
36218
36200
  }
36219
36201
 
36220
36202
  return true;
36221
- });
36203
+ }, 'intersect');
36222
36204
 
36223
36205
  return (0, _native_array.A)(results);
36224
36206
  });
@@ -36258,7 +36240,8 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
36258
36240
  @public
36259
36241
  */
36260
36242
  function setDiff(setAProperty, setBProperty) {
36261
- (true && !(arguments.length === 2) && (0, _emberDebug.assert)('Ember.computed.setDiff requires exactly two dependent arrays.', arguments.length === 2));
36243
+ (true && !(arguments.length === 2) && (0, _emberDebug.assert)('\`Ember.computed.setDiff\` requires exactly two dependent arrays.', arguments.length === 2));
36244
+ (true && !(!/[\[\]\{\}]/g.test(setAProperty) && !/[\[\]\{\}]/g.test(setBProperty)) && (0, _emberDebug.assert)('Dependent keys passed to `Ember.computed.setDiff` shouldn\'t contain brace expanding pattern.', !/[\[\]\{\}]/g.test(setAProperty) && !/[\[\]\{\}]/g.test(setBProperty)));
36262
36245
 
36263
36246
 
36264
36247
  var cp = new _emberMetal.ComputedProperty(function () {
@@ -36328,7 +36311,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
36328
36311
  }
36329
36312
  }
36330
36313
  return res;
36331
- });
36314
+ }, 'collect');
36332
36315
  }
36333
36316
 
36334
36317
  /**
@@ -36398,7 +36381,7 @@ enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-utils
36398
36381
  @public
36399
36382
  */
36400
36383
  function sort(itemsKey, sortDefinition) {
36401
- (true && !(arguments.length === 2) && (0, _emberDebug.assert)('Ember.computed.sort requires two arguments: an array key to sort and ' + 'either a sort properties key or sort function', arguments.length === 2));
36384
+ (true && !(arguments.length === 2) && (0, _emberDebug.assert)('\`Ember.computed.sort\` requires two arguments: an array key to sort and ' + 'either a sort properties key or sort function', arguments.length === 2));
36402
36385
 
36403
36386
 
36404
36387
  if (typeof sortDefinition === 'function') {
@@ -36833,7 +36816,12 @@ enifed('ember-runtime/ext/rsvp', ['exports', 'rsvp', 'ember-metal', 'ember-debug
36833
36816
  function onerrorDefault(reason) {
36834
36817
  var error = errorFor(reason);
36835
36818
  if (error) {
36836
- (0, _emberMetal.dispatchError)(error);
36819
+ var overrideDispatch = (0, _emberMetal.getDispatchOverride)();
36820
+ if (overrideDispatch) {
36821
+ overrideDispatch(error);
36822
+ } else {
36823
+ throw error;
36824
+ }
36837
36825
  }
36838
36826
  }
36839
36827
 
@@ -44913,7 +44901,7 @@ enifed('ember-testing/test/adapter', ['exports', 'ember-console', 'ember-metal']
44913
44901
 
44914
44902
  function setAdapter(value) {
44915
44903
  adapter = value;
44916
- if (value) {
44904
+ if (value && typeof value.exception === 'function') {
44917
44905
  (0, _emberMetal.setDispatchOverride)(adapterDispatch);
44918
44906
  } else {
44919
44907
  (0, _emberMetal.setDispatchOverride)(null);
@@ -48509,7 +48497,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
48509
48497
  enifed("ember/version", ["exports"], function (exports) {
48510
48498
  "use strict";
48511
48499
 
48512
- exports.default = "2.17.0-beta.6";
48500
+ exports.default = "2.17.0";
48513
48501
  });
48514
48502
  enifed("handlebars", ["exports"], function (exports) {
48515
48503
  "use strict";