goalie 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/goalie.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{goalie}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Helder Ribeiro"]
12
- s.date = %q{2010-08-11}
12
+ s.date = %q{2010-09-13}
13
13
  s.description = %q{Middleware to catch exceptions and Rails Engine to render them. Error-handling views and controllers can be easily overriden.}
14
14
  s.email = %q{helder@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -1,6 +1,9 @@
1
1
  module Goalie
2
2
 
3
3
  # 403 Forbidden
4
- class ForbiddenAccess < StandardError; end # :nodoc
4
+ class Forbidden < StandardError; end # :nodoc
5
+
6
+ # 404 Not Found
7
+ class NotFound < StandardError; end # :nodoc
5
8
 
6
9
  end
@@ -1,3 +1,3 @@
1
1
  module Goalie
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
data/lib/goalie.rb CHANGED
@@ -2,6 +2,8 @@ require 'active_support/core_ext/exception'
2
2
  require 'active_support/notifications'
3
3
  require 'action_dispatch/http/request'
4
4
 
5
+ require 'goalie/exceptions'
6
+
5
7
  module Goalie
6
8
  # This middleware rescues any exception returned by the application
7
9
  # and renders nice exception pages.
@@ -20,7 +22,8 @@ module Goalie
20
22
  'ActionController::MethodNotAllowed' => :method_not_allowed,
21
23
  'ActionController::NotImplemented' => :not_implemented,
22
24
  'ActionController::InvalidAuthenticityToken' => :unprocessable_entity,
23
- 'Goalie::Forbidden' => :forbidden
25
+ 'Goalie::Forbidden' => :forbidden,
26
+ 'Goalie::NotFound' => :not_found
24
27
  })
25
28
 
26
29
  FAILSAFE_RESPONSE = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goalie
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Helder Ribeiro
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-11 00:00:00 -03:00
18
+ date: 2010-09-13 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies: []
21
21