ratchetio 0.4.5 → 0.4.6
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/.travis.yml +3 -3
- data/CHANGELOG.md +3 -0
- data/Gemfile +4 -1
- data/README.md +1 -1
- data/lib/ratchetio/goalie.rb +23 -0
- data/lib/ratchetio/version.rb +1 -1
- data/lib/ratchetio.rb +2 -1
- data/ratchetio.gemspec +0 -1
- data/spec/ratchetio_spec.rb +2 -2
- metadata +3 -18
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
**0.4.6**
|
4
|
+
- Add support to play nicely with Goalie.
|
5
|
+
|
3
6
|
**0.4.5**
|
4
7
|
- Add `default_logger` config option. It should be a lambda that will return the logger to use if no other logger is configured (i.e. no logger is set by the Railtie hook). Default: `lambda { Logger.new(STDERR) }`
|
5
8
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ratchetio [](https://travis-ci.org/ratchetio/ratchetio-gem)
|
1
|
+
# Ratchetio [](https://travis-ci.org/ratchetio/ratchetio-gem)
|
2
2
|
|
3
3
|
Ruby gem for Ratchet.io, for reporting exceptions in Rails 3 to Ratchet.io. Requires a Ratchet.io account (you can sign up for free).
|
4
4
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Goalie
|
2
|
+
class CustomErrorPages
|
3
|
+
alias_method :orig_render_exception, :render_exception
|
4
|
+
|
5
|
+
private
|
6
|
+
|
7
|
+
def render_exception(env, exception)
|
8
|
+
begin
|
9
|
+
controller = env['action_controller.instance']
|
10
|
+
request_data = controller.try(:ratchetio_request_data)
|
11
|
+
person_data = controller.try(:ratchetio_person_data)
|
12
|
+
Ratchetio.report_exception(exception, request_data, person_data)
|
13
|
+
rescue => e
|
14
|
+
# TODO use logger here?
|
15
|
+
puts "[Ratchet.io] Exception while reporting exception to Ratchet.io: #{e}"
|
16
|
+
end
|
17
|
+
|
18
|
+
# now continue as normal
|
19
|
+
orig_render_exception(env, exception)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
data/lib/ratchetio/version.rb
CHANGED
data/lib/ratchetio.rb
CHANGED
data/ratchetio.gemspec
CHANGED
@@ -15,7 +15,6 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.version = Ratchetio::VERSION
|
16
16
|
|
17
17
|
gem.add_development_dependency 'rails', '~> 3.2.9'
|
18
|
-
gem.add_development_dependency 'sqlite3'
|
19
18
|
gem.add_development_dependency 'devise', '>= 2.1.2'
|
20
19
|
gem.add_development_dependency 'rspec-rails', '~> 2.12.0'
|
21
20
|
gem.add_development_dependency 'database_cleaner', '>= 0.9.1'
|
data/spec/ratchetio_spec.rb
CHANGED
@@ -188,8 +188,8 @@ describe Ratchetio do
|
|
188
188
|
|
189
189
|
# should be NameError, but can be NoMethodError sometimes on rubinius 1.8
|
190
190
|
# http://yehudakatz.com/2010/01/02/the-craziest-fing-bug-ive-ever-seen/
|
191
|
-
trace[:exception][:class].should match(
|
192
|
-
trace[:exception][:message].should match(/^undefined local variable or method `bar'/)
|
191
|
+
trace[:exception][:class].should match(/^(NameError|NoMethodError)$/)
|
192
|
+
trace[:exception][:message].should match(/^(undefined local variable or method `bar'|undefined method `bar' on an instance of)/)
|
193
193
|
end
|
194
194
|
end
|
195
195
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ratchetio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
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: 2012-
|
12
|
+
date: 2012-12-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -27,22 +27,6 @@ dependencies:
|
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 3.2.9
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: sqlite3
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
30
|
- !ruby/object:Gem::Dependency
|
47
31
|
name: devise
|
48
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,6 +94,7 @@ files:
|
|
110
94
|
- lib/generators/ratchetio/templates/initializer.rb
|
111
95
|
- lib/ratchetio.rb
|
112
96
|
- lib/ratchetio/configuration.rb
|
97
|
+
- lib/ratchetio/goalie.rb
|
113
98
|
- lib/ratchetio/rails.rb
|
114
99
|
- lib/ratchetio/rails/controller_methods.rb
|
115
100
|
- lib/ratchetio/rails/middleware/exception_catcher.rb
|