rails_exception_handler 2.3.1 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,9 +3,9 @@ source "http://rubygems.org"
3
3
  group :test, :development do
4
4
 
5
5
  #gem "rails", '3.0.20'
6
- # gem "rack-test", '0.5.7'
7
- # gem 'mongoid'
8
- # gem 'bson_ext'
6
+ #gem "rack-test", '0.5.7'
7
+ #gem 'mongoid'
8
+ #gem 'bson_ext'
9
9
 
10
10
  #gem "rails", '3.2.13'
11
11
  #gem "rack-test", '0.6.2'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_exception_handler (2.3.1)
4
+ rails_exception_handler (2.3.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/HISTORY CHANGED
@@ -1,5 +1,8 @@
1
1
  CHANGELOG
2
2
 
3
+ v2.3.2 - January 7th 2014
4
+ - Add helper method for catching exceptions outside of Rack
5
+
3
6
  v2.3.1 - January 7th 2014
4
7
  - Fix issue where it attempted to connect to DBs for disabled storage strategies
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.3.2
@@ -39,4 +39,5 @@ require 'rails_exception_handler/handler.rb'
39
39
  require 'rails_exception_handler/parser.rb'
40
40
  require 'rails_exception_handler/storage.rb'
41
41
  require 'rails_exception_handler/engine.rb'
42
+ require 'rails_exception_handler/catcher.rb'
42
43
  require 'net/http'
@@ -0,0 +1,16 @@
1
+ class RailsExceptionHandler
2
+
3
+ def self.catch(&block)
4
+ begin
5
+ block.call
6
+ rescue Exception => exception
7
+ if(configuration.activate?)
8
+ exception_handler = Handler.new({'REQUEST_METHOD' => "GET", "rack.input" => ""}, exception)
9
+ exception_handler.handle_exception
10
+ else
11
+ raise exception
12
+ end
13
+ end
14
+ end
15
+
16
+ end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rails_exception_handler"
8
- s.version = "2.3.1"
8
+ s.version = "2.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sharagoz"]
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
35
35
  "lib/generators/rails_exception_handler/templates/rails_exception_handler.rb",
36
36
  "lib/patch/show_exceptions.rb",
37
37
  "lib/rails_exception_handler.rb",
38
+ "lib/rails_exception_handler/catcher.rb",
38
39
  "lib/rails_exception_handler/configuration.rb",
39
40
  "lib/rails_exception_handler/engine.rb",
40
41
  "lib/rails_exception_handler/handler.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_exception_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -165,6 +165,7 @@ files:
165
165
  - lib/generators/rails_exception_handler/templates/rails_exception_handler.rb
166
166
  - lib/patch/show_exceptions.rb
167
167
  - lib/rails_exception_handler.rb
168
+ - lib/rails_exception_handler/catcher.rb
168
169
  - lib/rails_exception_handler/configuration.rb
169
170
  - lib/rails_exception_handler/engine.rb
170
171
  - lib/rails_exception_handler/handler.rb
@@ -201,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
201
202
  version: '0'
202
203
  segments:
203
204
  - 0
204
- hash: -163553395504491843
205
+ hash: -2232335349036436667
205
206
  required_rubygems_version: !ruby/object:Gem::Requirement
206
207
  none: false
207
208
  requirements: