ember-source 2.12.1 → 2.12.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8daaa463e0ae707d9a7109d0570606ee255fcb6f
4
- data.tar.gz: 885fd6dd66958536b6e8a17a030bcf4c8475cfb1
3
+ metadata.gz: 3d6d45897f60970574ce57ee7d6e5736b189280d
4
+ data.tar.gz: f4b7f9bd3571870e2769fec4204c5f912edb6ac8
5
5
  SHA512:
6
- metadata.gz: a3df93223b3d79963d88ff2754ec35ecd8292bdf2ca2e075cf80779f83c4b24dceee01518f00deb349c2f8856ebae4b2d23b5fbfdfd667a8a026b6d1853f4434
7
- data.tar.gz: f3e662d99ce3d35d1a66bbfb2d3c75c892328172061fa647b5609871c87abf9487b0332c9a32108aea4134adbcee1bad4930e5d20009fbad627d94f42f1a267b
6
+ metadata.gz: 183c60f610cce6d37afca93d4d9982021a89e20b829846b29b3d017844ff3ef5d649b25d3110cfb7ee87dd7a313cd29dd84c56b449d5be07703dabe073ebbded
7
+ data.tar.gz: 04b32112ba851a5265ecf386fb1472b39068b4b92c0946a93efe776e6fb6fecfeb585a1ce41792cada37fcdd25704061f40f7e61ff1c1d1ca92d5477bb56d3d3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.12.1
1
+ 2.12.2
@@ -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.12.1
9
+ * @version 2.12.2
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -1562,28 +1562,34 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1562
1562
  }
1563
1563
 
1564
1564
  function buildInjections() /* container, ...injections */{
1565
+ var _arguments = arguments;
1566
+
1565
1567
  var hash = {};
1566
1568
 
1567
1569
  if (arguments.length > 1) {
1568
- var container = arguments[0];
1569
- var injections = [];
1570
- var injection = undefined;
1570
+ (function () {
1571
+ var container = _arguments[0];
1572
+ var injections = [];
1573
+ var injection = undefined;
1571
1574
 
1572
- for (var i = 1; i < arguments.length; i++) {
1573
- if (arguments[i]) {
1574
- injections = injections.concat(arguments[i]);
1575
+ for (var i = 1; i < _arguments.length; i++) {
1576
+ if (_arguments[i]) {
1577
+ injections = injections.concat(_arguments[i]);
1578
+ }
1575
1579
  }
1576
- }
1577
1580
 
1578
- container.registry.validateInjections(injections);
1581
+ _emberMetal.runInDebug(function () {
1582
+ return container.registry.validateInjections(injections);
1583
+ });
1579
1584
 
1580
- for (var i = 0; i < injections.length; i++) {
1581
- injection = injections[i];
1582
- hash[injection.property] = lookup(container, injection.fullName);
1583
- if (!isSingleton(container, injection.fullName)) {
1584
- markInjectionsAsDynamic(hash);
1585
+ for (var i = 0; i < injections.length; i++) {
1586
+ injection = injections[i];
1587
+ hash[injection.property] = lookup(container, injection.fullName);
1588
+ if (!isSingleton(container, injection.fullName)) {
1589
+ markInjectionsAsDynamic(hash);
1590
+ }
1585
1591
  }
1586
- }
1592
+ })();
1587
1593
  }
1588
1594
 
1589
1595
  return hash;
@@ -1727,27 +1733,29 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1727
1733
  return factoryInjections;
1728
1734
  }
1729
1735
 
1736
+ var INJECTED_DEPRECATED_CONTAINER_DESC = {
1737
+ configurable: true,
1738
+ enumerable: false,
1739
+ get: function () {
1740
+ _emberMetal.deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper instead to access the owner of this object.', false, { id: 'ember-application.injected-container', until: '2.13.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
1741
+ return this[CONTAINER_OVERRIDE] || _emberUtils.getOwner(this).__container__;
1742
+ },
1743
+
1744
+ set: function (value) {
1745
+ _emberMetal.deprecate('Providing the `container` property to ' + this + ' is deprecated. Please use `Ember.setOwner` or `owner.ownerInjection()` instead to provide an owner to the instance being created.', false, { id: 'ember-application.injected-container', until: '2.13.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
1746
+
1747
+ this[CONTAINER_OVERRIDE] = value;
1748
+
1749
+ return value;
1750
+ }
1751
+ };
1752
+
1730
1753
  // TODO - remove when Ember reaches v3.0.0
1731
1754
  function injectDeprecatedContainer(object, container) {
1732
1755
  if ('container' in object) {
1733
1756
  return;
1734
1757
  }
1735
- Object.defineProperty(object, 'container', {
1736
- configurable: true,
1737
- enumerable: false,
1738
- get: function () {
1739
- _emberMetal.deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper instead to access the owner of this object.', false, { id: 'ember-application.injected-container', until: '3.0.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
1740
- return this[CONTAINER_OVERRIDE] || container;
1741
- },
1742
-
1743
- set: function (value) {
1744
- _emberMetal.deprecate('Providing the `container` property to ' + this + ' is deprecated. Please use `Ember.setOwner` or `owner.ownerInjection()` instead to provide an owner to the instance being created.', false, { id: 'ember-application.injected-container', until: '3.0.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
1745
-
1746
- this[CONTAINER_OVERRIDE] = value;
1747
-
1748
- return value;
1749
- }
1750
- });
1758
+ Object.defineProperty(object, 'container', INJECTED_DEPRECATED_CONTAINER_DESC);
1751
1759
  }
1752
1760
 
1753
1761
  function eachDestroyable(container, callback) {
@@ -1806,7 +1814,7 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1806
1814
  return function () {
1807
1815
  _emberMetal.deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper to access the owner of this object and then call `' + ownerProperty + '` instead.', false, {
1808
1816
  id: 'ember-application.injected-container',
1809
- until: '3.0.0',
1817
+ until: '2.13.0',
1810
1818
  url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access'
1811
1819
  });
1812
1820
  return container[containerProperty].apply(container, arguments);
@@ -4973,7 +4981,7 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
4973
4981
  var stack = error.stack;
4974
4982
  var message = error.message;
4975
4983
 
4976
- if (stack && !stack.includes(message)) {
4984
+ if (stack && stack.indexOf(message) === -1) {
4977
4985
  stack = message + '\n' + stack;
4978
4986
  }
4979
4987
 
@@ -19809,7 +19817,7 @@ enifed("ember/features", ["exports"], function (exports) {
19809
19817
  enifed("ember/version", ["exports"], function (exports) {
19810
19818
  "use strict";
19811
19819
 
19812
- exports.default = "2.12.1";
19820
+ exports.default = "2.12.2";
19813
19821
  });
19814
19822
  enifed('rsvp', ['exports'], function (exports) {
19815
19823
  '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.12.1
9
+ * @version 2.12.2
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -4009,7 +4009,7 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
4009
4009
  var stack = error.stack;
4010
4010
  var message = error.message;
4011
4011
 
4012
- if (stack && !stack.includes(message)) {
4012
+ if (stack && stack.indexOf(message) === -1) {
4013
4013
  stack = message + '\n' + stack;
4014
4014
  }
4015
4015
 
@@ -12123,7 +12123,7 @@ enifed("ember/features", ["exports"], function (exports) {
12123
12123
  enifed("ember/version", ["exports"], function (exports) {
12124
12124
  "use strict";
12125
12125
 
12126
- exports.default = "2.12.1";
12126
+ exports.default = "2.12.2";
12127
12127
  });
12128
12128
  enifed("glimmer-compiler/index", ["exports", "glimmer-compiler/lib/compiler", "glimmer-compiler/lib/template-visitor"], function (exports, _glimmerCompilerLibCompiler, _glimmerCompilerLibTemplateVisitor) {
12129
12129
  "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.12.1
9
+ * @version 2.12.2
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -2402,6 +2402,9 @@ enifed('ember-testing/test/waiters', ['exports', 'ember-metal'], function (expor
2402
2402
  return array;
2403
2403
  }
2404
2404
  });
2405
- requireModule("ember-testing");
2406
-
2405
+ var testing = requireModule('ember-testing');
2406
+ Ember.Test = testing.Test;
2407
+ Ember.Test.Adapter = testing.Adapter;
2408
+ Ember.Test.QUnitAdapter = testing.QUnitAdapter;
2409
+ Ember.setupForTesting = testing.setupForTesting;
2407
2410
  }());
@@ -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.12.1
9
+ * @version 2.12.2
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -766,8 +766,9 @@ enifed('container/tests/container_test', ['exports', 'ember-utils', 'ember-envir
766
766
  });
767
767
 
768
768
  QUnit.test('A deprecated `container` property is appended to every object instantiated from an extendable factory', function () {
769
+ var owner = {};
769
770
  var registry = new _containerIndex.Registry();
770
- var container = registry.container();
771
+ var container = owner.__container__ = registry.container({ owner: owner });
771
772
  var PostController = _internalTestHelpers.factory();
772
773
  registry.register('controller:post', PostController);
773
774
  var postController = container.lookup('controller:post');
@@ -6850,12 +6851,12 @@ enifed('ember-debug/warn.lint-test', ['exports'], function (exports) {
6850
6851
  });
6851
6852
  });
6852
6853
  enifed('ember-dev/test-helper/assertion', ['exports', 'ember-dev/test-helper/utils'], function (exports, _emberDevTestHelperUtils) {
6853
- /* globals QUnit */
6854
-
6855
6854
  'use strict';
6856
6855
 
6857
6856
  exports.default = AssertionAssert;
6858
6857
 
6858
+ /* globals QUnit */
6859
+
6859
6860
  var BREAK = {};
6860
6861
 
6861
6862
  /**
@@ -6875,19 +6876,18 @@ enifed('ember-dev/test-helper/assertion', ['exports', 'ember-dev/test-helper/uti
6875
6876
  In particular, this prevents `Ember.assert` from throw errors that would
6876
6877
  disrupt the control flow.
6877
6878
  */
6878
-
6879
6879
  function AssertionAssert(env) {
6880
6880
  this.env = env;
6881
6881
  }
6882
6882
 
6883
6883
  AssertionAssert.prototype = {
6884
- reset: function () {},
6885
- assert: function () {},
6884
+ reset: function reset() {},
6885
+ assert: function assert() {},
6886
6886
 
6887
- inject: function () {
6887
+ inject: function inject() {
6888
6888
  var _this = this;
6889
6889
 
6890
- var expectAssertion = function (func, expectedMessage) {
6890
+ var expectAssertion = function expectAssertion(func, expectedMessage) {
6891
6891
  if (_this.env.runningProdBuild) {
6892
6892
  QUnit.ok(true, 'Assertions disabled in production builds.');
6893
6893
  return;
@@ -6916,7 +6916,7 @@ enifed('ember-dev/test-helper/assertion', ['exports', 'ember-dev/test-helper/uti
6916
6916
  assert(sawCall, actualMessage, expectedMessage);
6917
6917
  };
6918
6918
 
6919
- var ignoreAssertion = function (func) {
6919
+ var ignoreAssertion = function ignoreAssertion(func) {
6920
6920
  _emberDevTestHelperUtils.callWithStub(_this.env, 'assert', func);
6921
6921
  };
6922
6922
 
@@ -6924,7 +6924,7 @@ enifed('ember-dev/test-helper/assertion', ['exports', 'ember-dev/test-helper/uti
6924
6924
  window.ignoreAssertion = ignoreAssertion;
6925
6925
  },
6926
6926
 
6927
- restore: function () {
6927
+ restore: function restore() {
6928
6928
  window.expectAssertion = null;
6929
6929
  window.ignoreAssertion = null;
6930
6930
  }
@@ -6953,63 +6953,86 @@ enifed('ember-dev/test-helper/assertion', ['exports', 'ember-dev/test-helper/uti
6953
6953
  enifed('ember-dev/test-helper/debug', ['exports', 'ember-dev/test-helper/method-call-tracker'], function (exports, _emberDevTestHelperMethodCallTracker) {
6954
6954
  'use strict';
6955
6955
 
6956
+ var _createClass = (function () {
6957
+ function defineProperties(target, props) {
6958
+ for (var i = 0; i < props.length; i++) {
6959
+ var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
6960
+ }
6961
+ }return function (Constructor, protoProps, staticProps) {
6962
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
6963
+ };
6964
+ })();
6965
+
6966
+ function _classCallCheck(instance, Constructor) {
6967
+ if (!(instance instanceof Constructor)) {
6968
+ throw new TypeError('Cannot call a class as a function');
6969
+ }
6970
+ }
6971
+
6956
6972
  var DebugAssert = (function () {
6957
6973
  function DebugAssert(methodName, env) {
6958
- babelHelpers.classCallCheck(this, DebugAssert);
6974
+ _classCallCheck(this, DebugAssert);
6959
6975
 
6960
6976
  this.methodName = methodName;
6961
6977
  this.env = env;
6962
6978
  }
6963
6979
 
6964
- DebugAssert.prototype.inject = function inject() {};
6965
-
6966
- DebugAssert.prototype.restore = function restore() {
6967
- this.reset();
6968
- };
6969
-
6970
- DebugAssert.prototype.reset = function reset() {
6971
- if (this.tracker) {
6972
- this.tracker.restoreMethod();
6980
+ _createClass(DebugAssert, [{
6981
+ key: 'inject',
6982
+ value: function inject() {}
6983
+ }, {
6984
+ key: 'restore',
6985
+ value: function restore() {
6986
+ this.reset();
6973
6987
  }
6988
+ }, {
6989
+ key: 'reset',
6990
+ value: function reset() {
6991
+ if (this.tracker) {
6992
+ this.tracker.restoreMethod();
6993
+ }
6974
6994
 
6975
- this.tracker = null;
6976
- };
6977
-
6978
- DebugAssert.prototype.assert = function assert() {
6979
- if (this.tracker) {
6980
- this.tracker.assert();
6995
+ this.tracker = null;
6996
+ }
6997
+ }, {
6998
+ key: 'assert',
6999
+ value: function assert() {
7000
+ if (this.tracker) {
7001
+ this.tracker.assert();
7002
+ }
6981
7003
  }
6982
- };
6983
-
6984
- // Run an expectation callback within the context of a new tracker, optionally
6985
- // accepting a function to run, which asserts immediately
6986
7004
 
6987
- DebugAssert.prototype.runExpectation = function runExpectation(func, callback) {
6988
- var originalTracker = undefined;
7005
+ // Run an expectation callback within the context of a new tracker, optionally
7006
+ // accepting a function to run, which asserts immediately
7007
+ }, {
7008
+ key: 'runExpectation',
7009
+ value: function runExpectation(func, callback) {
7010
+ var originalTracker = undefined;
6989
7011
 
6990
- // When helpers are passed a callback, they get a new tracker context
6991
- if (func) {
6992
- originalTracker = this.tracker;
6993
- this.tracker = null;
6994
- }
7012
+ // When helpers are passed a callback, they get a new tracker context
7013
+ if (func) {
7014
+ originalTracker = this.tracker;
7015
+ this.tracker = null;
7016
+ }
6995
7017
 
6996
- if (!this.tracker) {
6997
- this.tracker = new _emberDevTestHelperMethodCallTracker.default(this.env, this.methodName);
6998
- }
7018
+ if (!this.tracker) {
7019
+ this.tracker = new _emberDevTestHelperMethodCallTracker.default(this.env, this.methodName);
7020
+ }
6999
7021
 
7000
- // Yield to caller with tracker instance
7001
- callback(this.tracker);
7022
+ // Yield to caller with tracker instance
7023
+ callback(this.tracker);
7002
7024
 
7003
- // Once the given callback is invoked, the pending assertions should be
7004
- // flushed immediately
7005
- if (func) {
7006
- func();
7007
- this.assert();
7008
- this.reset();
7025
+ // Once the given callback is invoked, the pending assertions should be
7026
+ // flushed immediately
7027
+ if (func) {
7028
+ func();
7029
+ this.assert();
7030
+ this.reset();
7009
7031
 
7010
- this.tracker = originalTracker;
7032
+ this.tracker = originalTracker;
7033
+ }
7011
7034
  }
7012
- };
7035
+ }]);
7013
7036
 
7014
7037
  return DebugAssert;
7015
7038
  })();
@@ -7019,84 +7042,130 @@ enifed('ember-dev/test-helper/debug', ['exports', 'ember-dev/test-helper/method-
7019
7042
  enifed('ember-dev/test-helper/deprecation', ['exports', 'ember-dev/test-helper/debug', 'ember-dev/test-helper/utils'], function (exports, _emberDevTestHelperDebug, _emberDevTestHelperUtils) {
7020
7043
  'use strict';
7021
7044
 
7045
+ var _createClass = (function () {
7046
+ function defineProperties(target, props) {
7047
+ for (var i = 0; i < props.length; i++) {
7048
+ var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
7049
+ }
7050
+ }return function (Constructor, protoProps, staticProps) {
7051
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
7052
+ };
7053
+ })();
7054
+
7055
+ var _get = function get(_x, _x2, _x3) {
7056
+ var _again = true;_function: while (_again) {
7057
+ var object = _x,
7058
+ property = _x2,
7059
+ receiver = _x3;_again = false;if (object === null) object = Function.prototype;var desc = Object.getOwnPropertyDescriptor(object, property);if (desc === undefined) {
7060
+ var parent = Object.getPrototypeOf(object);if (parent === null) {
7061
+ return undefined;
7062
+ } else {
7063
+ _x = parent;_x2 = property;_x3 = receiver;_again = true;desc = parent = undefined;continue _function;
7064
+ }
7065
+ } else if ('value' in desc) {
7066
+ return desc.value;
7067
+ } else {
7068
+ var getter = desc.get;if (getter === undefined) {
7069
+ return undefined;
7070
+ }return getter.call(receiver);
7071
+ }
7072
+ }
7073
+ };
7074
+
7075
+ function _classCallCheck(instance, Constructor) {
7076
+ if (!(instance instanceof Constructor)) {
7077
+ throw new TypeError('Cannot call a class as a function');
7078
+ }
7079
+ }
7080
+
7081
+ function _inherits(subClass, superClass) {
7082
+ if (typeof superClass !== 'function' && superClass !== null) {
7083
+ throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);
7084
+ }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : babelHelpers.defaults(subClass, superClass);
7085
+ }
7086
+
7022
7087
  var DeprecationAssert = (function (_DebugAssert) {
7023
- babelHelpers.inherits(DeprecationAssert, _DebugAssert);
7088
+ _inherits(DeprecationAssert, _DebugAssert);
7024
7089
 
7025
7090
  function DeprecationAssert(env) {
7026
- babelHelpers.classCallCheck(this, DeprecationAssert);
7091
+ _classCallCheck(this, DeprecationAssert);
7027
7092
 
7028
- _DebugAssert.call(this, 'deprecate', env);
7093
+ _get(Object.getPrototypeOf(DeprecationAssert.prototype), 'constructor', this).call(this, 'deprecate', env);
7029
7094
  }
7030
7095
 
7031
- DeprecationAssert.prototype.inject = function inject() {
7032
- var _this = this;
7033
-
7034
- // Expects no deprecation to happen within a function, or if no function is
7035
- // passed, from the time of calling until the end of the test.
7036
- //
7037
- // expectNoDeprecation(function() {
7038
- // fancyNewThing();
7039
- // });
7040
- //
7041
- // expectNoDeprecation();
7042
- // Ember.deprecate("Old And Busted");
7043
- //
7044
- var expectNoDeprecation = function (func) {
7045
- if (typeof func !== 'function') {
7046
- func = null;
7047
- }
7096
+ _createClass(DeprecationAssert, [{
7097
+ key: 'inject',
7098
+ value: function inject() {
7099
+ var _this = this;
7048
7100
 
7049
- _this.runExpectation(func, function (tracker) {
7050
- if (tracker.isExpectingCalls()) {
7051
- throw new Error("expectNoDeprecation was called after expectDeprecation was called!");
7101
+ // Expects no deprecation to happen within a function, or if no function is
7102
+ // passed, from the time of calling until the end of the test.
7103
+ //
7104
+ // expectNoDeprecation(function() {
7105
+ // fancyNewThing();
7106
+ // });
7107
+ //
7108
+ // expectNoDeprecation();
7109
+ // Ember.deprecate("Old And Busted");
7110
+ //
7111
+ var expectNoDeprecation = function expectNoDeprecation(func) {
7112
+ if (typeof func !== 'function') {
7113
+ func = null;
7052
7114
  }
7053
7115
 
7054
- tracker.expectNoCalls();
7055
- });
7056
- };
7116
+ _this.runExpectation(func, function (tracker) {
7117
+ if (tracker.isExpectingCalls()) {
7118
+ throw new Error("expectNoDeprecation was called after expectDeprecation was called!");
7119
+ }
7057
7120
 
7058
- // Expect a deprecation to happen within a function, or if no function
7059
- // is pass, from the time of calling until the end of the test. Can be called
7060
- // multiple times to assert deprecations with different specific messages
7061
- // were fired.
7062
- //
7063
- // expectDeprecation(function() {
7064
- // Ember.deprecate("Old And Busted");
7065
- // }, /* optionalStringOrRegex */);
7066
- //
7067
- // expectDeprecation(/* optionalStringOrRegex */);
7068
- // Ember.deprecate("Old And Busted");
7069
- //
7070
- var expectDeprecation = function (func, message) {
7071
- if (typeof func !== 'function') {
7072
- message = func;
7073
- func = null;
7074
- }
7121
+ tracker.expectNoCalls();
7122
+ });
7123
+ };
7075
7124
 
7076
- _this.runExpectation(func, function (tracker) {
7077
- if (tracker.isExpectingNoCalls()) {
7078
- throw new Error("expectDeprecation was called after expectNoDeprecation was called!");
7125
+ // Expect a deprecation to happen within a function, or if no function
7126
+ // is pass, from the time of calling until the end of the test. Can be called
7127
+ // multiple times to assert deprecations with different specific messages
7128
+ // were fired.
7129
+ //
7130
+ // expectDeprecation(function() {
7131
+ // Ember.deprecate("Old And Busted");
7132
+ // }, /* optionalStringOrRegex */);
7133
+ //
7134
+ // expectDeprecation(/* optionalStringOrRegex */);
7135
+ // Ember.deprecate("Old And Busted");
7136
+ //
7137
+ var expectDeprecation = function expectDeprecation(func, message) {
7138
+ if (typeof func !== 'function') {
7139
+ message = func;
7140
+ func = null;
7079
7141
  }
7080
7142
 
7081
- tracker.expectCall(message);
7082
- });
7083
- };
7143
+ _this.runExpectation(func, function (tracker) {
7144
+ if (tracker.isExpectingNoCalls()) {
7145
+ throw new Error("expectDeprecation was called after expectNoDeprecation was called!");
7146
+ }
7084
7147
 
7085
- var ignoreDeprecation = function (func) {
7086
- _emberDevTestHelperUtils.callWithStub(_this.env, 'deprecate', func);
7087
- };
7148
+ tracker.expectCall(message);
7149
+ });
7150
+ };
7088
7151
 
7089
- window.expectNoDeprecation = expectNoDeprecation;
7090
- window.expectDeprecation = expectDeprecation;
7091
- window.ignoreDeprecation = ignoreDeprecation;
7092
- };
7152
+ var ignoreDeprecation = function ignoreDeprecation(func) {
7153
+ _emberDevTestHelperUtils.callWithStub(_this.env, 'deprecate', func);
7154
+ };
7093
7155
 
7094
- DeprecationAssert.prototype.restore = function restore() {
7095
- _DebugAssert.prototype.restore.call(this);
7096
- window.expectDeprecation = null;
7097
- window.expectNoDeprecation = null;
7098
- window.ignoreDeprecation = null;
7099
- };
7156
+ window.expectNoDeprecation = expectNoDeprecation;
7157
+ window.expectDeprecation = expectDeprecation;
7158
+ window.ignoreDeprecation = ignoreDeprecation;
7159
+ }
7160
+ }, {
7161
+ key: 'restore',
7162
+ value: function restore() {
7163
+ _get(Object.getPrototypeOf(DeprecationAssert.prototype), 'restore', this).call(this);
7164
+ window.expectDeprecation = null;
7165
+ window.expectNoDeprecation = null;
7166
+ window.ignoreDeprecation = null;
7167
+ }
7168
+ }]);
7100
7169
 
7101
7170
  return DeprecationAssert;
7102
7171
  })(_emberDevTestHelperDebug.default);
@@ -7115,7 +7184,7 @@ enifed('ember-dev/test-helper/method-call-tracker', ['exports', 'ember-dev/test-
7115
7184
 
7116
7185
  'use strict';
7117
7186
 
7118
- var MethodCallTracker = function (env, methodName) {
7187
+ var MethodCallTracker = function MethodCallTracker(env, methodName) {
7119
7188
  this._env = env;
7120
7189
  this._methodName = methodName;
7121
7190
  this._isExpectingNoCalls = false;
@@ -7124,7 +7193,7 @@ enifed('ember-dev/test-helper/method-call-tracker', ['exports', 'ember-dev/test-
7124
7193
  };
7125
7194
 
7126
7195
  MethodCallTracker.prototype = {
7127
- stubMethod: function () {
7196
+ stubMethod: function stubMethod() {
7128
7197
  var _this = this;
7129
7198
 
7130
7199
  if (this._originalMethod) {
@@ -7144,31 +7213,31 @@ enifed('ember-dev/test-helper/method-call-tracker', ['exports', 'ember-dev/test-
7144
7213
  });
7145
7214
  },
7146
7215
 
7147
- restoreMethod: function () {
7216
+ restoreMethod: function restoreMethod() {
7148
7217
  if (this._originalMethod) {
7149
7218
  this._env.setDebugFunction(this._methodName, this._originalMethod);
7150
7219
  }
7151
7220
  },
7152
7221
 
7153
- expectCall: function (message) {
7222
+ expectCall: function expectCall(message) {
7154
7223
  this.stubMethod();
7155
7224
  this._expecteds.push(message || /.*/);
7156
7225
  },
7157
7226
 
7158
- expectNoCalls: function () {
7227
+ expectNoCalls: function expectNoCalls() {
7159
7228
  this.stubMethod();
7160
7229
  this._isExpectingNoCalls = true;
7161
7230
  },
7162
7231
 
7163
- isExpectingNoCalls: function () {
7232
+ isExpectingNoCalls: function isExpectingNoCalls() {
7164
7233
  return this._isExpectingNoCalls;
7165
7234
  },
7166
7235
 
7167
- isExpectingCalls: function () {
7236
+ isExpectingCalls: function isExpectingCalls() {
7168
7237
  return !this._isExpectingNoCalls && this._expecteds.length;
7169
7238
  },
7170
7239
 
7171
- assert: function () {
7240
+ assert: function assert() {
7172
7241
  var env = this._env;
7173
7242
  var methodName = this._methodName;
7174
7243
  var isExpectingNoCalls = this._isExpectingNoCalls;
@@ -7242,14 +7311,14 @@ enifed("ember-dev/test-helper/remaining-template", ["exports"], function (export
7242
7311
 
7243
7312
  "use strict";
7244
7313
 
7245
- var RemainingTemplateAssert = function (env) {
7314
+ var RemainingTemplateAssert = function RemainingTemplateAssert(env) {
7246
7315
  this.env = env;
7247
7316
  };
7248
7317
 
7249
7318
  RemainingTemplateAssert.prototype = {
7250
- reset: function () {},
7251
- inject: function () {},
7252
- assert: function () {
7319
+ reset: function reset() {},
7320
+ inject: function inject() {},
7321
+ assert: function assert() {
7253
7322
  if (this.env.Ember && this.env.Ember.TEMPLATES) {
7254
7323
  var templateNames = [],
7255
7324
  name;
@@ -7265,7 +7334,7 @@ enifed("ember-dev/test-helper/remaining-template", ["exports"], function (export
7265
7334
  }
7266
7335
  }
7267
7336
  },
7268
- restore: function () {}
7337
+ restore: function restore() {}
7269
7338
  };
7270
7339
 
7271
7340
  exports.default = RemainingTemplateAssert;
@@ -7275,14 +7344,14 @@ enifed("ember-dev/test-helper/remaining-view", ["exports"], function (exports) {
7275
7344
 
7276
7345
  "use strict";
7277
7346
 
7278
- var RemainingViewAssert = function (env) {
7347
+ var RemainingViewAssert = function RemainingViewAssert(env) {
7279
7348
  this.env = env;
7280
7349
  };
7281
7350
 
7282
7351
  RemainingViewAssert.prototype = {
7283
- reset: function () {},
7284
- inject: function () {},
7285
- assert: function () {
7352
+ reset: function reset() {},
7353
+ inject: function inject() {},
7354
+ assert: function assert() {
7286
7355
  if (this.env.Ember && this.env.Ember.View) {
7287
7356
  var viewIds = [],
7288
7357
  id;
@@ -7298,7 +7367,7 @@ enifed("ember-dev/test-helper/remaining-view", ["exports"], function (exports) {
7298
7367
  }
7299
7368
  }
7300
7369
  },
7301
- restore: function () {}
7370
+ restore: function restore() {}
7302
7371
  };
7303
7372
 
7304
7373
  exports.default = RemainingViewAssert;
@@ -7313,9 +7382,9 @@ enifed("ember-dev/test-helper/run-loop", ["exports"], function (exports) {
7313
7382
  }
7314
7383
 
7315
7384
  RunLoopAssertion.prototype = {
7316
- reset: function () {},
7317
- inject: function () {},
7318
- assert: function () {
7385
+ reset: function reset() {},
7386
+ inject: function inject() {},
7387
+ assert: function assert() {
7319
7388
  var run = this.env.Ember.run;
7320
7389
 
7321
7390
  if (run.currentRunLoop) {
@@ -7330,18 +7399,17 @@ enifed("ember-dev/test-helper/run-loop", ["exports"], function (exports) {
7330
7399
  run.cancelTimers();
7331
7400
  }
7332
7401
  },
7333
- restore: function () {}
7402
+ restore: function restore() {}
7334
7403
  };
7335
7404
 
7336
7405
  exports.default = RunLoopAssertion;
7337
7406
  });
7338
7407
  enifed("ember-dev/test-helper/setup-qunit", ["exports"], function (exports) {
7339
- /* globals QUnit */
7340
-
7341
7408
  "use strict";
7342
7409
 
7343
7410
  exports.default = setupQUnit;
7344
7411
 
7412
+ /* globals QUnit */
7345
7413
  function setupQUnit(assertion, _qunitGlobal) {
7346
7414
  var qunitGlobal = QUnit;
7347
7415
 
@@ -7380,6 +7448,7 @@ enifed('ember-dev/test-helper/utils', ['exports'], function (exports) {
7380
7448
  exports.buildCompositeAssert = buildCompositeAssert;
7381
7449
  exports.callWithStub = callWithStub;
7382
7450
  exports.checkTest = checkTest;
7451
+
7383
7452
  function callForEach(prop, func) {
7384
7453
  return function () {
7385
7454
  for (var i = 0, l = this[prop].length; i < l; i++) {
@@ -7426,84 +7495,130 @@ enifed('ember-dev/test-helper/utils', ['exports'], function (exports) {
7426
7495
  enifed('ember-dev/test-helper/warning', ['exports', 'ember-dev/test-helper/debug', 'ember-dev/test-helper/utils'], function (exports, _emberDevTestHelperDebug, _emberDevTestHelperUtils) {
7427
7496
  'use strict';
7428
7497
 
7498
+ var _createClass = (function () {
7499
+ function defineProperties(target, props) {
7500
+ for (var i = 0; i < props.length; i++) {
7501
+ var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
7502
+ }
7503
+ }return function (Constructor, protoProps, staticProps) {
7504
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
7505
+ };
7506
+ })();
7507
+
7508
+ var _get = function get(_x, _x2, _x3) {
7509
+ var _again = true;_function: while (_again) {
7510
+ var object = _x,
7511
+ property = _x2,
7512
+ receiver = _x3;_again = false;if (object === null) object = Function.prototype;var desc = Object.getOwnPropertyDescriptor(object, property);if (desc === undefined) {
7513
+ var parent = Object.getPrototypeOf(object);if (parent === null) {
7514
+ return undefined;
7515
+ } else {
7516
+ _x = parent;_x2 = property;_x3 = receiver;_again = true;desc = parent = undefined;continue _function;
7517
+ }
7518
+ } else if ('value' in desc) {
7519
+ return desc.value;
7520
+ } else {
7521
+ var getter = desc.get;if (getter === undefined) {
7522
+ return undefined;
7523
+ }return getter.call(receiver);
7524
+ }
7525
+ }
7526
+ };
7527
+
7528
+ function _classCallCheck(instance, Constructor) {
7529
+ if (!(instance instanceof Constructor)) {
7530
+ throw new TypeError('Cannot call a class as a function');
7531
+ }
7532
+ }
7533
+
7534
+ function _inherits(subClass, superClass) {
7535
+ if (typeof superClass !== 'function' && superClass !== null) {
7536
+ throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);
7537
+ }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : babelHelpers.defaults(subClass, superClass);
7538
+ }
7539
+
7429
7540
  var WarningAssert = (function (_DebugAssert) {
7430
- babelHelpers.inherits(WarningAssert, _DebugAssert);
7541
+ _inherits(WarningAssert, _DebugAssert);
7431
7542
 
7432
7543
  function WarningAssert(env) {
7433
- babelHelpers.classCallCheck(this, WarningAssert);
7544
+ _classCallCheck(this, WarningAssert);
7434
7545
 
7435
- _DebugAssert.call(this, 'warn', env);
7546
+ _get(Object.getPrototypeOf(WarningAssert.prototype), 'constructor', this).call(this, 'warn', env);
7436
7547
  }
7437
7548
 
7438
- WarningAssert.prototype.inject = function inject() {
7439
- var _this = this;
7440
-
7441
- // Expects no warning to happen within a function, or if no function is
7442
- // passed, from the time of calling until the end of the test.
7443
- //
7444
- // expectNoWarning(function() {
7445
- // fancyNewThing();
7446
- // });
7447
- //
7448
- // expectNoWarning();
7449
- // Ember.warn("Oh snap, didn't expect that");
7450
- //
7451
- var expectNoWarning = function (func) {
7452
- if (typeof func !== 'function') {
7453
- func = null;
7454
- }
7549
+ _createClass(WarningAssert, [{
7550
+ key: 'inject',
7551
+ value: function inject() {
7552
+ var _this = this;
7455
7553
 
7456
- _this.runExpectation(func, function (tracker) {
7457
- if (tracker.isExpectingCalls()) {
7458
- throw new Error("expectNoWarning was called after expectWarning was called!");
7554
+ // Expects no warning to happen within a function, or if no function is
7555
+ // passed, from the time of calling until the end of the test.
7556
+ //
7557
+ // expectNoWarning(function() {
7558
+ // fancyNewThing();
7559
+ // });
7560
+ //
7561
+ // expectNoWarning();
7562
+ // Ember.warn("Oh snap, didn't expect that");
7563
+ //
7564
+ var expectNoWarning = function expectNoWarning(func) {
7565
+ if (typeof func !== 'function') {
7566
+ func = null;
7459
7567
  }
7460
7568
 
7461
- tracker.expectNoCalls();
7462
- });
7463
- };
7569
+ _this.runExpectation(func, function (tracker) {
7570
+ if (tracker.isExpectingCalls()) {
7571
+ throw new Error("expectNoWarning was called after expectWarning was called!");
7572
+ }
7464
7573
 
7465
- // Expect a warning to happen within a function, or if no function is
7466
- // passed, from the time of calling until the end of the test. Can be called
7467
- // multiple times to assert warnings with different specific messages
7468
- // happened.
7469
- //
7470
- // expectWarning(function() {
7471
- // Ember.warn("Times they are a-changin'");
7472
- // }, /* optionalStringOrRegex */);
7473
- //
7474
- // expectWarning(/* optionalStringOrRegex */);
7475
- // Ember.warn("Times definitely be changin'");
7476
- //
7477
- var expectWarning = function (fn, message) {
7478
- if (typeof fn !== 'function') {
7479
- message = fn;
7480
- fn = null;
7481
- }
7574
+ tracker.expectNoCalls();
7575
+ });
7576
+ };
7482
7577
 
7483
- _this.runExpectation(fn, function (tracker) {
7484
- if (tracker.isExpectingNoCalls()) {
7485
- throw new Error("expectWarning was called after expectNoWarning was called!");
7578
+ // Expect a warning to happen within a function, or if no function is
7579
+ // passed, from the time of calling until the end of the test. Can be called
7580
+ // multiple times to assert warnings with different specific messages
7581
+ // happened.
7582
+ //
7583
+ // expectWarning(function() {
7584
+ // Ember.warn("Times they are a-changin'");
7585
+ // }, /* optionalStringOrRegex */);
7586
+ //
7587
+ // expectWarning(/* optionalStringOrRegex */);
7588
+ // Ember.warn("Times definitely be changin'");
7589
+ //
7590
+ var expectWarning = function expectWarning(fn, message) {
7591
+ if (typeof fn !== 'function') {
7592
+ message = fn;
7593
+ fn = null;
7486
7594
  }
7487
7595
 
7488
- tracker.expectCall(message);
7489
- });
7490
- };
7596
+ _this.runExpectation(fn, function (tracker) {
7597
+ if (tracker.isExpectingNoCalls()) {
7598
+ throw new Error("expectWarning was called after expectNoWarning was called!");
7599
+ }
7491
7600
 
7492
- var ignoreWarning = function (func) {
7493
- _emberDevTestHelperUtils.callWithStub(_this.env, 'warn', func);
7494
- };
7601
+ tracker.expectCall(message);
7602
+ });
7603
+ };
7495
7604
 
7496
- window.expectNoWarning = expectNoWarning;
7497
- window.expectWarning = expectWarning;
7498
- window.ignoreWarning = ignoreWarning;
7499
- };
7605
+ var ignoreWarning = function ignoreWarning(func) {
7606
+ _emberDevTestHelperUtils.callWithStub(_this.env, 'warn', func);
7607
+ };
7500
7608
 
7501
- WarningAssert.prototype.restore = function restore() {
7502
- _DebugAssert.prototype.restore.call(this);
7503
- window.expectWarning = null;
7504
- window.expectNoWarning = null;
7505
- window.ignoreWarning = null;
7506
- };
7609
+ window.expectNoWarning = expectNoWarning;
7610
+ window.expectWarning = expectWarning;
7611
+ window.ignoreWarning = ignoreWarning;
7612
+ }
7613
+ }, {
7614
+ key: 'restore',
7615
+ value: function restore() {
7616
+ _get(Object.getPrototypeOf(WarningAssert.prototype), 'restore', this).call(this);
7617
+ window.expectWarning = null;
7618
+ window.expectNoWarning = null;
7619
+ window.ignoreWarning = null;
7620
+ }
7621
+ }]);
7507
7622
 
7508
7623
  return WarningAssert;
7509
7624
  })(_emberDevTestHelperDebug.default);