squash_javascript 1.0.0 → 1.0.1
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.
data/README.md
CHANGED
|
@@ -55,7 +55,7 @@ For Rails applications, add the Squash client engine to your Gemfile with
|
|
|
55
55
|
JavaScript into your application.js file (or other JavaScript manifest):
|
|
56
56
|
|
|
57
57
|
```` javascript
|
|
58
|
-
//= require
|
|
58
|
+
//= require squash_javascript
|
|
59
59
|
````
|
|
60
60
|
|
|
61
61
|
### Other projects
|
|
@@ -198,8 +198,8 @@ class _SquashJavascript
|
|
|
198
198
|
for line in stack
|
|
199
199
|
context = line.context
|
|
200
200
|
context = null if context && any(context, (cline) -> cline.length > 200)
|
|
201
|
-
backtraces.push
|
|
202
|
-
return [
|
|
201
|
+
backtraces.push {url: line.url, line: line.line, column: line.column, symbol: line.func, context: context}
|
|
202
|
+
return [ {name: "Active Thread", faulted: true, backtrace: backtraces} ]
|
|
203
203
|
|
|
204
204
|
ISODateString = (d) ->
|
|
205
205
|
pad = (n) -> if n < 10 then '0' + n else n
|
|
@@ -5,8 +5,8 @@ a=[];for(d in b)k.call(b,d)&&(c=b[d],a.push(this.options[d]=c));return a};e.prot
|
|
|
5
5
|
e.stack),console.error("-- original error:",b)}};e.prototype.addUserData=function(b,d){try{return d()}catch(c){throw null==c._squash_user_data&&(c._squash_user_data={}),l(c._squash_user_data,b),c;}};e.prototype.addingUserData=function(b,d){return function(){var c;c=1<=arguments.length?f.call(arguments,0):[];return SquashJavascript.instance().addUserData(b,function(){return d.apply(null,c)})}};e.prototype.ignoreExceptions=function(){var b,d;d=2<=arguments.length?f.call(arguments,0,b=arguments.length-
|
|
6
6
|
1):(b=0,[]);b=arguments[b++];try{return b()}catch(c){throw c._squash_ignored_exceptions=(c._squash_ignored_exceptions||[]).concat(d),c;}};e.prototype.ignoringExceptions=function(){var b,d,c;d=2<=arguments.length?f.call(arguments,0,c=arguments.length-1):(c=0,[]);b=arguments[c++];return function(){var a,g;a=1<=arguments.length?f.call(arguments,0):[];return(g=SquashJavascript.instance()).ignoreExceptions.apply(g,f.call(d).concat([function(){return b.apply(null,a)}]))}};e.prototype.HTTPTransmit=function(b,
|
|
7
7
|
d,c){var a,g,n;a=new XMLHttpRequest;a.timeout=this.options.transmitTimeout;a.open("POST",b,!0);g=0;for(n=d.length;g<n;g++)b=d[g],a.setRequestHeader(b[0],b[1]);a.send(c);return a};e.prototype.shouldIgnoreError=function(b){var d;d=this.options.ignoredExceptionClasses.concat(b._squash_ignored_exceptions||[]);return u(d,function(c){return b.name===c})?!0:u(this.options.ignoredExceptionMessages,function(c,a){return b.name===c?u(a,function(a){return b.message.match(a)}):!1})};C=function(b){var d,c,a,g,
|
|
8
|
-
n;d=[];g=0;for(n=b.length;g<n;g++)a=b[g],(c=a.context)&&u(c,function(a){return 200<a.length})&&(c=null),d.push(
|
|
9
|
-
c)&&(a=b[c],d(c,a)))return!0;return!1};l=function(b,d){var c,a,g;g=[];for(c in d)k.call(d,c)&&(a=d[c],g.push(b[c]=a));return g};h=e}).call(this);var TraceKit={};
|
|
8
|
+
n;d=[];g=0;for(n=b.length;g<n;g++)a=b[g],(c=a.context)&&u(c,function(a){return 200<a.length})&&(c=null),d.push({url:a.url,line:a.line,column:a.column,symbol:a.func,context:c});return[{name:"Active Thread",faulted:!0,backtrace:d}]};r=function(b){var d;d=function(b){return 10>b?"0"+b:b};return""+b.getUTCFullYear()+"-"+d(b.getUTCMonth()+1)+"-"+d(b.getUTCDate())+"T"+d(b.getUTCHours())+":"+d(b.getUTCMinutes())+":"+d(b.getUTCSeconds())+"Z"};u=function(b,d){var c,a,g;if(b instanceof Array){a=0;for(g=b.length;a<
|
|
9
|
+
g;a++)if(c=b[a],d(c))return!0}else for(c in b)if(k.call(b,c)&&(a=b[c],d(c,a)))return!0;return!1};l=function(b,d){var c,a,g;g=[];for(c in d)k.call(d,c)&&(a=d[c],g.push(b[c]=a));return g};h=e}).call(this);var TraceKit={};
|
|
10
10
|
TraceKit.report=function(){function h(e){var j=null,h;for(h in f)if(f.hasOwnProperty(h))try{f[h](e)}catch(l){j=l}if(j)throw j;}function k(r){if(j){if(e===r)return;var f=j;e=j=null;h(f)}var k=TraceKit.computeStackTrace(r);j=k;e=r;window.setTimeout(function(){e===r&&(e=j=null,h(k))},k.incomplete?2E3:0);throw r;}var f=[],e=null,j=null,v=window.onerror;window.onerror=function(r,f,k){var l=null;j?(TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(j,f,k,r),l=j,e=j=null):(l={url:f,line:k},l.func=
|
|
11
11
|
TraceKit.computeStackTrace.guessFunctionName(l.url,l.line),l.context=TraceKit.computeStackTrace.gatherContext(l.url,l.line),l={mode:"onerror",message:r,stack:[l]});h(l);return v?v.apply(this,arguments):!1};k.subscribe=function(e){f.push(e)};k.unsubscribe=function(e){for(var j=f.length-1;0<=j;--j)f[j]===e&&f.splice(j,1)};return k}();
|
|
12
12
|
TraceKit.computeStackTrace=function(){function h(a){if(!c.hasOwnProperty(a)){var g,b=a.split("/");if(2<b.length&&b[2]===document.domain)try{void 0===XMLHttpRequest&&(XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(g){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(b){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(n){}throw Error("No XHR.");});var z=new XMLHttpRequest;z.open("GET",a,!1);
|
|
@@ -204,9 +204,21 @@
|
|
|
204
204
|
})) {
|
|
205
205
|
context = null;
|
|
206
206
|
}
|
|
207
|
-
backtraces.push(
|
|
207
|
+
backtraces.push({
|
|
208
|
+
url: line.url,
|
|
209
|
+
line: line.line,
|
|
210
|
+
column: line.column,
|
|
211
|
+
symbol: line.func,
|
|
212
|
+
context: context
|
|
213
|
+
});
|
|
208
214
|
}
|
|
209
|
-
return [
|
|
215
|
+
return [
|
|
216
|
+
{
|
|
217
|
+
name: "Active Thread",
|
|
218
|
+
faulted: true,
|
|
219
|
+
backtrace: backtraces
|
|
220
|
+
}
|
|
221
|
+
];
|
|
210
222
|
};
|
|
211
223
|
|
|
212
224
|
ISODateString = function(d) {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: squash_javascript
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
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:
|
|
12
|
+
date: 2013-01-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: railties
|
|
@@ -159,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
159
159
|
version: '0'
|
|
160
160
|
segments:
|
|
161
161
|
- 0
|
|
162
|
-
hash:
|
|
162
|
+
hash: 3660226627652013291
|
|
163
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
none: false
|
|
165
165
|
requirements:
|