flight-for-rails 1.0.7 → 1.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.
@@ -1,5 +1,5 @@
1
1
  (function(context){var factories={},loaded={};var isArray=Array.isArray||function(obj){return obj.constructor==Array};var map=Array.map||function(arr,fn,scope){for(var i=0,len=arr.length,result=[];i<len;i++){result.push(fn.call(scope,arr[i]))}return result};function define(){var args=Array.prototype.slice.call(arguments),dependencies=[],id,factory;if(typeof args[0]=="string"){id=args.shift()}if(isArray(args[0])){dependencies=args.shift()}factory=args.shift();factories[id]=[dependencies,factory]}function require(id){function resolve(dep){var relativeParts=id.split("/"),depParts=dep.split("/"),relative=false;relativeParts.pop();while(depParts[0]==".."&&relativeParts.length){relativeParts.pop();depParts.shift();relative=true}if(depParts[0]=="."){depParts.shift();relative=true}if(relative){depParts=relativeParts.concat(depParts)}return depParts.join("/")}var unresolved,factory,dependencies;if(typeof loaded[id]=="undefined"){unresolved=factories[id];if(unresolved){dependencies=unresolved[0];factory=unresolved[1];loaded[id]=factory.apply(undefined,map(dependencies,function(id){return require(resolve(id))}))}}return loaded[id]};define("lib/utils",[],function(){var a=[],b=100,c={isDomObj:function(a){return!!a.nodeType||a===window},toArray:function(b,c){return a.slice.call(b,c)},merge:function(){var a=arguments.length,b=0,c=new Array(a+1);for(;b<a;b++)c[b+1]=arguments[b];return a===0?{}:(c[0]={},c[c.length-1]===!0&&(c.pop(),c.unshift(!0)),$.extend.apply(undefined,c))},push:function(a,b,c){return a&&Object.keys(b||{}).forEach(function(d){if(a[d]&&c)throw Error("utils.push attempted to overwrite '"+d+"' while running in protected mode");typeof a[d]=="object"&&typeof b[d]=="object"?this.push(a[d],b[d]):a[d]=b[d]},this),a},isEnumerable:function(a,b){return Object.keys(a).indexOf(b)>-1},compose:function(){var a=arguments;return function(){var b=arguments;for(var c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},uniqueArray:function(a){var b={},c=[];for(var d=0,e=a.length;d<e;++d){if(b.hasOwnProperty(a[d]))continue;c.push(a[d]),b[a[d]]=1}return c},debounce:function(a,c,d){typeof c!="number"&&(c=b);var e,f;return function(){var b=this,g=arguments,h=function(){e=null,d||(f=a.apply(b,g))},i=d&&!e;return clearTimeout(e),e=setTimeout(h,c),i&&(f=a.apply(b,g)),f}},throttle:function(a,c){typeof c!="number"&&(c=b);var d,e,f,g,h,i,j=this.debounce(function(){h=g=!1},c);return function(){d=this,e=arguments;var b=function(){f=null,h&&(i=a.apply(d,e)),j()};return f||(f=setTimeout(b,c)),g?h=!0:(g=!0,i=a.apply(d,e)),j(),i}},countThen:function(a,b){return function(){if(!--a)return b.apply(this,arguments)}},delegate:function(a){return function(b,c){var d=$(b.target),e;Object.keys(a).forEach(function(f){if((e=d.closest(f)).length)return c=c||{},c.el=e[0],a[f].apply(this,[b,c])},this)}}};return c})
2
- define("lib/registry",["./utils"],function(a){function b(a,b){var c,d,e,f=b.length;return typeof b[f-1]=="function"&&(f-=1,e=b[f]),typeof b[f-1]=="object"&&(f-=1),f==2?(c=b[0],d=b[1]):(c=a.node,d=b[0]),{element:c,type:d,callback:e}}function c(a,b){return a.element==b.element&&a.type==b.type&&(b.callback==null||a.callback==b.callback)}function d(){function d(b){this.component=b,this.attachedTo=[],this.instances={},this.addInstance=function(a){var b=new e(a);return this.instances[a.identity]=b,this.attachedTo.push(a.node),b},this.removeInstance=function(b){delete this.instances[b.identity];var c=this.attachedTo.indexOf(b.node);c>-1&&this.attachedTo.splice(c,1),this.instances.length||a.removeComponentInfo(this)},this.isAttachedTo=function(a){return this.attachedTo.indexOf(a)>-1}}function e(b){this.instance=b,this.events=[],this.addBind=function(b){this.events.push(b),a.events.push(b)},this.removeBind=function(a){for(var b=0,d;d=this.events[b];b++)c(d,a)&&this.events.splice(b,1)}}var a=this;(this.reset=function(){this.components=[],this.allInstances={},this.events=[]}).call(this),this.addInstance=function(a){var b=this.findComponentInfo(a);b||(b=new d(a.constructor),this.components.push(b));var c=b.addInstance(a);return this.allInstances[a.identity]=c,b},this.removeInstance=function(a){var b,c=this.findInstanceInfo(a),d=this.findComponentInfo(a);d&&d.removeInstance(a),delete this.allInstances[a.identity]},this.removeComponentInfo=function(a){var b=this.components.indexOf(a);b>-1&&this.components.splice(b,1)},this.findComponentInfo=function(a){var b=a.attachTo?a:a.constructor;for(var c=0,d;d=this.components[c];c++)if(d.component===b)return d;return null},this.findInstanceInfo=function(a){return this.allInstances[a.identity]||null},this.findInstanceInfoByNode=function(a){var b=[];return Object.keys(this.allInstances).forEach(function(c){var d=this.allInstances[c];d.instance.node===a&&b.push(d)},this),b},this.on=function(c){var d=a.findInstanceInfo(this),e,f=arguments.length,g=1,h=new Array(f-1);for(;g<f;g++)h[g-1]=arguments[g];if(d){e=c.apply(null,h),e&&(h[h.length-1]=e);var i=b(this,h);d.addBind(i)}},this.off=function(c,d,e){var f=b(this,arguments),g=a.findInstanceInfo(this);g&&g.removeBind(f)},window.DEBUG&&DEBUG.enabled&&(a.trigger=new Function),this.teardown=function(){a.removeInstance(this)},this.withRegistration=function(){this.before("initialize",function(){a.addInstance(this)}),this.around("on",a.on),this.after("off",a.off),window.DEBUG&&DEBUG.enabled&&this.after("trigger",a.trigger),this.after("teardown",{obj:a,fnName:"teardown"})}}return new d})
2
+ define("lib/registry",["./utils"],function(a){function b(a,b){var c,d,e,f=b.length;return typeof b[f-1]=="function"&&(f-=1,e=b[f]),typeof b[f-1]=="object"&&(f-=1),f==2?(c=b[0],d=b[1]):(c=a.node,d=b[0]),{element:c,type:d,callback:e}}function c(a,b){return a.element==b.element&&a.type==b.type&&(b.callback==null||a.callback==b.callback)}function d(){function d(b){this.component=b,this.attachedTo=[],this.instances={},this.addInstance=function(a){var b=new e(a);return this.instances[a.identity]=b,this.attachedTo.push(a.node),b},this.removeInstance=function(b){delete this.instances[b.identity];var c=this.attachedTo.indexOf(b.node);c>-1&&this.attachedTo.splice(c,1),Object.keys(this.instances).length||a.removeComponentInfo(this)},this.isAttachedTo=function(a){return this.attachedTo.indexOf(a)>-1}}function e(b){this.instance=b,this.events=[],this.addBind=function(b){this.events.push(b),a.events.push(b)},this.removeBind=function(a){for(var b=0,d;d=this.events[b];b++)c(d,a)&&this.events.splice(b,1)}}var a=this;(this.reset=function(){this.components=[],this.allInstances={},this.events=[]}).call(this),this.addInstance=function(a){var b=this.findComponentInfo(a);b||(b=new d(a.constructor),this.components.push(b));var c=b.addInstance(a);return this.allInstances[a.identity]=c,b},this.removeInstance=function(a){var b,c=this.findInstanceInfo(a),d=this.findComponentInfo(a);d&&d.removeInstance(a),delete this.allInstances[a.identity]},this.removeComponentInfo=function(a){var b=this.components.indexOf(a);b>-1&&this.components.splice(b,1)},this.findComponentInfo=function(a){var b=a.attachTo?a:a.constructor;for(var c=0,d;d=this.components[c];c++)if(d.component===b)return d;return null},this.findInstanceInfo=function(a){return this.allInstances[a.identity]||null},this.findInstanceInfoByNode=function(a){var b=[];return Object.keys(this.allInstances).forEach(function(c){var d=this.allInstances[c];d.instance.node===a&&b.push(d)},this),b},this.on=function(c){var d=a.findInstanceInfo(this),e,f=arguments.length,g=1,h=new Array(f-1);for(;g<f;g++)h[g-1]=arguments[g];if(d){e=c.apply(null,h),e&&(h[h.length-1]=e);var i=b(this,h);d.addBind(i)}},this.off=function(d,e,f){var g=b(this,arguments),h=a.findInstanceInfo(this);h&&h.removeBind(g);for(var i=0,j;j=a.events[i];i++)c(j,g)&&a.events.splice(i,1)},a.trigger=new Function,this.teardown=function(){a.removeInstance(this)},this.withRegistration=function(){this.before("initialize",function(){a.addInstance(this)}),this.around("on",a.on),this.after("off",a.off),window.DEBUG&&DEBUG.enabled&&this.after("trigger",a.trigger),this.after("teardown",{obj:a,fnName:"teardown"})}}return new d})
3
3
  define("tools/debug/debug",["../../lib/registry","../../lib/utils"],function(a,b){function d(a,b,c){var c=c||{},e=c.obj||window,g=c.path||(e==window?"window":""),h=Object.keys(e);h.forEach(function(c){(f[a]||a)(b,e,c)&&console.log([g,".",c].join(""),"->",["(",typeof e[c],")"].join(""),e[c]),Object.prototype.toString.call(e[c])=="[object Object]"&&e[c]!=e&&g.split(".").indexOf(c)==-1&&d(a,b,{obj:e[c],path:[g,c].join(".")})})}function e(a,b,c,e){!b||typeof c==b?d(a,c,e):console.error([c,"must be",b].join(" "))}function g(a,b){e("name","string",a,b)}function h(a,b){e("nameContains","string",a,b)}function i(a,b){e("type","function",a,b)}function j(a,b){e("value",null,a,b)}function k(a,b){e("valueCoerced",null,a,b)}function l(a,b){d(a,null,b)}function p(){var a=[].slice.call(arguments);c.eventNames.length||(c.eventNames=m),c.actions=a.length?a:m,t()}function q(){var a=[].slice.call(arguments);c.actions.length||(c.actions=m),c.eventNames=a.length?a:m,t()}function r(){c.actions=[],c.eventNames=[],t()}function s(){c.actions=m,c.eventNames=m,t()}function t(){window.localStorage&&(localStorage.setItem("logFilter_eventNames",c.eventNames),localStorage.setItem("logFilter_actions",c.actions))}function u(){var a={eventNames:window.localStorage&&localStorage.getItem("logFilter_eventNames")||n,actions:window.localStorage&&localStorage.getItem("logFilter_actions")||o};return Object.keys(a).forEach(function(b){var c=a[b];typeof c=="string"&&c!==m&&(a[b]=c.split(","))}),a}var c,f={name:function(a,b,c){return a==c},nameContains:function(a,b,c){return c.indexOf(a)>-1},type:function(a,b,c){return b[c]instanceof a},value:function(a,b,c){return b[c]===a},valueCoerced:function(a,b,c){return b[c]==a}},m="all",n=[],o=[],c=u();return{enable:function(a){this.enabled=!!a,a&&window.console&&(console.info("Booting in DEBUG mode"),console.info("You can configure event logging with DEBUG.events.logAll()/logNone()/logByName()/logByAction()")),window.DEBUG=this},find:{byName:g,byNameContains:h,byType:i,byValue:j,byValueCoerced:k,custom:l},events:{logFilter:c,logByAction:p,logByName:q,logAll:s,logNone:r}}})
4
4
  define("lib/compose",["./utils","../tools/debug/debug"],function(a,b){function f(a,b){if(!c)return;var e=Object.create(null);Object.keys(a).forEach(function(c){if(d.indexOf(c)<0){var f=Object.getOwnPropertyDescriptor(a,c);f.writable=b,e[c]=f}}),Object.defineProperties(a,e)}function g(a,b,d){var e;if(!c||!a.hasOwnProperty(b)){d.call(a);return}e=Object.getOwnPropertyDescriptor(a,b).writable,Object.defineProperty(a,b,{writable:!0}),d.call(a),Object.defineProperty(a,b,{writable:e})}function h(a,b){a.mixedIn=a.hasOwnProperty("mixedIn")?a.mixedIn:[],b.forEach(function(b){a.mixedIn.indexOf(b)==-1&&(f(a,!1),b.call(a),a.mixedIn.push(b))}),f(a,!0)}var c=b.enabled&&!a.isEnumerable(Object,"getOwnPropertyDescriptor"),d=["mixedIn"];if(c)try{Object.getOwnPropertyDescriptor(Object,"keys")}catch(e){c=!1}return{mixin:h,unlockProperty:g}})
5
5
  define("lib/advice",["./utils","./compose"],function(a,b){var c={around:function(a,b){return function(){var d=0,e=arguments.length,f=new Array(e+1);f[0]=a.bind(this);for(;d<e;d++)f[d+1]=arguments[d];return b.apply(this,f)}},before:function(a,b){var c=typeof b=="function"?b:b.obj[b.fnName];return function(){return c.apply(this,arguments),a.apply(this,arguments)}},after:function(a,b){var c=typeof b=="function"?b:b.obj[b.fnName];return function(){var d=(a.unbound||a).apply(this,arguments);return c.apply(this,arguments),d}},withAdvice:function(){["before","after","around"].forEach(function(a){this[a]=function(d,e){b.unlockProperty(this,d,function(){return typeof this[d]=="function"?this[d]=c[a](this[d],e):this[d]=e})}},this)}};return c})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flight-for-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-03 00:00:00.000000000 Z
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: '0'
37
+ version: 2.1.4
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,8 +42,8 @@ dependencies:
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
46
- description: Flight javascript framework for Rails 3.1 and greater assets pipeline
45
+ version: 2.1.4
46
+ description: Flight javascript framework for Rails assets pipeline
47
47
  email:
48
48
  - sergey@rezvanov.info
49
49
  executables: []
@@ -85,5 +85,5 @@ rubyforge_project:
85
85
  rubygems_version: 1.8.25
86
86
  signing_key:
87
87
  specification_version: 3
88
- summary: Flight javascript framework for Rails 3.1 and greater assets pipeline
88
+ summary: Flight javascript framework for Rails assets pipeline
89
89
  test_files: []