ember-source 2.12.0 → 2.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e20f63e7ae0e225765bcf45db4e30d2772a5da3d
4
- data.tar.gz: 400bf98bd04c88a91896fc772294bae7858d6c3d
3
+ metadata.gz: 8daaa463e0ae707d9a7109d0570606ee255fcb6f
4
+ data.tar.gz: 885fd6dd66958536b6e8a17a030bcf4c8475cfb1
5
5
  SHA512:
6
- metadata.gz: 815d7664118ac234a0e4b5a77b3f0a91885a9f8b4c9c35e3101c956a79f02c6c5dce2543b46ff5b1b67d6ec8adbaa1b109ac908edee4ad91ab251fa3a6755069
7
- data.tar.gz: cf34b721b9a0f0feee2baadc7e04af70e21b1cfaa6055fc01b7764b5f799fed8ec90c3a461dacf4b89748e573804814bb2713b91dccaf64d995d1bbd2ffb1ec1
6
+ metadata.gz: a3df93223b3d79963d88ff2754ec35ecd8292bdf2ca2e075cf80779f83c4b24dceee01518f00deb349c2f8856ebae4b2d23b5fbfdfd667a8a026b6d1853f4434
7
+ data.tar.gz: f3e662d99ce3d35d1a66bbfb2d3c75c892328172061fa647b5609871c87abf9487b0332c9a32108aea4134adbcee1bad4930e5d20009fbad627d94f42f1a267b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.12.0
1
+ 2.12.1
@@ -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.0
9
+ * @version 2.12.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -1836,6 +1836,7 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1836
1836
  this.fullName = fullName;
1837
1837
  this.normalizedName = normalizedName;
1838
1838
  this.madeToString = undefined;
1839
+ this.injections = undefined;
1839
1840
  }
1840
1841
 
1841
1842
  FactoryManager.prototype.create = function create() {
@@ -1843,7 +1844,13 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1843
1844
 
1844
1845
  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
1845
1846
 
1846
- var injections = injectionsFor(this.container, this.normalizedName);
1847
+ var injections = this.injections;
1848
+ if (injections === undefined) {
1849
+ injections = injectionsFor(this.container, this.normalizedName);
1850
+ if (areInjectionsDynamic(injections) === false) {
1851
+ this.injections = injections;
1852
+ }
1853
+ }
1847
1854
  var props = _emberUtils.assign({}, injections, options);
1848
1855
 
1849
1856
  props[_emberUtils.NAME_KEY] = this.madeToString || (this.madeToString = this.container.registry.makeToString(this.class, this.fullName));
@@ -5400,7 +5407,7 @@ enifed('ember-metal/expand_properties', ['exports', 'ember-metal/debug'], functi
5400
5407
  */
5401
5408
 
5402
5409
  function expandProperties(pattern, callback) {
5403
- _emberMetalDebug.assert('A computed property key must be a string', typeof pattern === 'string');
5410
+ _emberMetalDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');
5404
5411
  _emberMetalDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
5405
5412
  _emberMetalDebug.assert('Brace expanded properties have to be balanced and cannot be nested, pattern: ' + pattern, (function (str) {
5406
5413
  var inBrace = 0;
@@ -19802,7 +19809,7 @@ enifed("ember/features", ["exports"], function (exports) {
19802
19809
  enifed("ember/version", ["exports"], function (exports) {
19803
19810
  "use strict";
19804
19811
 
19805
- exports.default = "2.12.0";
19812
+ exports.default = "2.12.1";
19806
19813
  });
19807
19814
  enifed('rsvp', ['exports'], function (exports) {
19808
19815
  '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.0
9
+ * @version 2.12.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -4443,7 +4443,7 @@ enifed('ember-metal/expand_properties', ['exports', 'ember-metal/debug'], functi
4443
4443
  */
4444
4444
 
4445
4445
  function expandProperties(pattern, callback) {
4446
- _emberMetalDebug.assert('A computed property key must be a string', typeof pattern === 'string');
4446
+ _emberMetalDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');
4447
4447
  _emberMetalDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
4448
4448
  _emberMetalDebug.assert('Brace expanded properties have to be balanced and cannot be nested, pattern: ' + pattern, (function (str) {
4449
4449
  var inBrace = 0;
@@ -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.0";
12126
+ exports.default = "2.12.1";
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.0
9
+ * @version 2.12.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -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.0
9
+ * @version 2.12.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -27229,6 +27229,42 @@ babelHelpers.classCallCheck(this, _class2);
27229
27229
  this.assertText('Click me');
27230
27230
  };
27231
27231
 
27232
+ _class2.prototype['@test action handler that shifts element attributes doesn\'t trigger multiple invocations'] = function testActionHandlerThatShiftsElementAttributesDoesnTTriggerMultipleInvocations() {
27233
+ var _this34 = this;
27234
+
27235
+ var actionCount = 0;
27236
+ var ExampleComponent = _emberGlimmerTestsUtilsHelpers.Component.extend({
27237
+ selected: false,
27238
+ actions: {
27239
+ toggleSelected: function () {
27240
+ actionCount++;
27241
+ this.toggleProperty('selected');
27242
+ }
27243
+ }
27244
+ });
27245
+
27246
+ this.registerComponent('example-component', {
27247
+ ComponentClass: ExampleComponent,
27248
+ template: '<button class="{{if selected \'selected\'}}" {{action "toggleSelected"}}>Toggle Selected</button>'
27249
+ });
27250
+
27251
+ this.render('{{example-component}}');
27252
+
27253
+ this.runTask(function () {
27254
+ _this34.$('button').click();
27255
+ });
27256
+
27257
+ this.assert.equal(actionCount, 1, 'Click action only fired once.');
27258
+ this.assert.ok(this.$('button').hasClass('selected'), 'Element with action handler has properly updated it\'s conditional class');
27259
+
27260
+ this.runTask(function () {
27261
+ _this34.$('button').click();
27262
+ });
27263
+
27264
+ this.assert.equal(actionCount, 2, 'Second click action only fired once.');
27265
+ this.assert.ok(!this.$('button').hasClass('selected'), 'Element with action handler has properly updated it\'s conditional class');
27266
+ };
27267
+
27232
27268
  return _class2;
27233
27269
  })(_emberGlimmerTestsUtilsTestCase.RenderingTest));
27234
27270
  });
@@ -41210,7 +41246,7 @@ enifed('ember-metal/tests/expand_properties_test', ['exports', 'ember-metal/expa
41210
41246
  expect(1);
41211
41247
 
41212
41248
  expectAssertion(function () {
41213
- _emberMetalExpand_properties.default([], addProperty);
41249
+ _emberMetalExpand_properties.default([1, 2], addProperty);
41214
41250
  }, /A computed property key must be a string/);
41215
41251
  });
41216
41252
 
@@ -47821,6 +47857,23 @@ enifed('ember-routing/tests/location/history_location_test', ['exports', 'ember-
47821
47857
 
47822
47858
  equal(location.getURL(), '/foo/bar?time=morphin#pink-power-ranger');
47823
47859
  });
47860
+
47861
+ QUnit.test('HistoryLocation.getURL() drops duplicate slashes', function () {
47862
+ expect(1);
47863
+
47864
+ HistoryTestLocation.reopen({
47865
+ init: function () {
47866
+ this._super.apply(this, arguments);
47867
+ var location = mockBrowserLocation('//');
47868
+ location.pathname = '//'; // mockBrowserLocation does not allow for `//`, so force it
47869
+ _emberMetal.set(this, 'location', location);
47870
+ }
47871
+ });
47872
+
47873
+ createLocation();
47874
+
47875
+ equal(location.getURL(), '/');
47876
+ });
47824
47877
  });
47825
47878
  enifed('ember-routing/tests/location/history_location_test.lint-test', ['exports'], function (exports) {
47826
47879
  '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.0
9
+ * @version 2.12.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -27008,6 +27008,42 @@ babelHelpers.inherits(_class2, _RenderingTest2);
27008
27008
  this.assertText('Click me');
27009
27009
  };
27010
27010
 
27011
+ _class2.prototype['@test action handler that shifts element attributes doesn\'t trigger multiple invocations'] = function testActionHandlerThatShiftsElementAttributesDoesnTTriggerMultipleInvocations() {
27012
+ var _this34 = this;
27013
+
27014
+ var actionCount = 0;
27015
+ var ExampleComponent = _emberGlimmerTestsUtilsHelpers.Component.extend({
27016
+ selected: false,
27017
+ actions: {
27018
+ toggleSelected: function () {
27019
+ actionCount++;
27020
+ this.toggleProperty('selected');
27021
+ }
27022
+ }
27023
+ });
27024
+
27025
+ this.registerComponent('example-component', {
27026
+ ComponentClass: ExampleComponent,
27027
+ template: '<button class="{{if selected \'selected\'}}" {{action "toggleSelected"}}>Toggle Selected</button>'
27028
+ });
27029
+
27030
+ this.render('{{example-component}}');
27031
+
27032
+ this.runTask(function () {
27033
+ _this34.$('button').click();
27034
+ });
27035
+
27036
+ this.assert.equal(actionCount, 1, 'Click action only fired once.');
27037
+ this.assert.ok(this.$('button').hasClass('selected'), 'Element with action handler has properly updated it\'s conditional class');
27038
+
27039
+ this.runTask(function () {
27040
+ _this34.$('button').click();
27041
+ });
27042
+
27043
+ this.assert.equal(actionCount, 2, 'Second click action only fired once.');
27044
+ this.assert.ok(!this.$('button').hasClass('selected'), 'Element with action handler has properly updated it\'s conditional class');
27045
+ };
27046
+
27011
27047
  return _class2;
27012
27048
  })(_emberGlimmerTestsUtilsTestCase.RenderingTest));
27013
27049
  });
@@ -40761,7 +40797,7 @@ enifed('ember-metal/tests/expand_properties_test', ['exports', 'ember-metal/expa
40761
40797
  expect(1);
40762
40798
 
40763
40799
  expectAssertion(function () {
40764
- _emberMetalExpand_properties.default([], addProperty);
40800
+ _emberMetalExpand_properties.default([1, 2], addProperty);
40765
40801
  }, /A computed property key must be a string/);
40766
40802
  });
40767
40803
 
@@ -47372,6 +47408,23 @@ enifed('ember-routing/tests/location/history_location_test', ['exports', 'ember-
47372
47408
 
47373
47409
  equal(location.getURL(), '/foo/bar?time=morphin#pink-power-ranger');
47374
47410
  });
47411
+
47412
+ QUnit.test('HistoryLocation.getURL() drops duplicate slashes', function () {
47413
+ expect(1);
47414
+
47415
+ HistoryTestLocation.reopen({
47416
+ init: function () {
47417
+ this._super.apply(this, arguments);
47418
+ var location = mockBrowserLocation('//');
47419
+ location.pathname = '//'; // mockBrowserLocation does not allow for `//`, so force it
47420
+ _emberMetal.set(this, 'location', location);
47421
+ }
47422
+ });
47423
+
47424
+ createLocation();
47425
+
47426
+ equal(location.getURL(), '/');
47427
+ });
47375
47428
  });
47376
47429
  enifed('ember-routing/tests/location/history_location_test.lint-test', ['exports'], function (exports) {
47377
47430
  '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.0
9
+ * @version 2.12.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -1851,6 +1851,7 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1851
1851
  this.fullName = fullName;
1852
1852
  this.normalizedName = normalizedName;
1853
1853
  this.madeToString = undefined;
1854
+ this.injections = undefined;
1854
1855
  }
1855
1856
 
1856
1857
  FactoryManager.prototype.create = function create() {
@@ -1858,7 +1859,13 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1858
1859
 
1859
1860
  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
1860
1861
 
1861
- var injections = injectionsFor(this.container, this.normalizedName);
1862
+ var injections = this.injections;
1863
+ if (injections === undefined) {
1864
+ injections = injectionsFor(this.container, this.normalizedName);
1865
+ if (areInjectionsDynamic(injections) === false) {
1866
+ this.injections = injections;
1867
+ }
1868
+ }
1862
1869
  var props = _emberUtils.assign({}, injections, options);
1863
1870
 
1864
1871
  props[_emberUtils.NAME_KEY] = this.madeToString || (this.madeToString = this.container.registry.makeToString(this.class, this.fullName));
@@ -18391,7 +18398,7 @@ enifed('ember-metal/expand_properties', ['exports', 'ember-metal/debug'], functi
18391
18398
  */
18392
18399
 
18393
18400
  function expandProperties(pattern, callback) {
18394
- _emberMetalDebug.assert('A computed property key must be a string', typeof pattern === 'string');
18401
+ _emberMetalDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');
18395
18402
  _emberMetalDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
18396
18403
  _emberMetalDebug.assert('Brace expanded properties have to be balanced and cannot be nested, pattern: ' + pattern, (function (str) {
18397
18404
  var inBrace = 0;
@@ -24868,7 +24875,7 @@ enifed('ember-routing/location/history_location', ['exports', 'ember-metal', 'em
24868
24875
  baseURL = baseURL.replace(/\/$/, '');
24869
24876
 
24870
24877
  // remove baseURL and rootURL from start of path
24871
- var url = path.replace(new RegExp('^' + baseURL + '(?=/|$)'), '').replace(new RegExp('^' + rootURL + '(?=/|$)'), '');
24878
+ var url = path.replace(new RegExp('^' + baseURL + '(?=/|$)'), '').replace(new RegExp('^' + rootURL + '(?=/|$)'), '').replace(/\/\/$/g, '/'); // remove extra slashes
24872
24879
 
24873
24880
  var search = location.search || '';
24874
24881
  url += search + this.getHash();
@@ -42347,6 +42354,7 @@ enifed('ember-views/system/event_dispatcher', ['exports', 'ember-utils', 'ember-
42347
42354
 
42348
42355
  rootElement.on(event + '.ember', '[data-ember-action]', function (evt) {
42349
42356
  var attributes = evt.currentTarget.attributes;
42357
+ var handledActions = [];
42350
42358
 
42351
42359
  for (var i = 0; i < attributes.length; i++) {
42352
42360
  var attr = attributes.item(i);
@@ -42358,8 +42366,12 @@ enifed('ember-views/system/event_dispatcher', ['exports', 'ember-utils', 'ember-
42358
42366
  // We have to check for action here since in some cases, jQuery will trigger
42359
42367
  // an event on `removeChild` (i.e. focusout) after we've already torn down the
42360
42368
  // action handlers for the view.
42361
- if (action && action.eventName === eventName) {
42369
+ if (action && action.eventName === eventName && handledActions.indexOf(action) === -1) {
42362
42370
  action.handler(evt);
42371
+ // Action handlers can mutate state which in turn creates new attributes on the element.
42372
+ // This effect could cause the `data-ember-action` attribute to shift down and be invoked twice.
42373
+ // To avoid this, we keep track of which actions have been handled.
42374
+ handledActions.push(action);
42363
42375
  }
42364
42376
  }
42365
42377
  }
@@ -43560,7 +43572,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'ember-utils',
43560
43572
  enifed("ember/version", ["exports"], function (exports) {
43561
43573
  "use strict";
43562
43574
 
43563
- exports.default = "2.12.0";
43575
+ exports.default = "2.12.1";
43564
43576
  });
43565
43577
  enifed('internal-test-helpers/apply-mixins', ['exports', 'ember-utils'], function (exports, _emberUtils) {
43566
43578
  '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.0
9
+ * @version 2.12.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -1851,6 +1851,7 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1851
1851
  this.fullName = fullName;
1852
1852
  this.normalizedName = normalizedName;
1853
1853
  this.madeToString = undefined;
1854
+ this.injections = undefined;
1854
1855
  }
1855
1856
 
1856
1857
  FactoryManager.prototype.create = function create() {
@@ -1858,7 +1859,13 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1858
1859
 
1859
1860
  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
1860
1861
 
1861
- var injections = injectionsFor(this.container, this.normalizedName);
1862
+ var injections = this.injections;
1863
+ if (injections === undefined) {
1864
+ injections = injectionsFor(this.container, this.normalizedName);
1865
+ if (areInjectionsDynamic(injections) === false) {
1866
+ this.injections = injections;
1867
+ }
1868
+ }
1862
1869
  var props = _emberUtils.assign({}, injections, options);
1863
1870
 
1864
1871
  props[_emberUtils.NAME_KEY] = this.madeToString || (this.madeToString = this.container.registry.makeToString(this.class, this.fullName));
@@ -18391,7 +18398,7 @@ enifed('ember-metal/expand_properties', ['exports', 'ember-metal/debug'], functi
18391
18398
  */
18392
18399
 
18393
18400
  function expandProperties(pattern, callback) {
18394
- _emberMetalDebug.assert('A computed property key must be a string', typeof pattern === 'string');
18401
+ _emberMetalDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');
18395
18402
  _emberMetalDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
18396
18403
  _emberMetalDebug.assert('Brace expanded properties have to be balanced and cannot be nested, pattern: ' + pattern, (function (str) {
18397
18404
  var inBrace = 0;
@@ -24868,7 +24875,7 @@ enifed('ember-routing/location/history_location', ['exports', 'ember-metal', 'em
24868
24875
  baseURL = baseURL.replace(/\/$/, '');
24869
24876
 
24870
24877
  // remove baseURL and rootURL from start of path
24871
- var url = path.replace(new RegExp('^' + baseURL + '(?=/|$)'), '').replace(new RegExp('^' + rootURL + '(?=/|$)'), '');
24878
+ var url = path.replace(new RegExp('^' + baseURL + '(?=/|$)'), '').replace(new RegExp('^' + rootURL + '(?=/|$)'), '').replace(/\/\/$/g, '/'); // remove extra slashes
24872
24879
 
24873
24880
  var search = location.search || '';
24874
24881
  url += search + this.getHash();
@@ -42347,6 +42354,7 @@ enifed('ember-views/system/event_dispatcher', ['exports', 'ember-utils', 'ember-
42347
42354
 
42348
42355
  rootElement.on(event + '.ember', '[data-ember-action]', function (evt) {
42349
42356
  var attributes = evt.currentTarget.attributes;
42357
+ var handledActions = [];
42350
42358
 
42351
42359
  for (var i = 0; i < attributes.length; i++) {
42352
42360
  var attr = attributes.item(i);
@@ -42358,8 +42366,12 @@ enifed('ember-views/system/event_dispatcher', ['exports', 'ember-utils', 'ember-
42358
42366
  // We have to check for action here since in some cases, jQuery will trigger
42359
42367
  // an event on `removeChild` (i.e. focusout) after we've already torn down the
42360
42368
  // action handlers for the view.
42361
- if (action && action.eventName === eventName) {
42369
+ if (action && action.eventName === eventName && handledActions.indexOf(action) === -1) {
42362
42370
  action.handler(evt);
42371
+ // Action handlers can mutate state which in turn creates new attributes on the element.
42372
+ // This effect could cause the `data-ember-action` attribute to shift down and be invoked twice.
42373
+ // To avoid this, we keep track of which actions have been handled.
42374
+ handledActions.push(action);
42363
42375
  }
42364
42376
  }
42365
42377
  }
@@ -43560,7 +43572,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'ember-utils',
43560
43572
  enifed("ember/version", ["exports"], function (exports) {
43561
43573
  "use strict";
43562
43574
 
43563
- exports.default = "2.12.0";
43575
+ exports.default = "2.12.1";
43564
43576
  });
43565
43577
  enifed('internal-test-helpers/apply-mixins', ['exports', 'ember-utils'], function (exports, _emberUtils) {
43566
43578
  'use strict';
@@ -144,7 +144,9 @@ var i=this.registry.resolve(n)
144
144
  if(void 0!==i){var o=new N(this,i,e,n)
145
145
  return this.factoryManagerCache[n]=o,o}}}
146
146
  var R=function(){function e(e,t,n){this.container=e,this.class=t,this.fullName=n}return e.prototype.create=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0]
147
- return y(this.class,e,this.container,this.fullName)},e}(),N=function(){function e(e,t,n,r){this.container=e,this.class=t,this.fullName=n,this.normalizedName=r,this.madeToString=void 0}return e.prototype.create=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=g(this.container,this.normalizedName),r=t.assign({},n,e)
147
+ return y(this.class,e,this.container,this.fullName)},e}(),N=function(){function e(e,t,n,r){this.container=e,this.class=t,this.fullName=n,this.normalizedName=r,this.madeToString=void 0,this.injections=void 0}return e.prototype.create=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=this.injections
148
+ void 0===n&&(n=g(this.container,this.normalizedName),m(n)===!1&&(this.injections=n))
149
+ var r=t.assign({},n,e)
148
150
  if(r[t.NAME_KEY]=this.madeToString||(this.madeToString=this.container.registry.makeToString(this.class,this.fullName)),!this.class.create)throw new Error("Failed to create an instance of '"+this.normalizedName+"'. Most likely an improperly defined class or an invalid module export.")
149
151
  var i=this.class.prototype
150
152
  return i&&_(i,this.container),this.class.create(r)},e}()}),s("container/index",["exports","container/registry","container/container"],function(e,t,n){"use strict"
@@ -1346,7 +1348,7 @@ var e=document.querySelector("base"),n=""
1346
1348
  e&&(n=e.getAttribute("href")),t.set(this,"baseURL",n),t.set(this,"location",t.get(this,"location")||window.location),this._popstateHandler=void 0},initState:function(){var e=t.get(this,"history")||window.history
1347
1349
  t.set(this,"history",e),e&&"state"in e&&(this.supportsHistory=!0),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var e=t.get(this,"location"),n=e.pathname,r=t.get(this,"rootURL"),i=t.get(this,"baseURL")
1348
1350
  r=r.replace(/\/$/,""),i=i.replace(/\/$/,"")
1349
- var o=n.replace(new RegExp("^"+i+"(?=/|$)"),"").replace(new RegExp("^"+r+"(?=/|$)"),""),s=e.search||""
1351
+ var o=n.replace(new RegExp("^"+i+"(?=/|$)"),"").replace(new RegExp("^"+r+"(?=/|$)"),"").replace(/\/\/$/g,"/"),s=e.search||""
1350
1352
  return o+=s+this.getHash()},setURL:function(e){var t=this.getState()
1351
1353
  e=this.formatURL(e),t&&t.path===e||this.pushState(e)},replaceURL:function(e){var t=this.getState()
1352
1354
  e=this.formatURL(e),t&&t.path===e||this.replaceState(e)},getState:function(){return this.supportsHistory?t.get(this,"history").state:this._historyState},pushState:function(e){var n={path:e}
@@ -2131,9 +2133,9 @@ if(n.isNone(r)?r=n.get(this,"rootElement"):n.set(this,"rootElement",r),r=i.defau
2131
2133
  var a=this._getViewRegistry()
2132
2134
  for(o in s)s.hasOwnProperty(o)&&this.setupHandler(r,o,s[o],a)},setupHandler:function(e,t,n,r){var i=this
2133
2135
  null!==n&&(e.on(t+".ember",".ember-view",function(e,t){var o=r[this.id],s=!0,a=i.canDispatchToEventManager?i._findNearestEventManager(o,n):null
2134
- return a&&a!==t?s=i._dispatchEvent(a,e,n,o):o&&(s=i._bubbleEvent(o,e,n)),s}),e.on(t+".ember","[data-ember-action]",function(e){for(var t=e.currentTarget.attributes,r=0;r<t.length;r++){var i=t.item(r),s=i.name
2135
- if(s.lastIndexOf("data-ember-action-",0)!==-1){var a=o.default.registeredActions[i.value]
2136
- a&&a.eventName===n&&a.handler(e)}}}))},_getViewRegistry:function(){var e=t.getOwner(this),n=e&&e.lookup("-view-registry:main")||a.default
2136
+ return a&&a!==t?s=i._dispatchEvent(a,e,n,o):o&&(s=i._bubbleEvent(o,e,n)),s}),e.on(t+".ember","[data-ember-action]",function(e){for(var t=e.currentTarget.attributes,r=[],i=0;i<t.length;i++){var s=t.item(i),a=s.name
2137
+ if(a.lastIndexOf("data-ember-action-",0)!==-1){var u=o.default.registeredActions[s.value]
2138
+ u&&u.eventName===n&&r.indexOf(u)===-1&&(u.handler(e),r.push(u))}}}))},_getViewRegistry:function(){var e=t.getOwner(this),n=e&&e.lookup("-view-registry:main")||a.default
2137
2139
  return n},_findNearestEventManager:function(e,t){for(var r=null;e&&(r=n.get(e,"eventManager"),!r||!r[t]);)e=n.get(e,"parentView")
2138
2140
  return r},_dispatchEvent:function(e,t,r,i){var o=!0,s=e[r]
2139
2141
  return"function"==typeof s?(o=n.run(e,s,t,i),t.stopPropagation()):o=this._bubbleEvent(i,t,r),o},_bubbleEvent:function(e,t,n){return e.handleEvent(n,t)},destroy:function(){var e=n.get(this,"rootElement")
@@ -2201,7 +2203,7 @@ v.setDiff=u.setDiff,v.mapBy=u.mapBy,v.filter=u.filter,v.filterBy=u.filterBy,v.un
2201
2203
  var g=o.default.Handlebars=o.default.Handlebars||{},y=o.default.HTMLBars=o.default.HTMLBars||{},b=g.Utils=g.Utils||{}
2202
2204
  if(Object.defineProperty(g,"SafeString",{get:l._getSafeString}),y.template=g.template=l.template,b.escapeExpression=l.escapeExpression,u.String.htmlSafe=l.htmlSafe,u.String.isHTMLSafe=l.isHTMLSafe,y.makeBoundHelper=l.makeBoundHelper,Object.defineProperty(o.default,"TEMPLATES",{get:l.getTemplates,set:l.setTemplates,configurable:!1,enumerable:!1}),e.VERSION=c.default,o.default.VERSION=c.default,o.libraries.registerCoreLibrary("Ember",c.default),o.default.create=o.deprecateFunc("Ember.create is deprecated in favor of Object.create",{id:"ember-metal.ember-create",until:"3.0.0"},Object.create),o.default.keys=o.deprecateFunc("Ember.keys is deprecated in favor of Object.keys",{id:"ember-metal.ember.keys",until:"3.0.0"},Object.keys),o.default.$=p.jQuery,o.default.ViewTargetActionSupport=p.ViewTargetActionSupport,o.default.ViewUtils={isSimpleClick:p.isSimpleClick,getViewElement:p.getViewElement,getViewBounds:p.getViewBounds,getViewClientRects:p.getViewClientRects,getViewBoundingClientRect:p.getViewBoundingClientRect,getRootViews:p.getRootViews,getChildViews:p.getChildViews},o.default.TextSupport=p.TextSupport,o.default.ComponentLookup=p.ComponentLookup,o.default.EventDispatcher=p.EventDispatcher,o.default.Location=h.Location,o.default.AutoLocation=h.AutoLocation,o.default.HashLocation=h.HashLocation,o.default.HistoryLocation=h.HistoryLocation,o.default.NoneLocation=h.NoneLocation,o.default.controllerFor=h.controllerFor,o.default.generateControllerFactory=h.generateControllerFactory,o.default.generateController=h.generateController,o.default.RouterDSL=h.RouterDSL,o.default.Router=h.Router,o.default.Route=h.Route,o.default.Application=f.Application,o.default.ApplicationInstance=f.ApplicationInstance,o.default.Engine=f.Engine,o.default.EngineInstance=f.EngineInstance,o.default.DefaultResolver=o.default.Resolver=f.Resolver,u.runLoadHooks("Ember.Application",f.Application),o.default.DataAdapter=m.DataAdapter,o.default.ContainerDebugAdapter=m.ContainerDebugAdapter,t.has("ember-template-compiler")&&t.default("ember-template-compiler"),t.has("ember-testing")){var _=t.default("ember-testing")
2203
2205
  o.default.Test=_.Test,o.default.Test.Adapter=_.Adapter,o.default.Test.QUnitAdapter=_.QUnitAdapter,o.default.setupForTesting=_.setupForTesting}u.runLoadHooks("Ember"),e.default=o.default,"object"==typeof module&&module.exports?module.exports=o.default:n.context.exports.Ember=n.context.exports.Em=o.default}),s("ember/version",["exports"],function(e){"use strict"
2204
- e.default="2.12.0"}),s("internal-test-helpers/apply-mixins",["exports","ember-utils"],function(e,t){"use strict"
2206
+ e.default="2.12.1"}),s("internal-test-helpers/apply-mixins",["exports","ember-utils"],function(e,t){"use strict"
2205
2207
  function n(e){return Array.isArray(e.cases)&&"function"==typeof e.generate}function r(e){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o]
2206
2208
  return i.forEach(function(r){var i=void 0
2207
2209
  n(r)?function(){var e=r
@@ -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.0
9
+ * @version 2.12.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -1804,12 +1804,19 @@ enifed('container/container', ['exports', 'ember-utils', 'ember-environment', 'e
1804
1804
  this.fullName = fullName;
1805
1805
  this.normalizedName = normalizedName;
1806
1806
  this.madeToString = undefined;
1807
+ this.injections = undefined;
1807
1808
  }
1808
1809
 
1809
1810
  FactoryManager.prototype.create = function create() {
1810
1811
  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
1811
1812
 
1812
- var injections = injectionsFor(this.container, this.normalizedName);
1813
+ var injections = this.injections;
1814
+ if (injections === undefined) {
1815
+ injections = injectionsFor(this.container, this.normalizedName);
1816
+ if (areInjectionsDynamic(injections) === false) {
1817
+ this.injections = injections;
1818
+ }
1819
+ }
1813
1820
  var props = _emberUtils.assign({}, injections, options);
1814
1821
 
1815
1822
  props[_emberUtils.NAME_KEY] = this.madeToString || (this.madeToString = this.container.registry.makeToString(this.class, this.fullName));
@@ -23421,7 +23428,7 @@ enifed('ember-routing/location/history_location', ['exports', 'ember-metal', 'em
23421
23428
  baseURL = baseURL.replace(/\/$/, '');
23422
23429
 
23423
23430
  // remove baseURL and rootURL from start of path
23424
- var url = path.replace(new RegExp('^' + baseURL + '(?=/|$)'), '').replace(new RegExp('^' + rootURL + '(?=/|$)'), '');
23431
+ var url = path.replace(new RegExp('^' + baseURL + '(?=/|$)'), '').replace(new RegExp('^' + rootURL + '(?=/|$)'), '').replace(/\/\/$/g, '/'); // remove extra slashes
23425
23432
 
23426
23433
  var search = location.search || '';
23427
23434
  url += search + this.getHash();
@@ -38997,6 +39004,7 @@ enifed('ember-views/system/event_dispatcher', ['exports', 'ember-utils', 'ember-
38997
39004
 
38998
39005
  rootElement.on(event + '.ember', '[data-ember-action]', function (evt) {
38999
39006
  var attributes = evt.currentTarget.attributes;
39007
+ var handledActions = [];
39000
39008
 
39001
39009
  for (var i = 0; i < attributes.length; i++) {
39002
39010
  var attr = attributes.item(i);
@@ -39008,8 +39016,12 @@ enifed('ember-views/system/event_dispatcher', ['exports', 'ember-utils', 'ember-
39008
39016
  // We have to check for action here since in some cases, jQuery will trigger
39009
39017
  // an event on `removeChild` (i.e. focusout) after we've already torn down the
39010
39018
  // action handlers for the view.
39011
- if (action && action.eventName === eventName) {
39019
+ if (action && action.eventName === eventName && handledActions.indexOf(action) === -1) {
39012
39020
  action.handler(evt);
39021
+ // Action handlers can mutate state which in turn creates new attributes on the element.
39022
+ // This effect could cause the `data-ember-action` attribute to shift down and be invoked twice.
39023
+ // To avoid this, we keep track of which actions have been handled.
39024
+ handledActions.push(action);
39013
39025
  }
39014
39026
  }
39015
39027
  }
@@ -40191,7 +40203,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'ember-utils',
40191
40203
  enifed("ember/version", ["exports"], function (exports) {
40192
40204
  "use strict";
40193
40205
 
40194
- exports.default = "2.12.0";
40206
+ exports.default = "2.12.1";
40195
40207
  });
40196
40208
  enifed('internal-test-helpers/apply-mixins', ['exports', 'ember-utils'], function (exports, _emberUtils) {
40197
40209
  'use strict';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0
4
+ version: 2.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-04-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ember.js source code wrapper for use with Ruby libs.
14
14
  email: