ende 0.5.2 → 0.5.3

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: 62968c729a073ebbf59f3784cab367762e84d539
4
- data.tar.gz: 4cf11ac267c9c8bbc05dccf562f44c0ac0cad292
3
+ metadata.gz: f449455409778c5c3e5ec35ddca98f3339697aeb
4
+ data.tar.gz: 1003d18179ca52da6a126802fac9077558124031
5
5
  SHA512:
6
- metadata.gz: b42de80aa1a414be0df5218d99f657827457c17548f52eddadb82d7295e19730e5c1fea9ef5728c99880450fd745e86eef85537bc4f5443436de98c022d81806
7
- data.tar.gz: 9647f2ea5a1ed71670ebc9206575b150511157584c774f91a7db46e2fbdaeb4fe7676b1a21bf98f9939514812a1e207533578a10fd56f1469f1a28b44b48d608
6
+ metadata.gz: f1f5145003bcd0c7312d9ca396d96836dba90f9d50b776b72fb3a72f5c7c9bfe43103d6e99208140d76bbfe60d200f14b7d0794a95f392c6e9628c6a1c4ab099
7
+ data.tar.gz: d8caf05992ebc99554db35804cbf5db628be84c5271ccf7a9593144bcfe2d1e013272547e64200c426e82d205777cf67fc8a521557083367554875ab96f01b29
data/lib/ende/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ende
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
@@ -19838,7 +19838,8 @@ associable = {
19838
19838
  old_resource = this[resource];
19839
19839
  Object.defineProperty(record, resource.toString(), {
19840
19840
  get: $.proxy(descriptors.belongs_to.resource.getter, association_proxy),
19841
- set: $.proxy(descriptors.belongs_to.resource.setter, association_proxy)
19841
+ set: $.proxy(descriptors.belongs_to.resource.setter, association_proxy),
19842
+ configurable: true
19842
19843
  });
19843
19844
  _results.push(this[resource] = old_resource);
19844
19845
  }
@@ -19892,7 +19893,9 @@ dirtyable = {
19892
19893
  return this.observed.dirty;
19893
19894
  },
19894
19895
  set: function(value) {
19895
- return this.observed.dirty = value;
19896
+ this.observed.dirty = value;
19897
+ this.observation.scheduler.schedule()
19898
+ return value;
19896
19899
  }
19897
19900
  },
19898
19901
  record: {
@@ -20318,7 +20321,7 @@ restful = {
20318
20321
  return callback.call(this);
20319
20322
  },
20320
20323
  reload: function() {
20321
- var data, param, params, promise, _i, _len;
20324
+ var data, param, params, promise,_i, _len;
20322
20325
 
20323
20326
  params = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
20324
20327
  data = params.pop();
@@ -20382,7 +20385,9 @@ restful = {
20382
20385
  delete attributes[association_name];
20383
20386
  delete attributes[association_name + "_attributes"];
20384
20387
  if (association_attributes) {
20385
- this[association_name] = this["build_" + association_name](association_attributes);
20388
+ associated = this[association_name] || this["build_" + association_name]();
20389
+ associated.assign_attributes(association_attributes);
20390
+ this[association_name] = associated;
20386
20391
  }
20387
20392
  }
20388
20393
  _ref3 = model[this.resource.toString()].belongs_to;
@@ -20392,7 +20397,9 @@ restful = {
20392
20397
  delete attributes[association_name];
20393
20398
  delete attributes[association_name + "_attributes"];
20394
20399
  if (association_attributes) {
20395
- this[association_name] = this["build_" + association_name](association_attributes);
20400
+ associated = this[association_name] || this["build_" + association_name]();
20401
+ associated.assign_attributes(association_attributes);
20402
+ this[association_name] = associated;
20396
20403
  }
20397
20404
  }
20398
20405
  _results = [];
@@ -20815,7 +20822,7 @@ scopable = {
20815
20822
  }
20816
20823
  return true;
20817
20824
  }
20818
- },
20825
+ },
20819
20826
  after_mix: function() {
20820
20827
  var name, property, type, _results;
20821
20828
 
@@ -21300,6 +21307,9 @@ associationable = stampit({
21300
21307
  throw new Error('Only has_one associations are supported to validates_associated');
21301
21308
  }
21302
21309
  associated_validation = record[attribute].validate();
21310
+ // observed = record.observation.observers.self.oldObject_
21311
+ // observed && (observed[attribute].validation = associated_validation)
21312
+
21303
21313
  associated_validation.done(function() {
21304
21314
  if (record[attribute].errors.length) {
21305
21315
  return record.errors.add(attribute, 'associated', this.options);
@@ -21802,7 +21812,7 @@ var isKind = _dereq_('./isKind');
21802
21812
 
21803
21813
 
21804
21814
  /**
21805
- * Checks if the value is created by the `Object` constructor.
21815
+ * Checks if the value is created by the `Object` constructor.
21806
21816
  */
21807
21817
  function isPlainObject(value) {
21808
21818
  return (!!value
@@ -27111,3 +27121,4 @@ require.register("ende/vendor/assets/javascripts/spin/spin.js", function (export
27111
27121
  });
27112
27122
 
27113
27123
  require("ende")
27124
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ende
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heitor Salazar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-04 00:00:00.000000000 Z
11
+ date: 2014-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler