sugar-rails 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. data/copy_release.sh +28 -0
  2. data/lib/sugar/rails/version.rb +2 -2
  3. data/vendor/assets/javascripts/precompiled/development/array.js +6 -4
  4. data/vendor/assets/javascripts/precompiled/development/date.js +45 -31
  5. data/vendor/assets/javascripts/precompiled/development/date_locales.js +274 -47
  6. data/vendor/assets/javascripts/precompiled/development/number.js +2 -2
  7. data/vendor/assets/javascripts/precompiled/development/object.js +2 -2
  8. data/vendor/assets/javascripts/precompiled/minified/array.js +15 -15
  9. data/vendor/assets/javascripts/precompiled/minified/core.js +9 -9
  10. data/vendor/assets/javascripts/precompiled/minified/date.js +40 -40
  11. data/vendor/assets/javascripts/precompiled/minified/date_locales.js +33 -22
  12. data/vendor/assets/javascripts/precompiled/minified/date_ranges.js +2 -2
  13. data/vendor/assets/javascripts/precompiled/minified/es5.js +8 -8
  14. data/vendor/assets/javascripts/precompiled/minified/function.js +4 -4
  15. data/vendor/assets/javascripts/precompiled/minified/inflections.js +5 -5
  16. data/vendor/assets/javascripts/precompiled/minified/language.js +5 -5
  17. data/vendor/assets/javascripts/precompiled/minified/number.js +5 -5
  18. data/vendor/assets/javascripts/precompiled/minified/object.js +5 -5
  19. data/vendor/assets/javascripts/precompiled/minified/regexp.js +2 -2
  20. data/vendor/assets/javascripts/precompiled/minified/string.js +11 -11
  21. data/vendor/assets/javascripts/sugar-development.js +330 -87
  22. data/vendor/assets/javascripts/sugar-full.js +145 -134
  23. data/vendor/assets/javascripts/sugar.js +102 -102
  24. metadata +5 -4
@@ -1,6 +1,6 @@
1
1
  var Bb="isObject,isNaN".split(","),Cb="keys,values,each,merge,clone,equal,watch,tap,has".split(",");
2
- function Db(a,b,c,d){var e=/^(.+?)(\[.*\])$/,f,g,j;if(d!==m&&(g=b.match(e))){j=g[1];b=g[2].replace(/^\[|\]$/g,"").split("][");b.forEach(function(i){f=!i||i.match(/^\d+$/);if(!j&&fa(a))j=a.length;a[j]||(a[j]=f?[]:{});a=a[j];j=i});if(!j&&f)j=a.length.toString();Db(a,j,c)}else a[b]=c.match(/^[\d.]+$/)?parseFloat(c):c==="true"?k:c==="false"?m:c}F(o,m,k,{watch:function(a,b,c){if(ca){var d=a[b];o.defineProperty(a,b,{enumerable:k,configurable:k,get:function(){return d},set:function(e){d=c.call(a,b,d,e)}})}}});
3
- F(o,m,function(a,b){return A(b)},{keys:function(a,b){var c=o.keys(a);c.forEach(function(d){b.call(a,d,a[d])});return c}});
4
- F(o,m,m,{isObject:function(a){return L(a)},isNaN:function(a){return B(a)&&a.valueOf()!==a.valueOf()},equal:function(a,b){return ua(a)&&ua(b)?ta(a)===ta(b):a===b},extended:function(a){return new M(a)},merge:function(a,b,c,d){var e,f;if(a&&typeof b!="string")for(e in b)if(ma(b,e)&&a){f=b[e];if(J(a[e])){if(d===m)continue;if(A(d))f=d.call(b,e,a[e],b[e])}if(c===k&&f&&la(f))if(ha(f))f=new s(f.getTime());else if(E(f))f=new q(f.source,sa(f));else{a[e]||(a[e]=p.isArray(f)?[]:{});o.merge(a[e],b[e],c,d);continue}a[e]=
5
- f}return a},values:function(a,b){var c=[];H(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:function(a,b){if(!la(a))return a;if(p.isArray(a))return a.concat();var c=a instanceof M?new M:{};return o.merge(c,a,b)},fromQueryString:function(a,b){var c=o.extended();a=a&&a.toString?a.toString():"";decodeURIComponent(a.replace(/^.*?\?/,"")).split("&").forEach(function(d){d=d.split("=");d.length===2&&Db(c,d[0],d[1],b)});return c},tap:function(a,b){var c=b;A(b)||(c=function(){b&&a[b]()});c.call(a,
6
- a);return a},has:function(a,b){return ma(a,b)}});I(o,m,m,w,function(a,b){var c="is"+b;Bb.push(c);a[c]=function(d){return o.prototype.toString.call(d)==="[object "+b+"]"}});(function(){F(o,m,function(){return arguments.length===0},{extend:function(){wa(Bb.concat(Cb),o)}})})();wa(Cb,M);
2
+ function Db(a,b,c,d){var e=/^(.+?)(\[.*\])$/,g,f,i;if(d!==n&&(f=b.match(e))){i=f[1];b=f[2].replace(/^\[|\]$/g,"").split("][");b.forEach(function(j){g=!j||j.match(/^\d+$/);if(!i&&da(a))i=a.length;a[i]||(a[i]=g?[]:{});a=a[i];i=j});if(!i&&g)i=a.length.toString();Db(a,i,c)}else a[b]=c.match(/^[\d.]+$/)?parseFloat(c):c==="true"?k:c==="false"?n:c}E(p,n,k,{watch:function(a,b,c){if(ca){var d=a[b];p.defineProperty(a,b,{enumerable:k,configurable:k,get:function(){return d},set:function(e){d=c.call(a,b,d,e)}})}}});
3
+ E(p,n,function(a,b){return z(b)},{keys:function(a,b){var c=p.keys(a);c.forEach(function(d){b.call(a,d,a[d])});return c}});
4
+ E(p,n,n,{isObject:function(a){return L(a)},isNaN:function(a){return A(a)&&a.valueOf()!==a.valueOf()},equal:function(a,b){return ua(a)&&ua(b)?ta(a)===ta(b):a===b},extended:function(a){return new na(a)},merge:function(a,b,c,d){var e,g;if(a&&typeof b!="string")for(e in b)if(la(b,e)&&a){g=b[e];if(I(a[e])){if(d===n)continue;if(z(d))g=d.call(b,e,a[e],b[e])}if(c===k&&g&&ka(g))if(ga(g))g=new s(g.getTime());else if(D(g))g=new r(g.source,sa(g));else{a[e]||(a[e]=q.isArray(g)?[]:{});p.merge(a[e],b[e],c,d);continue}a[e]=
5
+ g}return a},values:function(a,b){var c=[];G(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:function(a,b){if(!ka(a))return a;if(q.isArray(a))return a.concat();var c=a instanceof na?new na:{};return p.merge(c,a,b)},fromQueryString:function(a,b){var c=p.extended();a=a&&a.toString?a.toString():"";a.replace(/^.*?\?/,"").split("&").forEach(function(d){d=d.split("=");d.length===2&&Db(c,d[0],decodeURIComponent(d[1]),b)});return c},tap:function(a,b){var c=b;z(b)||(c=function(){b&&a[b]()});c.call(a,
6
+ a);return a},has:function(a,b){return la(a,b)}});H(p,n,n,x,function(a,b){var c="is"+b;Bb.push(c);a[c]=function(d){return p.prototype.toString.call(d)==="[object "+b+"]"}});(function(){E(p,n,function(){return arguments.length===0},{extend:function(){wa(Bb.concat(Cb),p)}})})();wa(Cb,na);
@@ -1,2 +1,2 @@
1
- F(q,m,m,{escape:function(a){return R(a)}});
2
- F(q,k,m,{getFlags:function(){return sa(this)},setFlags:function(a){return q(this.source,a)},addFlag:function(a){return this.setFlags(sa(this,a))},removeFlag:function(a){return this.setFlags(sa(this).replace(a,""))}});
1
+ E(r,n,n,{escape:function(a){return Q(a)}});
2
+ E(r,k,n,{getFlags:function(){return sa(this)},setFlags:function(a){return r(this.source,a)},addFlag:function(a){return this.setFlags(sa(this,a))},removeFlag:function(a){return this.setFlags(sa(this).replace(a,""))}});
@@ -1,12 +1,12 @@
1
1
  var Eb,Fb;
2
- F(t,k,m,{escapeRegExp:function(){return R(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return Eb(this)},decodeBase64:function(){return Fb(this)},each:function(a,b){var c,
3
- d;if(A(a)){b=a;a=/[\s\S]/g}else if(a)if(D(a))a=q(R(a),"gi");else{if(E(a))a=q(a.source,sa(a,"g"))}else a=/[\s\S]/g;c=this.match(a)||[];if(b)for(d=0;d<c.length;d++)c[d]=b.call(this,c[d],d,c)||c[d];return c},shift:function(a){var b="";a=a||0;this.codes(function(c){b+=t.fromCharCode(c+a)});return b},codes:function(a){for(var b=[],c=0;c<this.length;c++){var d=this.charCodeAt(c);b.push(d);a&&a.call(this,d,c)}return b},chars:function(a){return this.each(a)},words:function(a){return this.trim().each(/\S+/g,
4
- a)},lines:function(a){return this.trim().each(/^.*$/gm,a)},paragraphs:function(a){var b=this.trim().split(/[\r\n]{2,}/);return b=b.map(function(c){if(a)var d=a.call(c);return d?d:c})},startsWith:function(a,b){if(K(b))b=k;var c=E(a)?a.source.replace("^",""):R(a);return q("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(K(b))b=k;var c=E(a)?a.source.replace("$",""):R(a);return q(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(E(a)?
5
- a:R(a))!==-1},add:function(a,b){b=K(b)?this.length:b;return this.slice(0,b)+a+this.slice(b)},remove:function(a){return this.replace(a,"")},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.trim().replace(/([\r\n\s\u3000])+/g,function(a,b){return b==="\u3000"?b:" "})},at:function(){return va(this,arguments,k)},from:function(a){return this.slice(a)},to:function(a){if(K(a))a=this.length;return this.slice(0,a)},dasherize:function(){return this.underscore().replace(/_/g,
6
- "-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(t.Inflector&&t.Inflector.acronymRegExp,function(a,b){return(b>0?"_":"")+a.toLowerCase()}).replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase()},camelize:function(a){return this.underscore().replace(/(^|_)([^_]+)/g,function(b,c,d,e){b=d;b=(c=t.Inflector)&&c.acronyms[b];b=D(b)?b:void 0;e=a!==m||e>0;if(b)return e?b:b.toLowerCase();return e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g,
7
- " ")},stripTags:function(){var a=this;G(arguments.length>0?arguments:[""],function(b){a=a.replace(q("</?"+R(b)+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;G(arguments.length>0?arguments:["\\S+"],function(b){b=q("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c,d){var e="",f="",g=this.toString(),j="["+ra()+"]+",i="[^"+ra()+"]*",h=q(j+i+"$");d=K(d)?"...":t(d);if(g.length<=a)return g;switch(c){case "left":a=g.length-a;e=d;g=g.slice(a);
8
- h=q("^"+i+j);break;case "middle":a=oa(a/2);f=d+g.slice(g.length-a).trimLeft();g=g.slice(0,a);break;default:a=a;f=d;g=g.slice(0,a)}if(b===m&&this.slice(a,a+1).match(/\S/))g=g.remove(h);return e+g+f},pad:function(a,b){return pa(b,a)+this+pa(b,a)},padLeft:function(a,b){return pa(b,a)+this},padRight:function(a,b){return this+pa(b,a)},first:function(a){if(K(a))a=1;return this.substr(0,a)},last:function(a){if(K(a))a=1;return this.substr(this.length-a<0?0:this.length-a)},repeat:function(a){var b="",c=0;
9
- if(B(a)&&a>0)for(;c<a;){b+=this;c++}return b},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[\s\S]/g:/^\S/,function(c){var d=c.toUpperCase(),e;e=b?c:d;b=d!==c;return e})},assign:function(){var a={};G(arguments,function(b,c){if(L(b))na(a,b);else a[c+1]=b});return this.replace(/\{([^{]+?)\}/g,function(b,c){return ma(a,c)?a[c]:b})},namespace:function(a){a=a||ba;H(this.split("."),
10
- function(b,c){return!!(a=a[c])});return a}});F(t,k,m,{insert:t.prototype.add});
11
- (function(a){if(this.btoa){Eb=this.btoa;Fb=this.atob}else{var b=/[^A-Za-z0-9\+\/\=]/g;Eb=function(c){var d="",e,f,g,j,i,h,n=0;do{e=c.charCodeAt(n++);f=c.charCodeAt(n++);g=c.charCodeAt(n++);j=e>>2;e=(e&3)<<4|f>>4;i=(f&15)<<2|g>>6;h=g&63;if(isNaN(f))i=h=64;else if(isNaN(g))h=64;d=d+a.charAt(j)+a.charAt(e)+a.charAt(i)+a.charAt(h)}while(n<c.length);return d};Fb=function(c){var d="",e,f,g,j,i,h=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");
12
- do{e=a.indexOf(c.charAt(h++));f=a.indexOf(c.charAt(h++));j=a.indexOf(c.charAt(h++));i=a.indexOf(c.charAt(h++));e=e<<2|f>>4;f=(f&15)<<4|j>>2;g=(j&3)<<6|i;d+=t.fromCharCode(e);if(j!=64)d+=t.fromCharCode(f);if(i!=64)d+=t.fromCharCode(g)}while(h<c.length);return d}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
2
+ E(t,k,n,{escapeRegExp:function(){return Q(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return Eb(this)},decodeBase64:function(){return Fb(this)},each:function(a,b){var c,
3
+ d;if(z(a)){b=a;a=/[\s\S]/g}else if(a)if(C(a))a=r(Q(a),"gi");else{if(D(a))a=r(a.source,sa(a,"g"))}else a=/[\s\S]/g;c=this.match(a)||[];if(b)for(d=0;d<c.length;d++)c[d]=b.call(this,c[d],d,c)||c[d];return c},shift:function(a){var b="";a=a||0;this.codes(function(c){b+=t.fromCharCode(c+a)});return b},codes:function(a){for(var b=[],c=0;c<this.length;c++){var d=this.charCodeAt(c);b.push(d);a&&a.call(this,d,c)}return b},chars:function(a){return this.each(a)},words:function(a){return this.trim().each(/\S+/g,
4
+ a)},lines:function(a){return this.trim().each(/^.*$/gm,a)},paragraphs:function(a){var b=this.trim().split(/[\r\n]{2,}/);return b=b.map(function(c){if(a)var d=a.call(c);return d?d:c})},startsWith:function(a,b){if(K(b))b=k;var c=D(a)?a.source.replace("^",""):Q(a);return r("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(K(b))b=k;var c=D(a)?a.source.replace("$",""):Q(a);return r(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(D(a)?
5
+ a:Q(a))!==-1},add:function(a,b){b=K(b)?this.length:b;return this.slice(0,b)+a+this.slice(b)},remove:function(a){return this.replace(a,"")},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.trim().replace(/([\r\n\s\u3000])+/g,function(a,b){return b==="\u3000"?b:" "})},at:function(){return va(this,arguments,k)},from:function(a){return this.slice(a)},to:function(a){if(K(a))a=this.length;return this.slice(0,a)},dasherize:function(){return this.underscore().replace(/_/g,
6
+ "-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(t.Inflector&&t.Inflector.acronymRegExp,function(a,b){return(b>0?"_":"")+a.toLowerCase()}).replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase()},camelize:function(a){return this.underscore().replace(/(^|_)([^_]+)/g,function(b,c,d,e){b=d;b=(c=t.Inflector)&&c.acronyms[b];b=C(b)?b:void 0;e=a!==n||e>0;if(b)return e?b:b.toLowerCase();return e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g,
7
+ " ")},stripTags:function(){var a=this;F(arguments.length>0?arguments:[""],function(b){a=a.replace(r("</?"+Q(b)+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;F(arguments.length>0?arguments:["\\S+"],function(b){b=r("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c,d){var e="",g="",f=this.toString(),i="["+ra()+"]+",j="[^"+ra()+"]*",h=r(i+j+"$");d=K(d)?"...":t(d);if(f.length<=a)return f;switch(c){case "left":a=f.length-a;e=d;f=f.slice(a);
8
+ h=r("^"+j+i);break;case "middle":a=N(a/2);g=d+f.slice(f.length-a).trimLeft();f=f.slice(0,a);break;default:a=a;g=d;f=f.slice(0,a)}if(b===n&&this.slice(a,a+1).match(/\S/))f=f.remove(h);return e+f+g},pad:function(a,b){return pa(b,a)+this+pa(b,a)},padLeft:function(a,b){return pa(b,a)+this},padRight:function(a,b){return this+pa(b,a)},first:function(a){if(K(a))a=1;return this.substr(0,a)},last:function(a){if(K(a))a=1;return this.substr(this.length-a<0?0:this.length-a)},repeat:function(a){var b="",c=0;if(A(a)&&
9
+ a>0)for(;c<a;){b+=this;c++}return b},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[\s\S]/g:/^\S/,function(c){var d=c.toUpperCase(),e;e=b?c:d;b=d!==c;return e})},assign:function(){var a={};F(arguments,function(b,c){if(L(b))ma(a,b);else a[c+1]=b});return this.replace(/\{([^{]+?)\}/g,function(b,c){return la(a,c)?a[c]:b})},namespace:function(a){a=a||ba;G(this.split("."),function(b,
10
+ c){return!!(a=a[c])});return a}});E(t,k,n,{insert:t.prototype.add});
11
+ (function(a){if(this.btoa){Eb=this.btoa;Fb=this.atob}else{var b=/[^A-Za-z0-9\+\/\=]/g;Eb=function(c){var d="",e,g,f,i,j,h,m=0;do{e=c.charCodeAt(m++);g=c.charCodeAt(m++);f=c.charCodeAt(m++);i=e>>2;e=(e&3)<<4|g>>4;j=(g&15)<<2|f>>6;h=f&63;if(isNaN(g))j=h=64;else if(isNaN(f))h=64;d=d+a.charAt(i)+a.charAt(e)+a.charAt(j)+a.charAt(h)}while(m<c.length);return d};Fb=function(c){var d="",e,g,f,i,j,h=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");
12
+ do{e=a.indexOf(c.charAt(h++));g=a.indexOf(c.charAt(h++));i=a.indexOf(c.charAt(h++));j=a.indexOf(c.charAt(h++));e=e<<2|g>>4;g=(g&15)<<4|i>>2;f=(i&3)<<6|j;d+=t.fromCharCode(e);if(i!=64)d+=t.fromCharCode(g);if(j!=64)d+=t.fromCharCode(f)}while(h<c.length);return d}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");