dou-rails 0.0.7 → 0.0.8

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: 3170d3e50fdf9d10f897efe11dc3e48b2969daed
4
- data.tar.gz: ab4e24a52ba43594b9b985db25c09782af68d5fb
3
+ metadata.gz: 31164babbfddecf8bb96ce2e85fdb33ec5b4641c
4
+ data.tar.gz: 74396003fadf74568afee34bd5e400b2e84cad24
5
5
  SHA512:
6
- metadata.gz: 63fb4dd58bc0b117106d55a04afac4fbba3ddea81ac49c5cc8e81bc86998db3684d4d391fc0d6bf234517b64701c1d8c6c8b1bad5ff49352e8a4ecca73b0d2d0
7
- data.tar.gz: 6c89b90a355379a963f35477b22fb1770985dda5ceb25e7e547e3b6aa0298bb347c12aeba67c1eaf1f54d149bd0c2a6ddf9481dbcd1c73b1d790f3a78d5fc749
6
+ metadata.gz: 7b3116fcc782a3416379029972a37647d47adb015230fc7f77b4e79839d7b0360bd0be0427107ce1f62c047177e9c671fa15f7699dd4f85801272a486f8ac837
7
+ data.tar.gz: f99d104f966ffd9d5a0b72793e094ad8be8e07ad0f8807a685e45146f26e42cd1768a828a22598551402f5c7691e704943127ce2783a2a364d29983721b70bd6
data/lib/dou/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dou
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -1,2 +1,2 @@
1
- /*! Dou v0.0.7 | (c) Hatio, Lab. | MIT License */
2
- !function(t){function n(){var t,n,e=Array.prototype.slice.call(arguments),i=[];"string"==typeof e[0]&&(t=e.shift()),o(e[0])&&(i=e.shift()),n=e.shift(),r[t]=[i,n]}function e(t){function n(n){var e=t.split("/"),r=n.split("/"),i=!1;for(e.pop();".."==r[0]&&e.length;)e.pop(),r.shift(),i=!0;return"."==r[0]&&(r.shift(),i=!0),i&&(r=e.concat(r)),r.join("/")}var o,s,c;return"undefined"==typeof i[t]&&(o=r[t],o&&(c=o[0],s=o[1],i[t]=s.apply(void 0,u(c,function(t){return e(n(t))})))),i[t]}var r={},i={},o=Array.isArray||function(t){return t.constructor==Array},u=Array.map||function(t,n,e){for(var r=0,i=t.length,o=[];i>r;r++)o.push(n.call(e,t[r]));return o};!function(){var t=[].slice,e={}.hasOwnProperty;n("build/js/utils",[],function(){"use strict";var n,r;return n=100,r=0,{merge:function(){var n,r,i,o,u,s,c;for(o=arguments[0],n=2<=arguments.length?t.call(arguments,1):[],o&&typeof o!==!1||(o={}),s=0,c=n.length;c>s;s++){i=n[s];for(r in i)e.call(i,r)&&(u=i[r],o[r]="object"!=typeof u?u:this.merge(o[r],u))}return o},push:function(t,n,r){var i,o;if(!t||!n)return t;for(i in n)if(e.call(n,i)){if(o=n[i],t[i]&&r)throw new Error('utils.push attempted to overwrite "'+i+'" while running in protected mode');"object"==typeof t[i]&&"object"==typeof n[i]?this.push(t[i],n[i]):t[i]=n[i]}return t},isEnumerable:function(t,n){return Object.keys(t).indexOf(n)>-1},compose:function(){var t;return t=arguments,function(){var n,e,r,i;for(n=arguments,e=r=i=t.length-1;0>=i?0>=r:r>=0;e=0>=i?++r:--r)n=t[e].apply(this,n);return n[0]}},uniqueArray:function(t){var n,e,r,i,o;for(r={},n=[],i=0,o=t.length;o>i;i++)e=t[i],r.hasOwnProperty(e)||(n.push(e),r[e]=1);return n},debounce:function(t,e,r){var i,o;return"number"!=typeof e&&(e=n),o=0,i=null,function(){var n,u,s,c;return s=this,n=arguments,c=function(){return o=null,r?void 0:i=t.apply(s,n)},u=r&&!o,clearTimeout(o),o=setTimeout(c,e),u&&(i=t.apply(s,n)),i}},throttle:function(t,e){var r,i,o,u,s,c,a;return"number"!=typeof e&&(e=n),i=r=c=s=o=u=null,a=this.debounce(function(){return o=s=!1},e),function(){var n;return i=this,r=arguments,n=function(){return c=null,o&&(u=t.apply(i,r)),a()},c||(c=setTimeout(n,e)),s?o=!0:(s=!0,u=t.apply(i,r)),a(),u}},countThen:function(t,n){return function(){return--t?void 0:n.apply(this,arguments)}},delegate:function(t){return function(n,r){var i,o,u;u=$(n.target),i=null;for(o in t)if(e.call(t,o)&&!n.isPropagationStopped()&&(i=u.closest(o)).length)return r=r||{},r.el=i[0],t[o].apply(this,[n,r])}},once:function(t){var n,e;return n=!1,e=null,function(){return n?e:(e=t.apply(this,arguments),n=!0,e)}},uniqueId:function(t){var n;return n=++r+"",t?t+n:n}}})}.call(this),function(){var t={}.hasOwnProperty;n("build/js/debug",[],function(){"use strict";var n,e,r,i,o,u,s,c,a,l,f,h,p,g,v,y,m,d,b,w;return h="undefined"==typeof window?{}:window,w=function(n,e,r){var i,o,u,s;r=r||{},i=r.obj||h,o=r.path||(i===h?"global":""),s=[];for(u in i)t.call(i,u)&&((b[n]||n)(e,i,u)&&console.log(""+o+"."+u+" -> ("+typeof i[u]+")",i[u]),i[u]&&"object"==typeof i[u]&&i[u]!==i?s.push(w(n,e,{obj:i[u],path:""+o+"."+u})):s.push(void 0));return s},m=function(t,n,e,r){return n&&typeof e!==n?console.error(""+e+" must be "+n):w(t,e,r)},b={name:function(t,n,e){return t===e},nameContains:function(t,n,e){return e.indexOf(t)>-1},type:function(t,n,e){return n[e]instanceof t},value:function(t,n,e){return n[e]===t},valueCoerced:function(t,n,e){return n[e]==t}},e=function(t,n){return m("name","string",t,n)},r=function(t,n){return m("nameContains","string",t,n)},i=function(t,n){return m("type","function",t,n)},o=function(t,n){return m("value",null,t,n)},u=function(t,n){return m("valueCoerced",null,t,n)},s=function(t,n){return w(t,null,n)},l=function(){var t;return t=[].slice.call(arguments),g.eventNames.length||(g.eventNames=n),g.actions=t.length?t:n,y()},f=function(){var t;return t=[].slice.call(arguments),g.actions.length||(g.actions=n),g.eventNames=t.length?t:n,y()},p=function(){return g.actions=[],g.eventNames=[],y()},d=function(){return g.actions=n,g.eventNames=n,y()},y=function(){return h.localStorage?(h.localStorage.setItem("logFilter_eventNames",g.eventNames),h.localStorage.setItem("logFilter_actions",g.actions)):void 0},v=function(){var e,r,i;r={eventNames:h.localStorage&&h.localStorage.getItem("logFilter_eventNames")||a,actions:h.localStorage&&h.localStorage.getItem("logFilter_actions")||c};for(e in r)t.call(r,e)&&(i=r[e],"string"==typeof i&&i!==n&&(r[e]=i.split(".")));return r},n="all",a=[],c=[],g=v(),{enable:function(t){return this.enabled=!!t,t&&h.console&&(console.info("Booting in DEBUG mode"),console.info("You can configure event logging with DEBUG.events.logAll()/logNone()/logByName()/logByAction()")),h.DEBUG=this},find:{byName:e,byNameContains:r,byType:i,byValue:o,byValueCoerced:u,custom:s},events:{logFilter:g,logByAction:l,logByName:f,logAll:d,logNone:p}}})}.call(this),function(){var t={}.hasOwnProperty;n("build/js/compose",["./utils","./debug"],function(n,e){"use strict";var r,i,o,u,s,c;if(r=e.enabled&&!n.isEnumerable(Object,"getOwnPropertyDescriptor"),i=["mixedIn","mixingIn"],r)try{Object.getOwnPropertyDescriptor(Object,"keys")}catch(a){o=a,r=!1}return s=function(n,e){var o,u,s;if(r){s=Object.create(null);for(u in n)t.call(n,u)&&i.indexOf(0>u)&&(o=Object.getOwnPropertyDescriptor(n,u),o.writable=e,s[u]=o);return Object.defineProperties(n,s)}},c=function(t,n,e){var i;return r&&t.hasOwnProperty(n)?(i=Object.getOwnPropertyDescriptor(t,n).writable,Object.defineProperties(t,n,{writable:!0}),e.call(t),Object.defineProperties(t,n,{writable:i})):e.call(t)},u=function(t,n){var e,r;if(!(n instanceof Array))return this.mixin(t,[n]);for(t.mixedIn=t.hasOwnProperty("mixedIn")?t.mixedIn:[],t.mixingIn=t.hasOwnProperty("mixingIn")?t.mixingIn:[],s(t,!1),e=0,r=n.length;r>e;e++)if(u=n[e],-1===t.mixedIn.indexOf(u)){if(t.mixingIn.indexOf(u)>-1)throw new Error("found cyclic dependencies between "+t.mixingIn);t.mixingIn.push(u),u.call(t),t.mixingIn.pop(),t.mixedIn.push(u)}return s(t,!0)},{mixin:u,unlockProperty:c}})}.call(this),function(){n("build/js/advice",["./compose"],function(t){"use strict";var n;return n={around:function(t,n){return function(){var e,r,i,o,u,s;for(o=arguments.length,e=new Array(o+1),e[0]=t.bind(this),i=u=0,s=e.length;s>u;i=++u)r=e[i],e[i+1]=arguments[i];return n.apply(this,e)}},before:function(t,n){var e;return e="function"==typeof n?n:n.obj[n.fnName],function(){return e.apply(this,arguments),t.apply(this,arguments)}},after:function(t,n){var e;return e="function"==typeof n?n:n.obj[n.fnName],function(){var n;return n=(t.unbound||t).apply(this,arguments),e.apply(this,arguments),n}},withAdvice:function(){return["before","after","around"].forEach(function(e){return this[e]=function(r,i){return t.unlockProperty(this,r,function(){return this[r]="function"==typeof this[r]?n[e](this[r],i):i,this[r]})}},this)}}})}.call(this),function(){n("build/js/event",["./utils"],function(t){"use strict";var n,e,r,i,o,u,s,c;s=[].slice,n={withEvent:function(){var t,e,r,i,o;for(i=["on","off","once","trigger"],o=[],e=0,r=i.length;r>e;e++)t=i[e],o.push(this[t]=n[t]);return o},on:function(t,n,e){var i;return r(this,"on",t,[n,e])&&n?(this._events||(this._events={}),i=this._events[t]||(this._events[t]=[]),i.push({callback:n,context:e,ctx:e||this}),this):this},once:function(n,e,i){var o,u;return r(this,"once",n,[e,i])&&e?(u=this,o=t.once(function(){return u.off(n,o),e.apply(this,arguments)}),o._callback=e,this.on(n,o,i)):this},off:function(t,n,e){var i,o,u,s,c,a,l,f,h,p;if(!this._events||!r(this,"off",t,[n,e]))return this;if(!t&&!n&&!e)return this._events=void 0,this;for(c=t?[t]:Object.keys(this._events),u=l=0,h=c.length;h>l;u=++l)if(t=c[u],o=this._events[t]){if(this._events[t]=a=[],n||e)for(s=f=0,p=o.length;p>f;s=++f)i=o[s],(n&&n!==i.callback&&n!==i.callback._callback||e&&e!==i.context)&&a.push(i);a.length||delete this._events[t]}return this},trigger:function(t){var n,e,i;return this._events?(e=s.call(arguments,1),r(this,"trigger",t,e)?(i=this._events[t],n=this._events.all,i&&c(i,e),n&&c(n,arguments),this):this):this},stopListening:function(t,n,e){var r,i,o;if(i=this._listeningTo,!i)return this;o=!n&&!e,e||"object"!=typeof n||(e=this),t&&((i={})[t._listenId]=t);for(r in i)t=i[r],t.off(n,e,this),(o||_.isEmpty(t._events))&&delete this._listeningTo[r];return this}},e=/\s+/,r=function(t,n,r,i){var o,u,s,c,a;if(!r)return!0;if("object"==typeof r){for(o in r)s=r[o],t[n].apply(t,[o,s].concat(i));return!1}if(e.test(r)){for(u=r.split(e),c=0,a=u.length;a>c;c++)s=u[c],t[n].apply(t,[s].concat(i));return!1}return!0},c=function(t,n){var e,r,i,o;for(o=[],r=0,i=t.length;i>r;r++)e=t[r],o.push(e.callback.apply(e.ctx,n));return o},o={listenTo:"on",listenToOnce:"once"};for(u in o)i=o[u],n[u]=function(n,e,r){var o,u;return u=this._listeningTo||(this._listeningTo={}),o=n._listenId||(n._listenId=t.uniqueId("l")),u[o]=n,r||"object"!=typeof e||(r=this),n[i](e,r,this),this};return n})}.call(this),function(){var t={}.hasOwnProperty;n("build/js/property",["./utils","./compose","./event"],function(n,e,r){"use strict";return function(){return e.mixin(this,r.withEvent),this.set=function(e,r){var i,o,u,s,c;if(!e)return this;if(arguments.length>1&&"string"==typeof arguments[0])return o={},o[e]=r,this.set(o);this.attrs||(this.attrs={}),o=e,i={},u={},s=this.attrs;for(e in s)t.call(s,e)&&(r=s[e],u[e]=r);n.push(this.attrs,o),c=this.attrs;for(e in c)t.call(c,e)&&(r=c[e],r!==u[e]?i[e]=r:delete u[e]);return 0!==Object.keys(i).length&&this.trigger("change",{before:u,after:i},!0),this},this.get=function(t){return this.attrs&&this.attrs[t]}}})}.call(this),function(){var t={}.hasOwnProperty;n("build/js/lifecycle",["./compose","./property"],function(n,e){"use strict";return function(){return n.mixin(this,e),this.initialize=function(n){var e,r,i,o;n||(n={}),e={};for(r in n)t.call(n,r)&&(i=n[r],e[r]=i);o=this.defaults;for(r in o)t.call(o,r)&&(i=o[r],e.hasOwnProperty(r)||(e[r]=i));return this.set(e),this},this.despose=function(){}}})}.call(this),function(){n("build/js/serialize",["./compose","./property"],function(t,n){"use strict";return function(){return t.mixin(this,n),this.serialize=function(){return["type: "+this.name,"id: "+this.id,"props: "+JSON.stringify(this.attrs)].join(",")},this.deserialize=function(){}}})}.call(this),function(){var t={}.hasOwnProperty,e=function(n,e){function r(){this.constructor=n}for(var i in e)t.call(e,i)&&(n[i]=e[i]);return r.prototype=e.prototype,n.prototype=new r,n.__super__=e.prototype,n};n("build/js/dou",["./compose","./advice","./lifecycle","./property","./serialize","./event"],function(t,n,r,i,o,u){"use strict";var s,c;return s=function(n){var r;return r=n["extends"]?function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n}(n["extends"]):function(){function t(){}return t}(),n.mixins&&t.mixin(r.prototype,n.mixins),n.name&&(r.name=n.name),r},c=function(n,e){return t.mixin("function"==typeof n?n.prototype:n,e)},{define:s,mixin:c,"with":{advice:n.withAdvice,property:i,lifecycle:r,event:u.withEvent,serialize:o}}})}.call(this),function(){n("build/js/index",["./advice","./compose","./debug","./event","./lifecycle","./property","./serialize","./utils","./dou"],function(t,n,e,r,i,o,u,s,c){"use strict";return{advice:t,compose:n,debug:e,event:r,lifecycle:i,property:o,serialize:u,utils:s,dou:c}})}.call(this),t.dou=e("build/js/dou")}(this);
1
+ /*! Dou v0.0.8 | (c) Hatio, Lab. | MIT License */
2
+ !function(t){function n(){var t,n,e=Array.prototype.slice.call(arguments),i=[];"string"==typeof e[0]&&(t=e.shift()),o(e[0])&&(i=e.shift()),n=e.shift(),r[t]=[i,n]}function e(t){function n(n){var e=t.split("/"),r=n.split("/"),i=!1;for(e.pop();".."==r[0]&&e.length;)e.pop(),r.shift(),i=!0;return"."==r[0]&&(r.shift(),i=!0),i&&(r=e.concat(r)),r.join("/")}var o,u,c;return"undefined"==typeof i[t]&&(o=r[t],o&&(c=o[0],u=o[1],i[t]=u.apply(void 0,s(c,function(t){return e(n(t))})))),i[t]}var r={},i={},o=Array.isArray||function(t){return t.constructor==Array},s=Array.map||function(t,n,e){for(var r=0,i=t.length,o=[];i>r;r++)o.push(n.call(e,t[r]));return o};!function(){var t=[].slice,e={}.hasOwnProperty;n("build/js/utils",[],function(){"use strict";var n,r;return n=100,r=0,{merge:function(){var n,r,i,o,s,u,c;for(o=arguments[0],n=2<=arguments.length?t.call(arguments,1):[],o&&typeof o!==!1||(o={}),u=0,c=n.length;c>u;u++){i=n[u];for(r in i)e.call(i,r)&&(s=i[r],o[r]="object"!=typeof s?s:this.merge(o[r],s))}return o},push:function(t,n,r){var i,o;if(!t||!n)return t;for(i in n)if(e.call(n,i)){if(o=n[i],t[i]&&r)throw new Error('utils.push attempted to overwrite "'+i+'" while running in protected mode');"object"==typeof t[i]&&"object"==typeof n[i]?this.push(t[i],n[i]):t[i]=n[i]}return t},isEnumerable:function(t,n){return Object.keys(t).indexOf(n)>-1},compose:function(){var t;return t=arguments,function(){var n,e,r,i;for(n=arguments,e=r=i=t.length-1;0>=i?0>=r:r>=0;e=0>=i?++r:--r)n=t[e].apply(this,n);return n[0]}},uniqueArray:function(t){var n,e,r,i,o;for(r={},n=[],i=0,o=t.length;o>i;i++)e=t[i],r.hasOwnProperty(e)||(n.push(e),r[e]=1);return n},debounce:function(t,e,r){var i,o;return"number"!=typeof e&&(e=n),o=0,i=null,function(){var n,s,u,c;return u=this,n=arguments,c=function(){return o=null,r?void 0:i=t.apply(u,n)},s=r&&!o,clearTimeout(o),o=setTimeout(c,e),s&&(i=t.apply(u,n)),i}},throttle:function(t,e){var r,i,o,s,u,c,a;return"number"!=typeof e&&(e=n),i=r=c=u=o=s=null,a=this.debounce(function(){return o=u=!1},e),function(){var n;return i=this,r=arguments,n=function(){return c=null,o&&(s=t.apply(i,r)),a()},c||(c=setTimeout(n,e)),u?o=!0:(u=!0,s=t.apply(i,r)),a(),s}},countThen:function(t,n){return function(){return--t?void 0:n.apply(this,arguments)}},delegate:function(t){return function(n,r){var i,o,s;s=$(n.target),i=null;for(o in t)if(e.call(t,o)&&!n.isPropagationStopped()&&(i=s.closest(o)).length)return r=r||{},r.el=i[0],t[o].apply(this,[n,r])}},once:function(t){var n,e;return n=!1,e=null,function(){return n?e:(e=t.apply(this,arguments),n=!0,e)}},uniqueId:function(t){var n;return n=++r+"",t?t+n:n}}})}.call(this),function(){var t={}.hasOwnProperty;n("build/js/debug",[],function(){"use strict";var n,e,r,i,o,s,u,c,a,l,f,h,p,g,v,y,m,d,b,w;return h="undefined"==typeof window?{}:window,w=function(n,e,r){var i,o,s,u;r=r||{},i=r.obj||h,o=r.path||(i===h?"global":""),u=[];for(s in i)t.call(i,s)&&((b[n]||n)(e,i,s)&&console.log(""+o+"."+s+" -> ("+typeof i[s]+")",i[s]),i[s]&&"object"==typeof i[s]&&i[s]!==i?u.push(w(n,e,{obj:i[s],path:""+o+"."+s})):u.push(void 0));return u},m=function(t,n,e,r){return n&&typeof e!==n?console.error(""+e+" must be "+n):w(t,e,r)},b={name:function(t,n,e){return t===e},nameContains:function(t,n,e){return e.indexOf(t)>-1},type:function(t,n,e){return n[e]instanceof t},value:function(t,n,e){return n[e]===t},valueCoerced:function(t,n,e){return n[e]==t}},e=function(t,n){return m("name","string",t,n)},r=function(t,n){return m("nameContains","string",t,n)},i=function(t,n){return m("type","function",t,n)},o=function(t,n){return m("value",null,t,n)},s=function(t,n){return m("valueCoerced",null,t,n)},u=function(t,n){return w(t,null,n)},l=function(){var t;return t=[].slice.call(arguments),g.eventNames.length||(g.eventNames=n),g.actions=t.length?t:n,y()},f=function(){var t;return t=[].slice.call(arguments),g.actions.length||(g.actions=n),g.eventNames=t.length?t:n,y()},p=function(){return g.actions=[],g.eventNames=[],y()},d=function(){return g.actions=n,g.eventNames=n,y()},y=function(){return h.localStorage?(h.localStorage.setItem("logFilter_eventNames",g.eventNames),h.localStorage.setItem("logFilter_actions",g.actions)):void 0},v=function(){var e,r,i;r={eventNames:h.localStorage&&h.localStorage.getItem("logFilter_eventNames")||a,actions:h.localStorage&&h.localStorage.getItem("logFilter_actions")||c};for(e in r)t.call(r,e)&&(i=r[e],"string"==typeof i&&i!==n&&(r[e]=i.split(".")));return r},n="all",a=[],c=[],g=v(),{enable:function(t){return this.enabled=!!t,t&&h.console&&(console.info("Booting in DEBUG mode"),console.info("You can configure event logging with DEBUG.events.logAll()/logNone()/logByName()/logByAction()")),h.DEBUG=this},find:{byName:e,byNameContains:r,byType:i,byValue:o,byValueCoerced:s,custom:u},events:{logFilter:g,logByAction:l,logByName:f,logAll:d,logNone:p}}})}.call(this),function(){var t={}.hasOwnProperty;n("build/js/compose",["./utils","./debug"],function(n,e){"use strict";var r,i,o,s,u,c;if(r=e.enabled&&!n.isEnumerable(Object,"getOwnPropertyDescriptor"),i=["mixedIn","mixingIn"],r)try{Object.getOwnPropertyDescriptor(Object,"keys")}catch(a){o=a,r=!1}return u=function(n,e){var o,s,u;if(r){u=Object.create(null);for(s in n)t.call(n,s)&&i.indexOf(0>s)&&(o=Object.getOwnPropertyDescriptor(n,s),o.writable=e,u[s]=o);return Object.defineProperties(n,u)}},c=function(t,n,e){var i;return r&&t.hasOwnProperty(n)?(i=Object.getOwnPropertyDescriptor(t,n).writable,Object.defineProperties(t,n,{writable:!0}),e.call(t),Object.defineProperties(t,n,{writable:i})):e.call(t)},s=function(t,n){var e,r;if(!(n instanceof Array))return this.mixin(t,[n]);for(t.mixedIn=t.hasOwnProperty("mixedIn")?t.mixedIn:[],t.mixingIn=t.hasOwnProperty("mixingIn")?t.mixingIn:[],u(t,!1),e=0,r=n.length;r>e;e++)if(s=n[e],-1===t.mixedIn.indexOf(s)){if(t.mixingIn.indexOf(s)>-1)throw new Error("found cyclic dependencies between "+t.mixingIn);t.mixingIn.push(s),s.call(t),t.mixingIn.pop(),t.mixedIn.push(s)}return u(t,!0),t},{mixin:s,unlockProperty:c}})}.call(this),function(){n("build/js/advice",["./compose"],function(t){"use strict";var n;return n={around:function(t,n){return function(){var e,r,i,o,s,u;for(o=arguments.length,e=new Array(o+1),e[0]=t.bind(this),i=s=0,u=e.length;u>s;i=++s)r=e[i],e[i+1]=arguments[i];return n.apply(this,e)}},before:function(t,n){var e;return e="function"==typeof n?n:n.obj[n.fnName],function(){return e.apply(this,arguments),t.apply(this,arguments)}},after:function(t,n){var e;return e="function"==typeof n?n:n.obj[n.fnName],function(){var n;return n=(t.unbound||t).apply(this,arguments),e.apply(this,arguments),n}},withAdvice:function(){return["before","after","around"].forEach(function(e){return this[e]=function(r,i){return t.unlockProperty(this,r,function(){return this[r]="function"==typeof this[r]?n[e](this[r],i):i,this[r]})}},this)}}})}.call(this),function(){n("build/js/event",["./utils"],function(t){"use strict";var n,e,r,i,o,s,u,c;u=[].slice,n={withEvent:function(){var t,e,r,i,o;for(i=["on","off","once","trigger"],o=[],e=0,r=i.length;r>e;e++)t=i[e],o.push(this[t]=n[t]);return o},on:function(t,n,e){var i;return r(this,"on",t,[n,e])&&n?(this._events||(this._events={}),i=this._events[t]||(this._events[t]=[]),i.push({callback:n,context:e,ctx:e||this}),this):this},once:function(n,e,i){var o,s;return r(this,"once",n,[e,i])&&e?(s=this,o=t.once(function(){return s.off(n,o),e.apply(this,arguments)}),o._callback=e,this.on(n,o,i)):this},off:function(t,n,e){var i,o,s,u,c,a,l,f,h,p;if(!this._events||!r(this,"off",t,[n,e]))return this;if(!t&&!n&&!e)return this._events=void 0,this;for(c=t?[t]:Object.keys(this._events),s=l=0,h=c.length;h>l;s=++l)if(t=c[s],o=this._events[t]){if(this._events[t]=a=[],n||e)for(u=f=0,p=o.length;p>f;u=++f)i=o[u],(n&&n!==i.callback&&n!==i.callback._callback||e&&e!==i.context)&&a.push(i);a.length||delete this._events[t]}return this},trigger:function(t){var n,e,i;return this._events?(e=u.call(arguments,1),r(this,"trigger",t,e)?(i=this._events[t],n=this._events.all,i&&c(i,e),n&&c(n,arguments),this):this):this},stopListening:function(t,n,e){var r,i,o;if(i=this._listeningTo,!i)return this;o=!n&&!e,e||"object"!=typeof n||(e=this),t&&((i={})[t._listenId]=t);for(r in i)t=i[r],t.off(n,e,this),(o||_.isEmpty(t._events))&&delete this._listeningTo[r];return this}},e=/\s+/,r=function(t,n,r,i){var o,s,u,c,a;if(!r)return!0;if("object"==typeof r){for(o in r)u=r[o],t[n].apply(t,[o,u].concat(i));return!1}if(e.test(r)){for(s=r.split(e),c=0,a=s.length;a>c;c++)u=s[c],t[n].apply(t,[u].concat(i));return!1}return!0},c=function(t,n){var e,r,i,o;for(o=[],r=0,i=t.length;i>r;r++)e=t[r],o.push(e.callback.apply(e.ctx,n));return o},o={listenTo:"on",listenToOnce:"once"};for(s in o)i=o[s],n[s]=function(n,e,r){var o,s;return s=this._listeningTo||(this._listeningTo={}),o=n._listenId||(n._listenId=t.uniqueId("l")),s[o]=n,r||"object"!=typeof e||(r=this),n[i](e,r,this),this};return n})}.call(this),function(){var t={}.hasOwnProperty;n("build/js/property",["./utils","./compose","./event"],function(n,e,r){"use strict";var i,o;return o=function(e,r){var i,o,s,u,c;if(!e)return this;if(arguments.length>1&&"string"==typeof arguments[0])return o={},o[e]=r,this.set(o);this.attrs||(this.attrs={}),o=e,i={},s={},u=this.attrs;for(e in u)t.call(u,e)&&(r=u[e],s[e]=r);n.push(this.attrs,o),c=this.attrs;for(e in c)t.call(c,e)&&(r=c[e],r!==s[e]?i[e]=r:delete s[e]);return 0!==Object.keys(i).length&&this.trigger("change",{before:s,after:i},!0),this},i=function(t){return this.attrs&&this.attrs[t]},function(){return e.mixin(this,r.withEvent),this.set=o,this.get=i}})}.call(this),function(){var t={}.hasOwnProperty;n("build/js/lifecycle",["./compose","./property"],function(n,e){"use strict";var r,i;return i=function(n){var e,r,i,o;n||(n={}),e={};for(r in n)t.call(n,r)&&(i=n[r],e[r]=i);o=this.defaults;for(r in o)t.call(o,r)&&(i=o[r],e.hasOwnProperty(r)||(e[r]=i));return this.set(e),this},r=function(){},function(){return n.mixin(this,e),this.initialize=i,this.despose=r}})}.call(this),function(){n("build/js/serialize",["./compose","./property"],function(t,n){"use strict";var e,r;return r=function(){return["type: "+this.name,"id: "+this.id,"props: "+JSON.stringify(this.attrs)].join(",")},e=function(){},function(){return t.mixin(this,n),this.serialize||(this.serialize=r),this.deserialize?void 0:this.deserialize=e}})}.call(this),function(){var t={}.hasOwnProperty,e=function(n,e){function r(){this.constructor=n}for(var i in e)t.call(e,i)&&(n[i]=e[i]);return r.prototype=e.prototype,n.prototype=new r,n.__super__=e.prototype,n};n("build/js/dou",["./compose","./advice","./lifecycle","./property","./serialize","./event"],function(t,n,r,i,o,s){"use strict";var u,c;return u=function(n){var r;return r=n["extends"]?function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n}(n["extends"]):function(){function t(){}return t}(),n.mixins&&t.mixin(r.prototype,n.mixins),n.name&&(r.name=n.name),r},c=function(n,e){return t.mixin("function"==typeof n?n.prototype:n,e)},{define:u,mixin:c,"with":{advice:n.withAdvice,property:i,lifecycle:r,event:s.withEvent,serialize:o}}})}.call(this),t.dou=e("build/js/dou")}(this);
@@ -1,4 +1,4 @@
1
- /*! Dou v0.0.7 | (c) Hatio, Lab. | MIT License */
1
+ /*! Dou v0.0.8 | (c) Hatio, Lab. | MIT License */
2
2
  (function(context) {
3
3
  var factories = {}, loaded = {};
4
4
  var isArray = Array.isArray || function(obj) {
@@ -463,7 +463,8 @@
463
463
  base.mixingIn.pop();
464
464
  base.mixedIn.push(mixin);
465
465
  }
466
- return setPropertyWritability(base, true);
466
+ setPropertyWritability(base, true);
467
+ return base;
467
468
  };
468
469
  return {
469
470
  mixin: mixin,
@@ -721,52 +722,55 @@
721
722
  './event'
722
723
  ], function (utils, compose, event) {
723
724
  'use strict';
725
+ var get, set;
726
+ set = function (key, val) {
727
+ var after, attrs, before, _ref, _ref1;
728
+ if (!key) {
729
+ return this;
730
+ }
731
+ if (arguments.length > 1 && typeof arguments[0] === 'string') {
732
+ attrs = {};
733
+ attrs[key] = val;
734
+ return this.set(attrs);
735
+ }
736
+ this.attrs || (this.attrs = {});
737
+ attrs = key;
738
+ after = {};
739
+ before = {};
740
+ _ref = this.attrs;
741
+ for (key in _ref) {
742
+ if (!__hasProp.call(_ref, key))
743
+ continue;
744
+ val = _ref[key];
745
+ before[key] = val;
746
+ }
747
+ utils.push(this.attrs, attrs);
748
+ _ref1 = this.attrs;
749
+ for (key in _ref1) {
750
+ if (!__hasProp.call(_ref1, key))
751
+ continue;
752
+ val = _ref1[key];
753
+ if (val !== before[key]) {
754
+ after[key] = val;
755
+ } else {
756
+ delete before[key];
757
+ }
758
+ }
759
+ if (Object.keys(after).length !== 0) {
760
+ this.trigger('change', {
761
+ before: before,
762
+ after: after
763
+ }, true);
764
+ }
765
+ return this;
766
+ };
767
+ get = function (attr) {
768
+ return this.attrs && this.attrs[attr];
769
+ };
724
770
  return function () {
725
771
  compose.mixin(this, event.withEvent);
726
- this.set = function (key, val) {
727
- var after, attrs, before, _ref, _ref1;
728
- if (!key) {
729
- return this;
730
- }
731
- if (arguments.length > 1 && typeof arguments[0] === 'string') {
732
- attrs = {};
733
- attrs[key] = val;
734
- return this.set(attrs);
735
- }
736
- this.attrs || (this.attrs = {});
737
- attrs = key;
738
- after = {};
739
- before = {};
740
- _ref = this.attrs;
741
- for (key in _ref) {
742
- if (!__hasProp.call(_ref, key))
743
- continue;
744
- val = _ref[key];
745
- before[key] = val;
746
- }
747
- utils.push(this.attrs, attrs);
748
- _ref1 = this.attrs;
749
- for (key in _ref1) {
750
- if (!__hasProp.call(_ref1, key))
751
- continue;
752
- val = _ref1[key];
753
- if (val !== before[key]) {
754
- after[key] = val;
755
- } else {
756
- delete before[key];
757
- }
758
- }
759
- if (Object.keys(after).length !== 0) {
760
- this.trigger('change', {
761
- before: before,
762
- after: after
763
- }, true);
764
- }
765
- return this;
766
- };
767
- return this.get = function (attr) {
768
- return this.attrs && this.attrs[attr];
769
- };
772
+ this.set = set;
773
+ return this.get = get;
770
774
  };
771
775
  });
772
776
  }.call(this));
@@ -777,32 +781,35 @@
777
781
  './property'
778
782
  ], function (compose, withProperty) {
779
783
  'use strict';
780
- return function () {
781
- compose.mixin(this, withProperty);
782
- this.initialize = function (attrs) {
783
- var cloned, key, val, _ref;
784
- attrs || (attrs = {});
785
- cloned = {};
786
- for (key in attrs) {
787
- if (!__hasProp.call(attrs, key))
788
- continue;
789
- val = attrs[key];
784
+ var despose, initialize;
785
+ initialize = function (attrs) {
786
+ var cloned, key, val, _ref;
787
+ attrs || (attrs = {});
788
+ cloned = {};
789
+ for (key in attrs) {
790
+ if (!__hasProp.call(attrs, key))
791
+ continue;
792
+ val = attrs[key];
793
+ cloned[key] = val;
794
+ }
795
+ _ref = this.defaults;
796
+ for (key in _ref) {
797
+ if (!__hasProp.call(_ref, key))
798
+ continue;
799
+ val = _ref[key];
800
+ if (!cloned.hasOwnProperty(key)) {
790
801
  cloned[key] = val;
791
802
  }
792
- _ref = this.defaults;
793
- for (key in _ref) {
794
- if (!__hasProp.call(_ref, key))
795
- continue;
796
- val = _ref[key];
797
- if (!cloned.hasOwnProperty(key)) {
798
- cloned[key] = val;
799
- }
800
- }
801
- this.set(cloned);
802
- return this;
803
- };
804
- return this.despose = function () {
805
- };
803
+ }
804
+ this.set(cloned);
805
+ return this;
806
+ };
807
+ despose = function () {
808
+ };
809
+ return function () {
810
+ compose.mixin(this, withProperty);
811
+ this.initialize = initialize;
812
+ return this.despose = despose;
806
813
  };
807
814
  });
808
815
  }.call(this));
@@ -812,17 +819,24 @@
812
819
  './property'
813
820
  ], function (compose, withProperty) {
814
821
  'use strict';
822
+ var deserialize, serialize;
823
+ serialize = function () {
824
+ return [
825
+ 'type: ' + this.name,
826
+ 'id: ' + this.id,
827
+ 'props: ' + JSON.stringify(this.attrs)
828
+ ].join(',');
829
+ };
830
+ deserialize = function () {
831
+ };
815
832
  return function () {
816
833
  compose.mixin(this, withProperty);
817
- this.serialize = function () {
818
- return [
819
- 'type: ' + this.name,
820
- 'id: ' + this.id,
821
- 'props: ' + JSON.stringify(this.attrs)
822
- ].join(',');
823
- };
824
- return this.deserialize = function () {
825
- };
834
+ if (!this.serialize) {
835
+ this.serialize = serialize;
836
+ }
837
+ if (!this.deserialize) {
838
+ return this.deserialize = deserialize;
839
+ }
826
840
  };
827
841
  });
828
842
  }.call(this));
@@ -891,32 +905,6 @@
891
905
  };
892
906
  });
893
907
  }.call(this));
894
- (function () {
895
- define('build/js/index', [
896
- './advice',
897
- './compose',
898
- './debug',
899
- './event',
900
- './lifecycle',
901
- './property',
902
- './serialize',
903
- './utils',
904
- './dou'
905
- ], function (advice, compose, debug, event, lifecycle, property, serialize, utils, dou) {
906
- 'use strict';
907
- return {
908
- advice: advice,
909
- compose: compose,
910
- debug: debug,
911
- event: event,
912
- lifecycle: lifecycle,
913
- property: property,
914
- serialize: serialize,
915
- utils: utils,
916
- dou: dou
917
- };
918
- });
919
- }.call(this));
920
908
 
921
909
  context.dou = require('build/js/dou');
922
910
  }(this));
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dou-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hearty, Oh