active-model-adapter-source 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yzg5OGYwYTNkYmJiNWQ3YzdkM2NhMTBmMDc2ZTlmN2YxODU3OGQzNA==
4
+ NWRlOTU5OGQ5ODI4NGViZmY2YTVjMDZkMjc2MGEyZGQ2ODRiMTdjNA==
5
5
  data.tar.gz: !binary |-
6
- OGE4MzZlMjVkYzc2YTZiMDYzZTI3ZjdjMjcwMWU3YzcxMmM4YzQ2ZQ==
6
+ M2UwNmE3MDM4ZmIyZjI3YTU3Y2RkZjg1NmJjYmE5NjJlMDIwMGZlZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTBkNzk5N2JiM2M4ODVmZDcxOThhOTc2NTllN2IyOTI2MTA1NWRiMjhiOWIx
10
- OGYzMDU0OGQ4NzNlNTFjZGNlMWEyNjQwMjZhMmQ1NzhmMmRjNGE3Y2MwODk3
11
- NjNkZmZkZTRjODBlZjYyNmE2ZTcyMDIwMTYxZjE2MGUwOTg4NDY=
9
+ NjlhZDQyNzE3MzQ4OTcxMGExYjc5NTYzZTJmYjdkMTkzMWE0YzE0ZjI4MTAw
10
+ OWFkZTQ4N2YzMWYzMGMxMzVmM2JiMjdkNjI5MTk3MzVkODIxZTUwOTYxZTNh
11
+ YWM5Yjg5Mzc0MjUyOThkNWZmNWJkOWEzNzAyZDMyNTQxYmVjZDQ=
12
12
  data.tar.gz: !binary |-
13
- MDg4YjI0OGE2OTBiMWU3ODE2MDBlZmM2Mjc4MGQ4NTQxOGM1ZGVmZDQyNWNi
14
- YTgxMTE2ZjQzMTM2YjAxNDQ2YzU2MDRlYmNjODM1MDNhMDA3Y2U2NDkyMzFh
15
- MTgxNDZhMTZjMmQzZDFlMTFiMTAyZTRiOTY4YjZmNzNlYTVlMjY=
13
+ ZDY0ZGViN2Y4Yzg3Njg4ZjAzMzIwNTllZjgwOTA2ZDYxNjZjMTI0OGE0OTdk
14
+ YWFhYzQ0MmE5ZjRiOGUyM2IyMzI3MTA5MTkxOGFlM2JlZTg2NjcxMjhmNzll
15
+ NzE1Nzc2ZjgxNTExZWFjYjlhOTdkNDc1ZTAwNmM3NjJhMzY4NmM=
@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 2.0.1
8
+ * @version 2.0.2
9
9
  */
10
10
 
11
11
  (function() {
@@ -214,6 +214,9 @@ define('active-model-adapter', ['exports', 'ember', 'ember-data'], function (exp
214
214
  var errorsHashToArray = _emberData["default"].errorsHashToArray;
215
215
  var RESTAdapter = _emberData["default"].RESTAdapter;
216
216
  var _Ember$String = _ember["default"].String;
217
+ var pluralize = _Ember$String.pluralize;
218
+ var decamelize = _Ember$String.decamelize;
219
+ var underscore = _Ember$String.underscore;
217
220
 
218
221
  /**
219
222
  @module ember-data
@@ -310,9 +313,6 @@ define('active-model-adapter', ['exports', 'ember', 'ember-data'], function (exp
310
313
  @extends DS.RESTAdapter
311
314
  **/
312
315
 
313
- var pluralize = _Ember$String.pluralize;
314
- var decamelize = _Ember$String.decamelize;
315
- var underscore = _Ember$String.underscore;
316
316
  var ActiveModelAdapter = RESTAdapter.extend({
317
317
  defaultSerializer: '-active-model',
318
318
  /**
@@ -371,6 +371,7 @@ define('active-model-serializer', ['exports', 'ember-data', 'ember'], function (
371
371
  var camelize = _Ember$String.camelize;
372
372
  var underscore = _Ember$String.underscore;
373
373
  var RESTSerializer = _emberData["default"].RESTSerializer;
374
+ var normalizeModelName = _emberData["default"].normalizeModelName;
374
375
 
375
376
  /**
376
377
  The ActiveModelSerializer is a subclass of the RESTSerializer designed to integrate
@@ -459,7 +460,6 @@ define('active-model-serializer', ['exports', 'ember-data', 'ember'], function (
459
460
  @namespace DS
460
461
  @extends DS.RESTSerializer
461
462
  */
462
- var normalizeModelName = _emberData["default"].normalizeModelName;
463
463
  var ActiveModelSerializer = RESTSerializer.extend({
464
464
  // SERIALIZE
465
465
 
@@ -626,23 +626,10 @@ define('active-model-serializer', ['exports', 'ember-data', 'ember'], function (
626
626
  var polymorphicKey = decamelize(key);
627
627
  var hash = resourceHash[polymorphicKey];
628
628
  if (hash !== null && typeof hash === 'object') {
629
- if (relationshipMeta.kind === 'belongsTo') {
630
- resourceHash[relationshipKey] = extractIDAndType(hash);
631
- // otherwise hasMany
632
- } else if (hash.length) {
633
- var hashes = hash;
634
- resourceHash[relationshipKey] = hashes.map(extractIDAndType);
635
- }
629
+ resourceHash[relationshipKey] = hash;
636
630
  }
637
631
  }
638
632
 
639
- function extractIDAndType(hash) {
640
- var id = hash.id;
641
- var type = hash.type;
642
-
643
- return { id: id, type: type };
644
- }
645
-
646
633
  exports["default"] = ActiveModelSerializer;
647
634
  });
648
635
  define('index', ['exports', './active-model-adapter', './active-model-serializer'], function (exports, _activeModelAdapter, _activeModelSerializer) {
@@ -664,21 +651,21 @@ define('instance-initializers/active-model-adapter', ['exports', 'active-model-a
664
651
  exports["default"] = {
665
652
  name: 'active-model-adapter',
666
653
  initialize: function (applicationOrRegistry) {
667
- var registry;
668
- if (applicationOrRegistry.registry) {
654
+ var register;
655
+ if (applicationOrRegistry.register) {
656
+ // initializeStoreService was called by an initializer instead of
657
+ // an instanceInitializer. The first argument is a registry for
658
+ // Ember pre 1.12, or an application instance for Ember >2.1.
659
+ register = applicationOrRegistry.register;
660
+ } else {
669
661
  // initializeStoreService was registered with an
670
662
  // instanceInitializer. The first argument is the application
671
663
  // instance.
672
- registry = applicationOrRegistry.registry;
673
- } else {
674
- // initializeStoreService was called by an initializer instead of
675
- // an instanceInitializer. The first argument is a registy. This
676
- // case allows ED to support Ember pre 1.12
677
- registry = applicationOrRegistry;
664
+ register = applicationOrRegistry.registry.register;
678
665
  }
679
666
 
680
- registry.register('adapter:-active-model', _activeModelAdapter["default"]);
681
- registry.register('serializer:-active-model', _activeModelAdapterActiveModelSerializer["default"]);
667
+ register.call(applicationOrRegistry, 'adapter:-active-model', _activeModelAdapter["default"]);
668
+ register.call(applicationOrRegistry, 'serializer:-active-model', _activeModelAdapterActiveModelSerializer["default"]);
682
669
  }
683
670
  };
684
671
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "active-model-adapter",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "repository": "https://github.com/ember-data/active-model-adapter",
5
5
  "description": "The default blueprint for ember-cli addons.",
6
6
  "directories": {
@@ -40,7 +40,9 @@
40
40
  "ember-disable-proxy-controllers": "^1.0.0",
41
41
  "ember-export-application-global": "^1.0.2",
42
42
  "ember-try": "0.0.7",
43
- "ember-watson": "^0.5.7"
43
+ "ember-watson": "^0.5.7",
44
+ "github": "^0.2.4",
45
+ "rsvp": "^3.1.0"
44
46
  },
45
47
  "keywords": [
46
48
  "ember-addon"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-model-adapter-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Terzic
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-09-02 00:00:00.000000000 Z
13
+ date: 2015-10-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ember-data-source