Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version bump - 0.1.1

  • Loading branch information...
commit 6bed6bd4e7978f2a47e187ffb90c787aba4d71be 1 parent 35eecc2
Braden Schaeffer authored
4 builds/ember-ohm.js
View
@@ -4,7 +4,7 @@
// License: Licensed under MIT license (see license.js)
// ==========================================================================
- // Version: 0.1.0.alpha.1
+ // Version: 0.1.1
(function() {
/**
@@ -15,7 +15,7 @@
@class Ohm
*/
window.Ohm = Ember.Namespace.create({
- VERSION: '0.1.0.alpha.1'
+ VERSION: '0.1.1'
});
})();
4 builds/ember-ohm.min.js
View
@@ -4,7 +4,7 @@
// License: Licensed under MIT license (see license.js)
// ==========================================================================
- // Version: 0.1.0.alpha.1
+ // Version: 0.1.1
// Copyright: Copyright 2013 Braden Schaeffer and contributors.
-!function(){window.Ohm=Ember.Namespace.create({VERSION:"0.1.0.alpha.1"})}(),function(){Ohm.Model=Ember.Object.extend({toggleCounter:function(e,t){return t?this.incrementProperty(e):this.decrementProperty(e)},didDefineProperty:function(e,t,r){var i,n;r instanceof Ember.Descriptor&&(i=r.meta(),n=e.constructor,i.isAttribute&&(n._attributes||(n._attributes={}),n._attributes[t]=i))}})}(),function(){Ohm.Serializers=Ember.Namespace.create({_serializers:Ember.Map.create(),register:function(e,t){var r;this._serializers.has(e)||(r=Ohm.Serializers.Serializer.create(t),this._serializers.set(e,r))},lookup:function(e){return this._serializers.get(e)},handleSerialize:function(e,t,r,i){var n=Ohm.Serializers.lookup(t);return n[e].call(n,r,i)}}),Ohm.Serializers.serialize=function(e,t,r){return Ohm.Serializers.handleSerialize("serialize",e,t,r)},Ohm.serialize=Ohm.Serializers.serialize,Ohm.Serializers.deserialize=function(e,t,r){return Ohm.Serializers.handleSerialize("deserialize",e,t,r)},Ohm.deserialize=Ohm.Serializers.deserialize}(),function(){Ohm.Serializers.Serializer=Ember.Object.extend({serialize:Ember.required(),deserialize:Ember.required()})}(),function(){Ohm.Serializers.register("array",{serialize:function(e,t){return this.convertArray(e,t,"serialize")},deserialize:function(e,t){return this.convertArray(e,t,"deserialize")},convertArray:function(e,t,r){var i=e.itemSerializer||"default";return!Ember.isArray(t),t.forEach(function(n,a){var s=Ohm.Serializers.handleSerialize(r,i,e,n);t[a]=s}),t}})}(),function(){Ohm.Serializers.register("boolean",{serialize:function(e,t){return Boolean(t)},deserialize:function(e,t){var r=typeof t;return"boolean"===r?t:"string"===r?null!==t.match(/^true$|^t$|^1$/i):"number"===r?1===t:!1}})}(),function(){Ohm.Serializers.register("default",{serialize:function(e,t){return t},deserialize:function(e,t){return t}})}(),function(){Ohm.Serializers.register("number",{serialize:function(e,t){return this.convertNumber(t)},deserialize:function(e,t){return this.convertNumber(t)},convertNumber:function(e){return Ember.isEmpty(e)?null:Number(e)}})}(),function(){Ohm.Serializers.register("string",{serialize:function(e,t){return this.convertString(t)},deserialize:function(e,t){return this.convertString(t)},convertString:function(e){return Ember.isNone(e)?null:String(e)}})}(),function(){Ohm.Attributes=Ember.Namespace.create({})}(),function(){var e=Ember.get,t=Ember.set;Ohm.Attributes.Changes=Ember.Object.extend({map:null,record:null,length:Ember.computed.alias("map.length"),init:function(){t(this,"map",Ember.Map.create())},get:function(t){return e(this,"map").get(t)},set:function(t,r){e(this,"map").set(t,r),this.setKeyChanged(t,!0)},has:function(t){return e(this,"map").has(t)},remove:function(t){e(this,"map").remove(t),this.setKeyChanged(t,!1)},forEach:function(t,r){e(this,"map").forEach(t,r)},clear:function(){e(this,"map").forEach(function(e){this.remove(e)},this)},setKeyChanged:function(t,r){var i=t+"_changed";e(this,"record").set(i,r)},toJSON:function(){{var t={};e(this,"record").constructor}return this.forEach(function(e,r){return t[e]=r}),t}})}(),function(){{var e,t=Ember.get,r=Ember.set,i=Ember.meta;Ember.isNone}e=function(e,t,r){return r},Ohm.attr=function(n,a){var s,o;return 2!==arguments.length&&("object"==typeof n?(a=n,n="default"):"undefined"==typeof n&&(n="default")),s={defaultValue:void 0,notifies:null,readonly:!1},a=jQuery.extend({},s,a),o={isAttribute:!0,type:n,options:a},Ember.computed("_data",function(s,o){var u=t(this,"_data"),c=t(u||{},s),h=i(this).proto===this,l=t(this,"_changes");return u||(u={},r(this,"_data",u)),l||(l=Ohm.Attributes.Changes.create({record:this}),r(this,"_changes",l)),2===arguments.length?(h&&(l.setKeyChanged(s,!1),c=r(u,s,o)),c!==o?(l.has(s)?l.get(s)===o&&l.remove(s):l.set(s,c),c=r(u,s,o),a.notifies&&this.notifyPropertyChange(a.notifies)):l.remove(s)):"undefined"==typeof c&&(c=r(u,s,a.defaultValue)),e(n,a,c)}).meta(o)}}(),function(){{var e,t,r,i,n,a,s,o,u=Ember.get,c=Ember.set,h=Ember.meta;Ember.EnumerableUtils._replace}e=Ohm.Serializers.lookup("array"),r=function(e,t){return t||(t={}),Ember.isNone(e)&&t.defaultValue&&(e=Ember.copy(t.defaultValue)),Ember.isArray(e)||(e=[]),e=Ember.A(e)},t=function(e,t,r){var i,n;return e=Ember.A(e),t=Ember.A(t),i=e.map(r.comparator).sort().join(),n=t.map(r.comparator).sort().join(),i===n},i=function(e,t,r,i){n(!0,e,t,r,i)},a=function(e,t,r,i){n(!1,e,t,r,i)},n=function(e,t,r,i,n){var a,u;a=e?t.addArrayObserver:t.removeArrayObserver,u={willChange:o(r,i),didChange:s(r,i,n)},a.call(t,null,u)},o=function(e,t){return function(r){return e.has(t)?void 0:e.set(t,Ember.copy(r))}},s=function(e,r,i){return function(n){var a=e.get(r);t(a,n,i)?e.remove(r):e.has(r)||e.set(r,Ember.copy(a))}},Ohm.arrayAttr=function(n,s){var o;return 2!==arguments.length&&("object"==typeof n?(s=n,n="default"):"undefined"==typeof n&&(n="default")),s=jQuery.extend({defaultValue:void 0,readonly:!1,comparator:function(e){return e}},s),o={isAttribute:!0,type:n,options:s},Ember.computed("_data",function(n,o){var l,m,f,d=u(this,"_data"),b=u(d||{},n),g=h(this).proto===this,p=u(this,"_changes");return d||(d=c(this,"_data",{})),p||(p=Ohm.Attributes.Changes.create({record:this}),c(this,"_changes",p)),2===arguments.length?(b=r(b),o=r(o),g?(m=o,i(m,p,n,s)):(l=b,m=o,f=p.has(n)?p.get(n):b,t(f,o,s)?p.remove(n):p.set(n,l)),c(d,n,m)):(m=b,m||(m=r(m,s),i(m,p,n,s),c(d,n,m),p.remove(n))),l&&m&&(a(l,p,n,s),i(m,p,n,s)),e.deserialize(s,m)}).property("_data").meta(o)}}(),function(){var e=Ember.get;Ohm.Model.reopen({isDirty:Ember.computed.gte("_changes.map.length",1),isClean:Ember.computed.not("isDirty"),commit:function(){this.get("isDirty")&&this.get("_changes").clear()},revert:function(){var e=this.get("_changes");this.get("isDirty")&&e.forEach(function(t,r){this.set(t,r),e.remove(t)},this)},getAttributeKeys:function(){var t=e(this.constructor,"attributes");return e(t,"keys.list")},getAttributes:function(e){var t=this.getAttributeKeys();return e?this.serialize.apply(this,t):this.getProperties.apply(this,t)},getChangedKeys:function(){return this.get("_changes.map.keys.list")},getChanges:function(e){var t=this.getChangedKeys();return e?this.serialize.apply(this,t):this.getProperties.apply(this,t)},serialize:function(){var t,r=this,i=this.constructor,n={};return 0===arguments.length?t=e(i,"attributes"):(t=Ember.Map.create(),[].slice.apply(arguments).forEach(function(e){var r=i.getAttribute(e);t.set(r.name,r)})),t.forEach(function(e,t){var i=r.get(e);n[e]=Ohm.serialize(t.type,t.options,i)}),n}}),Ohm.Model.reopenClass({attributes:Ember.computed(function(){var e=Ember.Map.create();return this.eachComputedProperty(function(t,r){r.isAttribute&&(r.name=t,e.set(t,r))}),e}),getAttribute:function(t){var r=e(this,"attributes");return r.get(t)}})}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||Ember.Logger.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");
+!function(){window.Ohm=Ember.Namespace.create({VERSION:"0.1.1"})}(),function(){Ohm.Model=Ember.Object.extend({toggleCounter:function(e,t){return t?this.incrementProperty(e):this.decrementProperty(e)},didDefineProperty:function(e,t,r){var i,n;r instanceof Ember.Descriptor&&(i=r.meta(),n=e.constructor,i.isAttribute&&(n._attributes||(n._attributes={}),n._attributes[t]=i))}})}(),function(){Ohm.Serializers=Ember.Namespace.create({_serializers:Ember.Map.create(),register:function(e,t){var r;this._serializers.has(e)||(r=Ohm.Serializers.Serializer.create(t),this._serializers.set(e,r))},lookup:function(e){return this._serializers.get(e)},handleSerialize:function(e,t,r,i){var n=Ohm.Serializers.lookup(t);return n[e].call(n,r,i)}}),Ohm.Serializers.serialize=function(e,t,r){return Ohm.Serializers.handleSerialize("serialize",e,t,r)},Ohm.serialize=Ohm.Serializers.serialize,Ohm.Serializers.deserialize=function(e,t,r){return Ohm.Serializers.handleSerialize("deserialize",e,t,r)},Ohm.deserialize=Ohm.Serializers.deserialize}(),function(){Ohm.Serializers.Serializer=Ember.Object.extend({serialize:Ember.required(),deserialize:Ember.required()})}(),function(){Ohm.Serializers.register("array",{serialize:function(e,t){return this.convertArray(e,t,"serialize")},deserialize:function(e,t){return this.convertArray(e,t,"deserialize")},convertArray:function(e,t,r){var i=e.itemSerializer||"default";return!Ember.isArray(t),t.forEach(function(n,a){var s=Ohm.Serializers.handleSerialize(r,i,e,n);t[a]=s}),t}})}(),function(){Ohm.Serializers.register("boolean",{serialize:function(e,t){return Boolean(t)},deserialize:function(e,t){var r=typeof t;return"boolean"===r?t:"string"===r?null!==t.match(/^true$|^t$|^1$/i):"number"===r?1===t:!1}})}(),function(){Ohm.Serializers.register("default",{serialize:function(e,t){return t},deserialize:function(e,t){return t}})}(),function(){Ohm.Serializers.register("number",{serialize:function(e,t){return this.convertNumber(t)},deserialize:function(e,t){return this.convertNumber(t)},convertNumber:function(e){return Ember.isEmpty(e)?null:Number(e)}})}(),function(){Ohm.Serializers.register("string",{serialize:function(e,t){return this.convertString(t)},deserialize:function(e,t){return this.convertString(t)},convertString:function(e){return Ember.isNone(e)?null:String(e)}})}(),function(){Ohm.Attributes=Ember.Namespace.create({})}(),function(){var e=Ember.get,t=Ember.set;Ohm.Attributes.Changes=Ember.Object.extend({map:null,record:null,length:Ember.computed.alias("map.length"),init:function(){t(this,"map",Ember.Map.create())},get:function(t){return e(this,"map").get(t)},set:function(t,r){e(this,"map").set(t,r),this.setKeyChanged(t,!0)},has:function(t){return e(this,"map").has(t)},remove:function(t){e(this,"map").remove(t),this.setKeyChanged(t,!1)},forEach:function(t,r){e(this,"map").forEach(t,r)},clear:function(){e(this,"map").forEach(function(e){this.remove(e)},this)},setKeyChanged:function(t,r){var i=t+"_changed";e(this,"record").set(i,r)},toJSON:function(){{var t={};e(this,"record").constructor}return this.forEach(function(e,r){return t[e]=r}),t}})}(),function(){{var e,t=Ember.get,r=Ember.set,i=Ember.meta;Ember.isNone}e=function(e,t,r){return r},Ohm.attr=function(n,a){var s,o;return 2!==arguments.length&&("object"==typeof n?(a=n,n="default"):"undefined"==typeof n&&(n="default")),s={defaultValue:void 0,notifies:null,readonly:!1},a=jQuery.extend({},s,a),o={isAttribute:!0,type:n,options:a},Ember.computed("_data",function(s,o){var u=t(this,"_data"),c=t(u||{},s),h=i(this).proto===this,l=t(this,"_changes");return u||(u={},r(this,"_data",u)),l||(l=Ohm.Attributes.Changes.create({record:this}),r(this,"_changes",l)),2===arguments.length?(h&&(l.setKeyChanged(s,!1),c=r(u,s,o)),c!==o?(l.has(s)?l.get(s)===o&&l.remove(s):l.set(s,c),c=r(u,s,o),a.notifies&&this.notifyPropertyChange(a.notifies)):l.remove(s)):"undefined"==typeof c&&(c=r(u,s,a.defaultValue)),e(n,a,c)}).meta(o)}}(),function(){{var e,t,r,i,n,a,s,o,u=Ember.get,c=Ember.set,h=Ember.meta;Ember.EnumerableUtils._replace}e=Ohm.Serializers.lookup("array"),r=function(e,t){return t||(t={}),Ember.isNone(e)&&t.defaultValue&&(e=Ember.copy(t.defaultValue)),Ember.isArray(e)||(e=[]),e=Ember.A(e)},t=function(e,t,r){var i,n;return e=Ember.A(e),t=Ember.A(t),i=e.map(r.comparator).sort().join(),n=t.map(r.comparator).sort().join(),i===n},i=function(e,t,r,i){n(!0,e,t,r,i)},a=function(e,t,r,i){n(!1,e,t,r,i)},n=function(e,t,r,i,n){var a,u;a=e?t.addArrayObserver:t.removeArrayObserver,u={willChange:o(r,i),didChange:s(r,i,n)},a.call(t,null,u)},o=function(e,t){return function(r){return e.has(t)?void 0:e.set(t,Ember.copy(r))}},s=function(e,r,i){return function(n){var a=e.get(r);t(a,n,i)?e.remove(r):e.has(r)||e.set(r,Ember.copy(a))}},Ohm.arrayAttr=function(n,s){var o;return 2!==arguments.length&&("object"==typeof n?(s=n,n="default"):"undefined"==typeof n&&(n="default")),s=jQuery.extend({defaultValue:void 0,readonly:!1,comparator:function(e){return e}},s),o={isAttribute:!0,type:n,options:s},Ember.computed("_data",function(n,o){var l,m,f,d=u(this,"_data"),b=u(d||{},n),g=h(this).proto===this,p=u(this,"_changes");return d||(d=c(this,"_data",{})),p||(p=Ohm.Attributes.Changes.create({record:this}),c(this,"_changes",p)),2===arguments.length?(b=r(b),o=r(o),g?(m=o,i(m,p,n,s)):(l=b,m=o,f=p.has(n)?p.get(n):b,t(f,o,s)?p.remove(n):p.set(n,l)),c(d,n,m)):(m=b,m||(m=r(m,s),i(m,p,n,s),c(d,n,m),p.remove(n))),l&&m&&(a(l,p,n,s),i(m,p,n,s)),e.deserialize(s,m)}).property("_data").meta(o)}}(),function(){var e=Ember.get;Ohm.Model.reopen({isDirty:Ember.computed.gte("_changes.map.length",1),isClean:Ember.computed.not("isDirty"),commit:function(){this.get("isDirty")&&this.get("_changes").clear()},revert:function(){var e=this.get("_changes");this.get("isDirty")&&e.forEach(function(t,r){this.set(t,r),e.remove(t)},this)},getAttributeKeys:function(){var t=e(this.constructor,"attributes");return e(t,"keys.list")},getAttributes:function(e){var t=this.getAttributeKeys();return e?this.serialize.apply(this,t):this.getProperties.apply(this,t)},getChangedKeys:function(){return this.get("_changes.map.keys.list")},getChanges:function(e){var t=this.getChangedKeys();return e?this.serialize.apply(this,t):this.getProperties.apply(this,t)},serialize:function(){var t,r=this,i=this.constructor,n={};return 0===arguments.length?t=e(i,"attributes"):(t=Ember.Map.create(),[].slice.apply(arguments).forEach(function(e){var r=i.getAttribute(e);t.set(r.name,r)})),t.forEach(function(e,t){var i=r.get(e);n[e]=Ohm.serialize(t.type,t.options,i)}),n}}),Ohm.Model.reopenClass({attributes:Ember.computed(function(){var e=Ember.Map.create();return this.eachComputedProperty(function(t,r){r.isAttribute&&(r.name=t,e.set(t,r))}),e}),getAttribute:function(t){var r=e(this,"attributes");return r.get(t)}})}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||Ember.Logger.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");
4 builds/ember-ohm.prod.js
View
@@ -4,7 +4,7 @@
// License: Licensed under MIT license (see license.js)
// ==========================================================================
- // Version: 0.1.0.alpha.1
+ // Version: 0.1.1
(function() {
/**
@@ -15,7 +15,7 @@
@class Ohm
*/
window.Ohm = Ember.Namespace.create({
- VERSION: '0.1.0.alpha.1'
+ VERSION: '0.1.1'
});
})();
Please sign in to comment.
Something went wrong with that request. Please try again.