ratchetio 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -5,8 +5,8 @@ rvm:
5
5
  - 1.9.2
6
6
  - ree
7
7
  - ruby-head
8
- # - jruby-18mode
9
- # - jruby-19mode
10
- # - jruby-head
8
+ - jruby-18mode
9
+ - jruby-19mode
10
+ - jruby-head
11
11
  - rbx-18mode
12
12
  - rbx-19mode
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
@@ -1,4 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in ratchetio.gemspec
4
3
  gemspec
4
+
5
+ gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
6
+ gem 'jruby-openssl', :platform => :jruby
7
+ gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ratchetio [![Build Status](https://travis-ci.org/ratchetio/ratchetio-gem.png)](https://travis-ci.org/ratchetio/ratchetio-gem)
1
+ # Ratchetio [![Build Status](https://secure.travis-ci.org/ratchetio/ratchetio-gem.png?branch=master)](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
+
@@ -1,3 +1,3 @@
1
1
  module Ratchetio
2
- VERSION = "0.4.5"
2
+ VERSION = "0.4.6"
3
3
  end
data/lib/ratchetio.rb CHANGED
@@ -4,7 +4,8 @@ require 'uri'
4
4
 
5
5
  require 'ratchetio/version'
6
6
  require 'ratchetio/configuration'
7
- require 'ratchetio/railtie'
7
+ require 'ratchetio/railtie' if defined?(Rails)
8
+ require 'ratchetio/goalie' if defined?(Goalie)
8
9
 
9
10
  module Ratchetio
10
11
  class << self
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'
@@ -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(/NameError|NoMethodError/)
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.5
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-11-26 00:00:00.000000000 Z
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