wat_catcher 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.idea/wat_catcher.iml +11 -1
- data/lib/wat_catcher/engine.rb +7 -0
- data/lib/wat_catcher/railtie.rb +6 -6
- data/lib/wat_catcher/version.rb +1 -1
- data/lib/wat_catcher.rb +4 -3
- data/vendor/assets/javascripts/wat_catcher.coffee +16 -0
- data/wat_catcher.gemspec +1 -0
- metadata +19 -4
- data/lib/wat_catcher/wat_helper.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0085bcb5ea2e5bf701b729a5ffd1adc3c090aa58
|
4
|
+
data.tar.gz: 58cf5eeb32dc597316406ad131e71f62baa0b53b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41dc1f2683a8568255d70fb21015f14b71fa35f85481d0aff80a25a2373188796dbfd7ce5dd5c0abe1fc9a1a2b125c02ca86244f4b078db935e8e8dfa3fecf46
|
7
|
+
data.tar.gz: 5b01688dd4687fa690545318068d225534d43161bab09e65cab808ff2ecb53760b99a950ce5a10b4bf8b20338c99b5aff0f79fd1126e5d5477ac43f88b177ec7
|
data/.gitignore
CHANGED
data/.idea/wat_catcher.iml
CHANGED
@@ -1,10 +1,20 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="FacetManager">
|
4
|
+
<facet type="gem" name="Gem">
|
5
|
+
<configuration>
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
9
|
+
</configuration>
|
10
|
+
</facet>
|
11
|
+
</component>
|
3
12
|
<component name="NewModuleRootManager">
|
4
13
|
<content url="file://$MODULE_DIR$" />
|
5
14
|
<orderEntry type="inheritedJdk" />
|
6
15
|
<orderEntry type="sourceFolder" forTests="false" />
|
7
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.3.5, RVM: ruby-2.0.0-p195 [kairos]) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.0.4, RVM: ruby-2.0.0-p195 [kairos]) [gem]" level="application" />
|
8
18
|
</component>
|
9
19
|
</module>
|
10
20
|
|
data/lib/wat_catcher/railtie.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
module WatCatcher
|
2
|
-
class Railtie < Rails::Railtie
|
2
|
+
class Railtie < ::Rails::Railtie
|
3
3
|
|
4
4
|
config.before_initialize do
|
5
5
|
# Configure bugsnag rails defaults
|
6
6
|
WatCatcher.configure do |config|
|
7
|
-
config.logger = Rails.logger
|
8
|
-
config.release_stage = Rails.env.to_s
|
9
|
-
config.project_root = Rails.root.to_s
|
7
|
+
config.logger = ::Rails.logger
|
8
|
+
config.release_stage = ::Rails.env.to_s
|
9
|
+
config.project_root = ::Rails.root.to_s
|
10
10
|
end
|
11
11
|
|
12
12
|
# Auto-load configuration settings from config/bugsnag.yml if it exists
|
13
|
-
config_file = Rails.root.join("config", "wat_catcher.yml")
|
13
|
+
config_file = ::Rails.root.join("config", "wat_catcher.yml")
|
14
14
|
config = YAML.load_file(config_file) if File.exists?(config_file)
|
15
|
-
WatCatcher.configure(config[Rails.env] ? config[Rails.env] : config) if config
|
15
|
+
WatCatcher.configure(config[::Rails.env] ? config[::Rails.env] : config) if config
|
16
16
|
end
|
17
17
|
|
18
18
|
initializer "wat_catcher.use_rack_middleware" do |app|
|
data/lib/wat_catcher/version.rb
CHANGED
data/lib/wat_catcher.rb
CHANGED
@@ -2,10 +2,8 @@ require "wat_catcher/version"
|
|
2
2
|
|
3
3
|
require 'wat_catcher/backgrounder'
|
4
4
|
require "wat_catcher/middleware"
|
5
|
-
require "wat_catcher/wat_helper"
|
6
5
|
|
7
6
|
require "wat_catcher/railtie" if defined?(Rails::Railtie)
|
8
|
-
|
9
7
|
module WatCatcher
|
10
8
|
class << self
|
11
9
|
def configure(config_hash=nil)
|
@@ -20,4 +18,7 @@ module WatCatcher
|
|
20
18
|
@configuration ||= OpenStruct.new
|
21
19
|
end
|
22
20
|
end
|
23
|
-
end
|
21
|
+
end
|
22
|
+
|
23
|
+
require "wat_catcher/engine"
|
24
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#Send the error to the same host that served this file (I think)
|
2
|
+
window.onerror = (msg,url,line) ->
|
3
|
+
xmlhttp = if window.XMLHttpRequest
|
4
|
+
new XMLHttpRequest()
|
5
|
+
else
|
6
|
+
new ActiveXObject("Microsoft.XMLHTTP")
|
7
|
+
|
8
|
+
params = "wat[page_url]=#{escape(window.location.toString())}"
|
9
|
+
params += "&wat[message]=#{escape(msg)}"
|
10
|
+
params += "&wat[backtrace][]=#{escape(url+":"+line)}"
|
11
|
+
|
12
|
+
xmlhttp.open("POST", "/wats", true);
|
13
|
+
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
14
|
+
xmlhttp.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
15
|
+
xmlhttp.send(params);
|
16
|
+
return false;
|
data/wat_catcher.gemspec
CHANGED
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.0.
|
4
|
+
version: 0.0.3
|
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-
|
11
|
+
date: 2013-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: coffee-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 4.0.0.beta1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 4.0.0.beta1
|
41
55
|
description: Catch your wats
|
42
56
|
email:
|
43
57
|
- cconstan@gmail.com
|
@@ -54,10 +68,11 @@ files:
|
|
54
68
|
- Rakefile
|
55
69
|
- lib/wat_catcher.rb
|
56
70
|
- lib/wat_catcher/backgrounder.rb
|
71
|
+
- lib/wat_catcher/engine.rb
|
57
72
|
- lib/wat_catcher/middleware.rb
|
58
73
|
- lib/wat_catcher/railtie.rb
|
59
74
|
- lib/wat_catcher/version.rb
|
60
|
-
-
|
75
|
+
- vendor/assets/javascripts/wat_catcher.coffee
|
61
76
|
- wat_catcher.gemspec
|
62
77
|
homepage: ''
|
63
78
|
licenses:
|
@@ -79,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
94
|
version: '0'
|
80
95
|
requirements: []
|
81
96
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.0.
|
97
|
+
rubygems_version: 2.0.3
|
83
98
|
signing_key:
|
84
99
|
specification_version: 4
|
85
100
|
summary: A gem for registering Wats from your rails app
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module WatCatcher
|
2
|
-
module Helper
|
3
|
-
def watch_watcher_url
|
4
|
-
"#{WatCatcher.configuration.host}/assets/wat_catcher.js"
|
5
|
-
end
|
6
|
-
def javascript_include_wat_catcher
|
7
|
-
"<script src='#{watch_watcher_url}' type='text/javascript'></script>".html_safe
|
8
|
-
end
|
9
|
-
end
|
10
|
-
ActionView::Base.send :include, Helper if defined?(ActionView::Base)
|
11
|
-
end
|