hippodrome 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/hippodrome.js +3 -0
- data/app/assets/javascripts/hippodrome.min.js +1 -1
- data/lib/hippodrome/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d1e5ce73d63efc788d2ddbe6d4d8a79e7d10078
|
4
|
+
data.tar.gz: 27c49168056b4f15493441e9f5746686921f75e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0f19c4db36c3f6e116def21727dee747efacc1e7de2358751f7c63d8c58bcf9ba80ba8254dda902e7aa3581f85aca67ad2b588e03c603ade0f4da4dc95900fc
|
7
|
+
data.tar.gz: a82a40b35b4138e55ff48b1c0ab711667941ed75a4aa4a09f88063dbbf9067eb0a1e3f6960a9badbe7860c03c1b2b3bb8c62ae596621042d4fc832827461d728
|
@@ -175,6 +175,9 @@
|
|
175
175
|
assert(!options.action || options.task, "Deferred Task " + this.displayName + " declared an action, it must declare a task.");
|
176
176
|
_.assign(this, _.omit(options, 'dispatches', 'action', 'task'), bindToContextIfFunction(this));
|
177
177
|
this._dispatcherIdsByAction = {};
|
178
|
+
if (options.initialize) {
|
179
|
+
options.initialize.call(this);
|
180
|
+
}
|
178
181
|
if (options.action && options.task) {
|
179
182
|
action = options.action, task = options.task;
|
180
183
|
task = makeDeferredFunction(this, task);
|
@@ -1,3 +1,3 @@
|
|
1
1
|
//= require lodash
|
2
2
|
|
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]),i=u.defer.bind(t,i)},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.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);
|
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]),i=u.defer.bind(t,i)},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);
|
data/lib/hippodrome/version.rb
CHANGED
data/package.json
CHANGED
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.0.
|
4
|
+
version: 0.0.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Kermes
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-10-
|
12
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|