squash_javascript 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9e35a0503ef448fa8f429d08cb40018c2517212
|
4
|
+
data.tar.gz: 697f9aff6acb9315352be561122f69a103f6b4c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7e5d2d20a98a2fca3e9745776cd434d1b7059cd91378188a34e8f950872e0d87078a0e4898cf2993282cc60857b4d582f2f2895728f0757216fe974afd3b576
|
7
|
+
data.tar.gz: 83e11c7ad7ae4cd6d7bed4d6006d98b8b767734914863be212e20ec4d8b96813d2959ccf9ceb9be57847c27f68057bd7d352ed5349791b760c766f7f604ad9fd
|
data/README.md
CHANGED
@@ -85,6 +85,14 @@ include it using a `<script>` tag:
|
|
85
85
|
The file defines a `SquashJavascript` singleton which is accessible using
|
86
86
|
`SquashJavascript.instance()`.
|
87
87
|
|
88
|
+
### Configuring CORS
|
89
|
+
|
90
|
+
In order for applications to report their JavaScript errors to Squash, your
|
91
|
+
Squash instance must be configured to accept cross-origin requests from your
|
92
|
+
other website. In your Squash web code, update the `allowed_origins`
|
93
|
+
configuration (under `config/environments/[environment]/dogfood.yml`) to include
|
94
|
+
the host serving your application.
|
95
|
+
|
88
96
|
Usage
|
89
97
|
-----
|
90
98
|
|
@@ -27,7 +27,7 @@ class Squash::Javascript::SourceMappingJavascriptMinifier < Tilt::Template
|
|
27
27
|
private
|
28
28
|
|
29
29
|
def digest(io)
|
30
|
-
Rails.application.assets.digest
|
30
|
+
Rails.application.assets.pack_hexdigest(Rails.application.assets.digest(io))
|
31
31
|
end
|
32
32
|
|
33
33
|
def source_map_path(digest)
|
@@ -7,7 +7,7 @@ namespace :sourcemaps do
|
|
7
7
|
task minified: :environment do
|
8
8
|
manifest_path = Rails.root.join('public',
|
9
9
|
Rails.application.config.assets.prefix.sub(/^\//, ''),
|
10
|
-
'manifest-*.json')
|
10
|
+
'.sprockets-manifest-*.json')
|
11
11
|
manifest_path = Dir.glob(manifest_path.to_s).first
|
12
12
|
raise "You must precompile your static assets before running this task." unless manifest_path
|
13
13
|
|
@@ -16,9 +16,9 @@ function m(a){var c=[window.location.href],b=document.getElementsByTagName("scri
|
|
16
16
|
b[1];b=k(b[2]);d=RegExp("on"+a+"=[\\'\"]\\s*"+b+"\\s*[\\'\"]","i");if(d=r(d,c[0]))return d;d=RegExp(b);if(d=r(d,c))return d}return null}function v(a,b,c,d,e){b={url:b,line:c,column:e};if(b.url&&b.line){a.incomplete=!1;b.func||(b.func=f(b.url,b.line));b.context||(b.context=i(b.url,b.line));if(e=/ '([^']+)' /.exec(e))b.column=n(e[1],b.url,b.line);if(0<a.stack.length&&a.stack[0].url===b.url){if(a.stack[0].line===b.line)return!1;if(!a.stack[0].line&&a.stack[0].func===b.func)return a.stack[0].line=b.line,
|
17
17
|
a.stack[0].context=b.context,!1}a.stack.unshift(b);return a.partial=!0}a.incomplete=!0;return!1}function A(a,b){for(var d=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,e=[],i={},k,h,g=arguments.callee.caller;g;g=g.caller)if(!(g===c||g===TraceKit.report)){h={url:null,func:"?",line:null,column:null};if(g.name)h.func=g.name;else if(k=d.exec(g.toString()))h.func=k[1];if(k=m(g)){h.url=k.url;h.line=k.line;"?"===h.func&&(h.func=f(h.url,h.line));var r=/ '([^']+)' /.exec(a.message||
|
18
18
|
a.description);r&&(h.column=n(r[1],k.url,k.line))}i[""+g]&&(h.recursion=!0);e.push(h)}b&&e.splice(0,b);d={mode:"callers",name:a.name,message:a.message,stack:e};v(d,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description);return d}function c(a,c){var d=null,c=void 0===c?0:+c;try{for(var e=/ line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,m=a.stacktrace.split("\n"),p=[],h,v=0,L=m.length;v<L;v+=2)if(h=e.exec(m[v])){var u={line:+h[1],column:+h[2],
|
19
|
-
func:h[3]||h[4],args:h[5]?h[5].split(","):[],url:h[6]};!u.func&&u.line&&(u.func=f(u.url,u.line));if(u.line)try{u.context=i(u.url,u.line)}catch(U){}u.context||(u.context=[m[v+1]]);p.push(u)}d=p.length?{mode:"stacktrace",name:a.name,message:a.message,stack:p}:null;if(d)return d}catch(M){if(b)throw M;}try{if(a.stack){var e=/^\s*at (?:
|
20
|
-
[],q,s,B=/^(.*) is undefined$/.exec(a.message);h=0;for(var E=C.length;h<E;++h){if(q=m.exec(C[h]))s={url:q[3],func:q[1],args:q[2]?q[2].split(","):"",line:+q[4],column:q[5]?+q[5]:null};else if(q=e.exec(C[h]))s={url:q[2],func:q[1],line:+q[3],column:q[4]?+q[4]:null};else continue;!s.func&&s.line&&(s.func=f(s.url,s.line));s.line&&(s.context=i(s.url,s.line));p.push(s)}p[0]&&(p[0].line&&!p[0].column&&B)&&(p[0].column=n(B[1],p[0].url,p[0].line));d=p.length?{mode:"stack",name:a.name,
|
21
|
-
null}else d=null;if(d)return d}catch(N){if(b)throw N;}try{var y=a.message.split("\n");if(4>y.length)d=null;else{C=/^\s*Line (\d+) of linked script ((?:file|
|
22
|
-
{url:w[2],func:w[3],line:+w[1]};else if(w=q.exec(y[t])){var l={url:w[3],func:w[4]},O=+w[1],I=E[w[2]-1];if(I&&(z=g(l.url))){z=z.join("\n");var J=z.indexOf(I.innerText);0<=J&&(l.line=O+z.substring(0,J).split("\n").length)}}else if(w=s.exec(y[t])){var K=window.location.href.replace(/#.*$/,""),P=w[1],Q=RegExp(k(y[t+1]));z=r(Q,[K]);l={url:K,line:z?z.line:P,func:""}}if(l){l.func||(l.func=f(l.url,l.line));var D=i(l.url,l.line),R=D?D[Math.floor(D.length/2)]:null;l.context=
|
23
|
-
"")?D:[y[t+1]];B.push(l)}}d=B.length?{mode:"multiline",name:a.name,message:y[0],stack:B}:null}if(d)return d}catch(S){if(b)throw S;}try{if(d=A(a,c+1))return d}catch(T){if(b)throw T;}return{mode:"failed"}}var b=!1,d={};c.augmentStackTraceWithInitialElement=v;c.guessFunctionName=f;c.gatherContext=i;c.ofCaller=function(a){a=(void 0===a?0:+a)+1;try{0()}catch(b){return c(b,a+1)}return null};return c}();
|
19
|
+
func:h[3]||h[4],args:h[5]?h[5].split(","):[],url:h[6]};!u.func&&u.line&&(u.func=f(u.url,u.line));if(u.line)try{u.context=i(u.url,u.line)}catch(U){}u.context||(u.context=[m[v+1]]);p.push(u)}d=p.length?{mode:"stacktrace",name:a.name,message:a.message,stack:p}:null;if(d)return d}catch(M){if(b)throw M;}try{if(a.stack){var e=/^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,m=/^\s*(?:(\S*)(?:\((.*?)\))?@)?((?:file|http|https).*?):(\d+)(?::(\d+))?\s*$/i,
|
20
|
+
C=a.stack.split("\n"),p=[],q,s,B=/^(.*) is undefined$/.exec(a.message);h=0;for(var E=C.length;h<E;++h){if(q=m.exec(C[h]))s={url:q[3],func:q[1],args:q[2]?q[2].split(","):"",line:+q[4],column:q[5]?+q[5]:null};else if(q=e.exec(C[h]))s={url:q[2],func:q[1],line:+q[3],column:q[4]?+q[4]:null};else continue;!s.func&&s.line&&(s.func=f(s.url,s.line));s.line&&(s.context=i(s.url,s.line));p.push(s)}p[0]&&(p[0].line&&!p[0].column&&B)&&(p[0].column=n(B[1],p[0].url,p[0].line));d=p.length?{mode:"stack",name:a.name,
|
21
|
+
message:a.message,stack:p}:null}else d=null;if(d)return d}catch(N){if(b)throw N;}try{var y=a.message.split("\n");if(4>y.length)d=null;else{C=/^\s*Line (\d+) of linked script ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i;q=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i;s=/^\s*Line (\d+) of function script\s*$/i;var B=[],l=document.getElementsByTagName("script"),E=[],w,t,H,z;for(t in l)l.hasOwnProperty(t)&&!l[t].src&&E.push(l[t]);t=2;for(H=y.length;t<
|
22
|
+
H;t+=2){l=null;if(w=C.exec(y[t]))l={url:w[2],func:w[3],line:+w[1]};else if(w=q.exec(y[t])){var l={url:w[3],func:w[4]},O=+w[1],I=E[w[2]-1];if(I&&(z=g(l.url))){z=z.join("\n");var J=z.indexOf(I.innerText);0<=J&&(l.line=O+z.substring(0,J).split("\n").length)}}else if(w=s.exec(y[t])){var K=window.location.href.replace(/#.*$/,""),P=w[1],Q=RegExp(k(y[t+1]));z=r(Q,[K]);l={url:K,line:z?z.line:P,func:""}}if(l){l.func||(l.func=f(l.url,l.line));var D=i(l.url,l.line),R=D?D[Math.floor(D.length/2)]:null;l.context=
|
23
|
+
D&&R.replace(/^\s*/,"")===y[t+1].replace(/^\s*/,"")?D:[y[t+1]];B.push(l)}}d=B.length?{mode:"multiline",name:a.name,message:y[0],stack:B}:null}if(d)return d}catch(S){if(b)throw S;}try{if(d=A(a,c+1))return d}catch(T){if(b)throw T;}return{mode:"failed"}}var b=!1,d={};c.augmentStackTraceWithInitialElement=v;c.guessFunctionName=f;c.gatherContext=i;c.ofCaller=function(a){a=(void 0===a?0:+a)+1;try{0()}catch(b){return c(b,a+1)}return null};return c}();
|
24
24
|
(function(g){var f=Array.prototype.slice,i=g.setTimeout;g.setTimeout=function(){var e=f.call(arguments,0),g=e[0];e[0]=function(){try{g.apply(this,arguments)}catch(e){throw TraceKit.report(e),e;}};return i.apply(this,e)};var e=g.setInterval;g.setInterval=function(){var g=f.call(arguments,0),i=g[0];g[0]=function(){try{i.apply(this,arguments)}catch(e){throw TraceKit.report(e),e;}};return e.apply(this,g)}})(window);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: squash_javascript
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '3.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.4.6
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Squash client for JavaScript projects
|