hippodrome 0.1.6 → 0.1.7

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: ae42580b4c7a0033b2b37cd687556b99fe4c72ae
4
- data.tar.gz: 1a94a0534fcec0b157ddb7f9dc99582ae7b25517
3
+ metadata.gz: 90d1d3261103fe6cf21ea04d9f8f400470adbcd5
4
+ data.tar.gz: 903fe3308a249b12b6c32eeac90238d3ae72257e
5
5
  SHA512:
6
- metadata.gz: 7af98771837e50bf5a5ea19dfb0886e1865c288dc360f5119f3a66aae6350b7649fd104e32ebb82c1621ca3418f2f2220c7360b1e503102fc1fb874a05da054b
7
- data.tar.gz: efbbd5e7034ee2ddc594d1b6bcb04e8472a1a85974bffa7909a26aca3ed451266f29d58a21b953013c00a550ab209986d6d6ec39f2cfa1b8147b8a0b73e01f37
6
+ metadata.gz: 29ccb362c787847e02f4357a64ad3f27f9f207fc38c6a886d0b6257cbe973ff0d7fe13a893ef828e59cccf13497fed23822404697a1c0ef2879a707287f158c3
7
+ data.tar.gz: 3a5fb979f6a3c8ebfa00f16a158137b4e47ea34c6ba07b6f16d02324bb86cc08fa2dde5a1881432e3f11bfeb057f3ff6253192007305ab9a0ccefba7842742a1
@@ -165,8 +165,10 @@
165
165
  fn = context[fn];
166
166
  }
167
167
  return function() {
168
+ var args;
169
+ args = arguments;
168
170
  return setTimeout((function() {
169
- return fn.call(context);
171
+ return fn.apply(context, args);
170
172
  }), 1);
171
173
  };
172
174
  };
@@ -1,3 +1,3 @@
1
1
  //= require lodash
2
2
 
3
- (function(){var t,i,s,e,n,r,a,c,o,l,p,h,u,d=[].slice;p="undefined"==typeof window,u=p?require("lodash"):this._,e={},c=function(){var t,i,s,e,n;if(s=arguments[0],n=arguments[1],i=3<=arguments.length?d.call(arguments,2):[],!s)throw t=0,e=new Error("Assertion Failed: "+n.replace(/%s/g,function(){return i[t++]})),e.framesToPop=1,e;return s},n=function(t){return this._lastId=1,this._prefix=t},n.prototype.next=function(){return""+this._prefix+"_"+this._lastId++},a=new n("Action_ID"),t=function(t,i){var s,n,r,c;return r=""+a.next()+"_"+t,n=function(){var t;return t=i.apply(null,arguments),t.action=r,t},c=function(t){return e.Dispatcher.dispatch(t)},s=function(){var t;return t=n.apply(null,arguments),c(t)},s.buildPayload=n,s.send=c,s.displayName=t,s.id=r,s.toString=function(){return r},s},e.Action=t,s=function(){return this._callbacksByAction={},this._isStarted={},this._isFinished={},this._isDispatching=!1,this._payload=null},l=new n("Dispatcher_ID"),s.prototype.register=function(){var t,i,s,e,n,r,a;return i=u.compact(arguments),3===i.length?this.register(i[0],i[1],[],i[2]):(r=i[0],t=i[1],n=i[2],s=i[3],null==(a=this._callbacksByAction)[t]&&(a[t]={}),e=l.next(),this._callbacksByAction[t][e]={callback:s,prerequisites:u.map(n,function(i){return i._storeImpl.dispatcherIdsByAction[t]})},e)},s.prototype.unregister=function(t,i){return c(this._callbacksByAction[t][i],"Dispatcher.unregister(%s, %s) does not map to a registered callback.",t.displayName,i),this._callbacksByAction[t][i]=null},s.prototype.waitFor=function(t,i){return c(this._isDispatching,"Dispatcher.waitFor must be invoked while dispatching."),u.forEach(i,function(i){return function(s){return i._isStarted[s]?void c(i._isFinished[s],"Dispatcher.waitFor encountered circular dependency while waiting for `%s` during %s.",s,t.displayName):(c(i._callbacksByAction[t][s],"Dispatcher.waitFor `%s` is not a registered callback for %s.",s,t.displayName),i.invokeCallback(t,s))}}(this))},s.prototype.dispatch=function(t){var i;c(!this._isDispatching,"Dispatch.dispatch cannot be called during dispatch."),this.startDispatching(t);try{return i=t.action,u.forEach(this._callbacksByAction[i],function(t){return function(s,e){return t._isStarted[e]?void 0:t.invokeCallback(i,e)}}(this))}finally{this.stopDispatching()}},s.prototype.invokeCallback=function(t,i){var s,e,n;return this._isStarted[i]=!0,n=this._callbacksByAction[t][i],s=n.callback,e=n.prerequisites,this.waitFor(t,e),s(this._payload),this._isFinished[i]=!0},s.prototype.startDispatching=function(t){return this._isStarted={},this._isFinished={},this._payload=t,this._isDispatching=!0},s.prototype.stopDispatching=function(){return this._payload=null,this._isDispatching=!1},e.Dispatcher=new s,h=function(t,i){return"string"==typeof i&&(i=t[i]),function(){return setTimeout(function(){return i.call(t)},1)}},i=function(t){var i,s,n;return this.displayName=t.displayName,c(t.action||t.dispatches,"Deferred Task "+this.displayName+" must include either an action key or dispatches list."),c(!t.action||t.task,"Deferred Task "+this.displayName+" declared an action, it must declare a task."),u.assign(this,u.omit(t,"dispatches","action","task"),o(this)),this._dispatcherIdsByAction={},t.initialize&&t.initialize.call(this),t.action&&t.task&&(i=t.action,n=t.task,n=h(this,n),s=e.Dispatcher.register(this,i.id,[],n),this._dispatcherIdsByAction[i.id]=s),t.dispatches&&u.forEach(t.dispatches,function(t){return function(n){var r;return i=n.action,r=n.callback,c(!t._dispatcherIdsByAction[i.id],"Deferred Task "+t.displayName+" registered two callbacks for the action "+i.displayName+"."),r=h(t,r),s=e.Dispatcher.register(t,i.id,[],r),t._dispatcherIdsByAction[i.id]=s}}(this)),this},e.DeferredTask=i,o=function(t){return function(i,s){return s instanceof Function?s.bind(t):s}},r=function(t){return this._storeImpl={trigger:function(){return u.each(this.callbacks,function(t){return t()})}},this._storeImpl.dispatcherIdsByAction={},this._storeImpl.callbacks=[],u.assign(this._storeImpl,u.omit(t,"initialize","dispatches","public"),o(this._storeImpl)),t["public"]&&(u.assign(this,t["public"],o(this._storeImpl)),u.assign(this._storeImpl,t["public"],o(this._storeImpl))),this.displayName=t.displayName,t.initialize&&t.initialize.call(this._storeImpl),t.dispatches&&u.forEach(t.dispatches,function(t){return function(i){var s,n,r,a;return s=i.action,n=i.after,r=i.callback,c(!t._storeImpl.dispatcherIdsByAction[s.id],"Store "+t.displayName+" registered two callbacks for action "+s.displayName),"string"==typeof r&&(r=t._storeImpl[r]),r=r.bind(t._storeImpl),a=e.Dispatcher.register(t,s.id,n,r),t._storeImpl.dispatcherIdsByAction[s.id]=a}}(this)),this},r.prototype.register=function(t){return this._storeImpl.callbacks.push(t)},r.prototype.unregister=function(t){return this._storeImpl.callbacks=u.reject(this._storeImpl.callbacks,function(i){return i===t})},r.prototype.listen=function(t){var i;return i=this,{componentDidMount:function(){return i.register(this[t])},componentWillUnmount:function(){return i.unregister(this[t])}}},r.prototype.trigger=function(){return this._storeImpl.trigger()},e.Store=r,p?module.exports=e:this.Hippodrome=e}).call(this);
3
+ (function(){var t,i,s,e,r,n,a,c,o,l,p,h,u,d=[].slice;p="undefined"==typeof window,u=p?require("lodash"):this._,e={},c=function(){var t,i,s,e,r;if(s=arguments[0],r=arguments[1],i=3<=arguments.length?d.call(arguments,2):[],!s)throw t=0,e=new Error("Assertion Failed: "+r.replace(/%s/g,function(){return i[t++]})),e.framesToPop=1,e;return s},r=function(t){return this._lastId=1,this._prefix=t},r.prototype.next=function(){return""+this._prefix+"_"+this._lastId++},a=new r("Action_ID"),t=function(t,i){var s,r,n,c;return n=""+a.next()+"_"+t,r=function(){var t;return t=i.apply(null,arguments),t.action=n,t},c=function(t){return e.Dispatcher.dispatch(t)},s=function(){var t;return t=r.apply(null,arguments),c(t)},s.buildPayload=r,s.send=c,s.displayName=t,s.id=n,s.toString=function(){return n},s},e.Action=t,s=function(){return this._callbacksByAction={},this._isStarted={},this._isFinished={},this._isDispatching=!1,this._payload=null},l=new r("Dispatcher_ID"),s.prototype.register=function(){var t,i,s,e,r,n,a;return i=u.compact(arguments),3===i.length?this.register(i[0],i[1],[],i[2]):(n=i[0],t=i[1],r=i[2],s=i[3],null==(a=this._callbacksByAction)[t]&&(a[t]={}),e=l.next(),this._callbacksByAction[t][e]={callback:s,prerequisites:u.map(r,function(i){return i._storeImpl.dispatcherIdsByAction[t]})},e)},s.prototype.unregister=function(t,i){return c(this._callbacksByAction[t][i],"Dispatcher.unregister(%s, %s) does not map to a registered callback.",t.displayName,i),this._callbacksByAction[t][i]=null},s.prototype.waitFor=function(t,i){return c(this._isDispatching,"Dispatcher.waitFor must be invoked while dispatching."),u.forEach(i,function(i){return function(s){return i._isStarted[s]?void c(i._isFinished[s],"Dispatcher.waitFor encountered circular dependency while waiting for `%s` during %s.",s,t.displayName):(c(i._callbacksByAction[t][s],"Dispatcher.waitFor `%s` is not a registered callback for %s.",s,t.displayName),i.invokeCallback(t,s))}}(this))},s.prototype.dispatch=function(t){var i;c(!this._isDispatching,"Dispatch.dispatch cannot be called during dispatch."),this.startDispatching(t);try{return i=t.action,u.forEach(this._callbacksByAction[i],function(t){return function(s,e){return t._isStarted[e]?void 0:t.invokeCallback(i,e)}}(this))}finally{this.stopDispatching()}},s.prototype.invokeCallback=function(t,i){var s,e,r;return this._isStarted[i]=!0,r=this._callbacksByAction[t][i],s=r.callback,e=r.prerequisites,this.waitFor(t,e),s(this._payload),this._isFinished[i]=!0},s.prototype.startDispatching=function(t){return this._isStarted={},this._isFinished={},this._payload=t,this._isDispatching=!0},s.prototype.stopDispatching=function(){return this._payload=null,this._isDispatching=!1},e.Dispatcher=new s,h=function(t,i){return"string"==typeof i&&(i=t[i]),function(){var s;return s=arguments,setTimeout(function(){return i.apply(t,s)},1)}},i=function(t){var i,s,r;return this.displayName=t.displayName,c(t.action||t.dispatches,"Deferred Task "+this.displayName+" must include either an action key or dispatches list."),c(!t.action||t.task,"Deferred Task "+this.displayName+" declared an action, it must declare a task."),u.assign(this,u.omit(t,"dispatches","action","task"),o(this)),this._dispatcherIdsByAction={},t.initialize&&t.initialize.call(this),t.action&&t.task&&(i=t.action,r=t.task,r=h(this,r),s=e.Dispatcher.register(this,i.id,[],r),this._dispatcherIdsByAction[i.id]=s),t.dispatches&&u.forEach(t.dispatches,function(t){return function(r){var n;return i=r.action,n=r.callback,c(!t._dispatcherIdsByAction[i.id],"Deferred Task "+t.displayName+" registered two callbacks for the action "+i.displayName+"."),n=h(t,n),s=e.Dispatcher.register(t,i.id,[],n),t._dispatcherIdsByAction[i.id]=s}}(this)),this},e.DeferredTask=i,o=function(t){return function(i,s){return s instanceof Function?s.bind(t):s}},n=function(t){return this._storeImpl={trigger:function(){return u.each(this.callbacks,function(t){return t()})}},this._storeImpl.dispatcherIdsByAction={},this._storeImpl.callbacks=[],u.assign(this._storeImpl,u.omit(t,"initialize","dispatches","public"),o(this._storeImpl)),t["public"]&&(u.assign(this,t["public"],o(this._storeImpl)),u.assign(this._storeImpl,t["public"],o(this._storeImpl))),this.displayName=t.displayName,t.initialize&&t.initialize.call(this._storeImpl),t.dispatches&&u.forEach(t.dispatches,function(t){return function(i){var s,r,n,a;return s=i.action,r=i.after,n=i.callback,c(!t._storeImpl.dispatcherIdsByAction[s.id],"Store "+t.displayName+" registered two callbacks for action "+s.displayName),"string"==typeof n&&(n=t._storeImpl[n]),n=n.bind(t._storeImpl),a=e.Dispatcher.register(t,s.id,r,n),t._storeImpl.dispatcherIdsByAction[s.id]=a}}(this)),this},n.prototype.register=function(t){return this._storeImpl.callbacks.push(t)},n.prototype.unregister=function(t){return this._storeImpl.callbacks=u.reject(this._storeImpl.callbacks,function(i){return i===t})},n.prototype.listen=function(t){var i;return i=this,{componentDidMount:function(){return i.register(this[t])},componentWillUnmount:function(){return i.unregister(this[t])}}},n.prototype.trigger=function(){return this._storeImpl.trigger()},e.Store=n,p?module.exports=e:this.Hippodrome=e}).call(this);
@@ -1,3 +1,3 @@
1
1
  module Hippodrome
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hippodrome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Kermes