wat_catcher 0.5.3 → 0.5.4
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: 2c9ea1606de420bf6dcbd03c3cdcaf1904bf316a
|
4
|
+
data.tar.gz: 9c8fe3d3d781be1b3fdfea34d7bed7722d01ca39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e22374dcbb5ab2ae6247658be773a5c356f4f1606e14f3201ff9681c271867f94cf765e4246a19a8260d3025295cf84b30af933c38e1e8b2204fa12c04c10bd0
|
7
|
+
data.tar.gz: 0a02f0485c097ce4040835ac44688c6df3055208e8205e194249fa50127fe1785794d24e351879b6a411e59e0970d270256c299da83d567e1863239c2d89a8d6
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module WatCatcher
|
2
|
-
class WatsController <
|
2
|
+
class WatsController < ActionController::Base
|
3
3
|
skip_before_filter :verify_authenticity_token, only: :create
|
4
4
|
|
5
|
+
include WatCatcher::CatcherOfWats
|
6
|
+
|
5
7
|
def create
|
6
8
|
Report.new(nil, request: request)
|
7
9
|
head :ok
|
data/lib/wat_catcher/version.rb
CHANGED
@@ -2,8 +2,11 @@ module WatCatcher
|
|
2
2
|
module Helper
|
3
3
|
def javascript_wat_catcher
|
4
4
|
javascript_include_tag "wat_catcher",
|
5
|
-
|
6
|
-
|
5
|
+
data: {
|
6
|
+
route: wat_catcher.wats_path,
|
7
|
+
app_name: ::Rails.application.class.parent_name,
|
8
|
+
app_user: wat_user.as_json
|
9
|
+
}
|
7
10
|
end
|
8
11
|
end
|
9
12
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
parseJson = JSON.parse || jQuery.parseJSON
|
2
|
+
|
1
3
|
#Send the error to the same host that served this file (I think)
|
2
4
|
class @WatCatcher
|
3
5
|
constructor: (target=window) ->
|
@@ -9,6 +11,9 @@ class @WatCatcher
|
|
9
11
|
if attrs?
|
10
12
|
@attrs[attrs[1]] = attr.nodeValue
|
11
13
|
|
14
|
+
|
15
|
+
@app_user = parseJson(@attrs["app-user"]) if (parseJson? && @attrs["app-user"])
|
16
|
+
|
12
17
|
@oldErrorHandler = target.onerror
|
13
18
|
target.onerror = @watHandler
|
14
19
|
|
@@ -38,6 +43,7 @@ class @WatCatcher
|
|
38
43
|
message: msg
|
39
44
|
backtrace: [url+":"+line]
|
40
45
|
language: "javascript"
|
46
|
+
app_user: @app_user
|
41
47
|
}
|
42
48
|
}
|
43
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wat_catcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Constantine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|