wat_catcher 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5b31f887aebec9fd6edad0d91e5efc0c954e68d
4
- data.tar.gz: ac60246bfee12fd66a639d643ee35d4857c9aed4
3
+ metadata.gz: 0085bcb5ea2e5bf701b729a5ffd1adc3c090aa58
4
+ data.tar.gz: 58cf5eeb32dc597316406ad131e71f62baa0b53b
5
5
  SHA512:
6
- metadata.gz: 7b8bd8627b03b0e7f1158779cc78b4baaabcb92611e8093324327329bd87d03ab965301dddb469e3c3fb5f11cdd41b08024eafc21c14d1da3f5a3a2aa909dcb5
7
- data.tar.gz: 43fab02a765bfa8c725e8f49ad7abe70437a994aeebe830c74b131d8396b214476e9a31a54d41af8bed375a9654076c4d5f7e18a029054f9efe509439b65a468
6
+ metadata.gz: 41dc1f2683a8568255d70fb21015f14b71fa35f85481d0aff80a25a2373188796dbfd7ce5dd5c0abe1fc9a1a2b125c02ca86244f4b078db935e8e8dfa3fecf46
7
+ data.tar.gz: 5b01688dd4687fa690545318068d225534d43161bab09e65cab808ff2ecb53760b99a950ce5a10b4bf8b20338c99b5aff0f79fd1126e5d5477ac43f88b177ec7
data/.gitignore CHANGED
@@ -3,7 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
- .idea
6
+ .idea/
7
7
  Gemfile.lock
8
8
  InstalledFiles
9
9
  _yardoc
@@ -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="rake (v0.9.2.2, RVM: ruby-1.9.3-p125 [nodeventdemo]) [gem]" level="application" />
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
 
@@ -0,0 +1,7 @@
1
+ module WatCatcher
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ # Get rails to add app, lib, vendor to load path
5
+ end
6
+ end
7
+ end
@@ -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|
@@ -1,3 +1,3 @@
1
1
  module WatCatcher
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_runtime_dependency 'coffee-rails', '~> 4.0.0.beta1'
23
24
  end
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.2
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-04-25 00:00:00.000000000 Z
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
- - lib/wat_catcher/wat_helper.rb
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.0.rc.2
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