jskit_rails 3.4.3 → 3.4.4
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/jskit.js +1 -1
- data/app/assets/javascripts/jskit.min.js +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: 4fcfce94742bf9829dd1e0c517de97146aca4db6
|
4
|
+
data.tar.gz: cc6d892ae9c929b5a87127ea3c38eecd0dbe2c59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be208d53f297891e9dea46420c375afd7500313ca093b6c681c293f0bba85a6e32bef0e8817eda822f1023bc65cc6b91e359c515e1fe184169bbd060c5acd705
|
7
|
+
data.tar.gz: 052183c12a892e90a577e65ae03eaa022e9f6df7ac0fb1e05cd0cd51be7ee4a77134ef258b6770f85b099a6b6151970ff19158e6dc8f33ba055c192846582ea0
|
@@ -172,7 +172,7 @@ JSKit.Controller = (function() {
|
|
172
172
|
if (!dispatcher) throw new Error(this.className + ": dispatcher is undefined");
|
173
173
|
assign(this, attrs, this);
|
174
174
|
this.dispatcher = dispatcher;
|
175
|
-
bindAll
|
175
|
+
bindAll(this);
|
176
176
|
|
177
177
|
setControllerDefaults.call(this);
|
178
178
|
this.actions.unshift("all");
|
@@ -1 +1 @@
|
|
1
|
-
var JSKit={};JSKit.Dispatcher=function(){function t(){this.__events__={}}return _.assign(t.prototype,{on:function(t,n,e){var i={context:e||null,handler:n},r=this.__events__[t]=this.__events__[t]||[];_.contains(_.pluck(r,"handler"),n)||r.push(i)},off:function(t,n){var e=this.__events__[t];this.__events__[t]=n?_.reject(e,function(t){return t.handler!==n}):[]},trigger:function(t){var n=this.__events__[t]||[],e=_.rest(arguments);_.each(n,function(t){var n=t.handler,i=t.context;n.apply(i,e)})}}),t}(),JSKit.TestDispatcher=function(){function t(t){return t.called=!1,t.callCount=0,t.calls=[],t}function n(t){var n,e;return n=h(t)?t:a(l(t)),e=h(t)?t:a(f(t)),{name:n,method:e}}function e(t){var e=n(t);return h(t)?'"'+t+'"':"{ "+e.name+': "'+e.method+'" }'}function i(){this.listeners=[],this.events={},this.shadowDispatcher=new JSKit.Dispatcher}var r=_.assign,s=(_.clone,_.contains),o=_.each,a=_.first,c=_.functions,h=_.isString,l=_.keys,u=_.map,p=(_.rest,_.toArray),f=_.values;return r(i.prototype,{on:function(n,e,i){s(this.listeners,i)||this.spyOnControllerMethods(i);var r=t(e);this.events[n]=this.events[n]||[],this.events[n].push(r),this.shadowDispatcher.on(n,function(){this.trackSpy(r,arguments)},this)},spyOnControllerMethods:function(n){var i=u(n.actions,function(t){return e(t)}),r=this;o(c(n),function(e){if(!s(i,e)){var o=n[e];n[e]=function(){return r.trackSpy(n[e],arguments),o.apply(n,arguments)},t(n[e])}},this),this.listeners.push(n)},trigger:function(t,n,e){this.shadowDispatcher.trigger(t,n,e)},trackSpy:function(t,n){t.callCount+=1,t.called=!0,t.calls.push({args:p(n)})},hasAction:function(t,i){var r=!1;if(t.actions.forEach(function(t){e(t)===e(i)&&(r=!0)}),!r)return!1;var s=n(i),o=t[s.method],a=t.actionEventName(s.name),c=o.callCount;return t.dispatcher.trigger(a),o.callCount>c},off:function(){}}),i}(),JSKit.Controller=function(){function t(t,n){if(!t)throw new Error(this.className+": dispatcher is undefined");u(this,n,this),this.dispatcher=t,a
|
1
|
+
var JSKit={};JSKit.Dispatcher=function(){function t(){this.__events__={}}return _.assign(t.prototype,{on:function(t,n,e){var i={context:e||null,handler:n},r=this.__events__[t]=this.__events__[t]||[];_.contains(_.pluck(r,"handler"),n)||r.push(i)},off:function(t,n){var e=this.__events__[t];this.__events__[t]=n?_.reject(e,function(t){return t.handler!==n}):[]},trigger:function(t){var n=this.__events__[t]||[],e=_.rest(arguments);_.each(n,function(t){var n=t.handler,i=t.context;n.apply(i,e)})}}),t}(),JSKit.TestDispatcher=function(){function t(t){return t.called=!1,t.callCount=0,t.calls=[],t}function n(t){var n,e;return n=h(t)?t:a(l(t)),e=h(t)?t:a(f(t)),{name:n,method:e}}function e(t){var e=n(t);return h(t)?'"'+t+'"':"{ "+e.name+': "'+e.method+'" }'}function i(){this.listeners=[],this.events={},this.shadowDispatcher=new JSKit.Dispatcher}var r=_.assign,s=(_.clone,_.contains),o=_.each,a=_.first,c=_.functions,h=_.isString,l=_.keys,u=_.map,p=(_.rest,_.toArray),f=_.values;return r(i.prototype,{on:function(n,e,i){s(this.listeners,i)||this.spyOnControllerMethods(i);var r=t(e);this.events[n]=this.events[n]||[],this.events[n].push(r),this.shadowDispatcher.on(n,function(){this.trackSpy(r,arguments)},this)},spyOnControllerMethods:function(n){var i=u(n.actions,function(t){return e(t)}),r=this;o(c(n),function(e){if(!s(i,e)){var o=n[e];n[e]=function(){return r.trackSpy(n[e],arguments),o.apply(n,arguments)},t(n[e])}},this),this.listeners.push(n)},trigger:function(t,n,e){this.shadowDispatcher.trigger(t,n,e)},trackSpy:function(t,n){t.callCount+=1,t.called=!0,t.calls.push({args:p(n)})},hasAction:function(t,i){var r=!1;if(t.actions.forEach(function(t){e(t)===e(i)&&(r=!0)}),!r)return!1;var s=n(i),o=t[s.method],a=t.actionEventName(s.name),c=o.callCount;return t.dispatcher.trigger(a),o.callCount>c},off:function(){}}),i}(),JSKit.Controller=function(){function t(t,n){if(!t)throw new Error(this.className+": dispatcher is undefined");u(this,n,this),this.dispatcher=t,a(this),o.call(this),this.actions.unshift("all"),s.call(this),this.initialize()}function n(t){if(t=t||"",t.match(/_|-|\s/)){var n=map(t.split(/_|-|\s/g),function(t,n){return n>0?t.charAt(0).toUpperCase()+t.slice(1):t.toLowerCase()}).join("");t=n}else t=t.toString();return t.charAt(0).toUpperCase()+t.slice(1)}function e(t){return t=t||"",t.replace(/([A-Z])/g," $1").replace(/^\s?/,"").replace(/-|\s/g,"_").toLowerCase()}function i(t){if(!f(this[t.method]))throw new Error(this.className+' action "'+t.name+this.eventSeparator+t.method+'" method is undefined')}function r(t){var n=m(t),e=n?p(d(t)):t,i=n?p(v(t)):t;return{name:i,method:e}}function s(){l(this.actions,function(t){var n=r(t);i.call(this,n),this.dispatcher.on(this.actionEventName(n.name),this[n.method],this)},this)}function o(){this.name=this.name||"Anonymous",h(this,{eventSeparator:":",actions:[],channel:"controller",className:n(this.name)+"Controller",controllerEventName:e(this.name)})}var a=_.bindAll,c=_.compact,h=_.defaults,l=_.each,u=_.assign,p=_.first,f=(_.functions,_.isFunction),m=_.isObject,v=_.keys,d=(_.uniq,_.values);return u(t.prototype,{initialize:function(){},all:function(){},actionEventName:function(t){return c([this.namespace,this.channel,this.controllerEventName,t]).join(this.eventSeparator)}}),t}(),JSKit.Application=function(){function t(){this.Controllers={},this.Dispatcher=new JSKit.Dispatcher}function n(t){if(t=t||"",t.match(/_|-|\s/)){var n=i(t.split(/_|-|\s/g),function(t,n){return n>0?t.charAt(0).toUpperCase()+t.slice(1):t.toLowerCase()}).join("");t=n}else t=t.toString();return t.charAt(0).toUpperCase()+t.slice(1)}var e=(_.clone,_.assign),i=(_.first,_.map);return t.prototype.createController=function(t,i){function r(){JSKit.Controller.apply(this,arguments)}var s=i.dispatcher||this.Dispatcher;return i.dispatcher&&delete i.dispatcher,t=n(t),e(i,{name:t}),e(r.prototype,JSKit.Controller.prototype,i),this[i.name+"Controller"]=r,this.Controllers[t]=new r(s,i),this.Controllers[t]},t}(),JSKit.createApplication=function(){return new JSKit.Application};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jskit_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dayton Nolan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|