merb-exceptions 1.1.0.pre → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/merb-exceptions.rb +24 -26
- data/lib/merb-exceptions/version.rb +2 -2
- metadata +43 -19
data/Rakefile
CHANGED
data/lib/merb-exceptions.rb
CHANGED
@@ -1,33 +1,31 @@
|
|
1
|
-
|
2
|
-
if defined?(Merb::Plugins)
|
1
|
+
require "merb-core"
|
3
2
|
|
4
|
-
|
3
|
+
Merb::BootLoader.before_app_loads do
|
5
4
|
|
6
|
-
|
5
|
+
end
|
7
6
|
|
8
|
-
|
7
|
+
Merb::BootLoader.after_app_loads do
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
# Default configuration
|
10
|
+
Merb::Plugins.config[:exceptions] = {
|
11
|
+
:web_hooks => [],
|
12
|
+
:email_addresses => [],
|
13
|
+
:app_name => "Merb awesome Application",
|
14
|
+
:environments => ['production'],
|
15
|
+
:email_from => "exceptions@myapp.com",
|
16
|
+
:mailer_config => nil,
|
17
|
+
:mailer_delivery_method => :sendmail
|
18
|
+
}.merge(Merb::Plugins.config[:exceptions] || {})
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
end
|
20
|
+
if Object.const_defined?(:Exceptions)
|
21
|
+
Exceptions.send(:include, MerbExceptions::ExceptionsHelper)
|
22
|
+
end
|
23
|
+
if Merb::Plugins.config[:exceptions][:environments].include?(Merb.env)
|
24
|
+
Merb::Dispatcher::DefaultException.send(:include, MerbExceptions::ExceptionsHelper)
|
25
|
+
Merb::Dispatcher::DefaultException.send(:include, MerbExceptions::DefaultExceptionExtensions)
|
28
26
|
end
|
29
|
-
|
30
|
-
require 'merb-exceptions/notification'
|
31
|
-
require 'merb-exceptions/default_exception_extensions'
|
32
|
-
require 'merb-exceptions/exceptions_helper'
|
33
27
|
end
|
28
|
+
|
29
|
+
require 'merb-exceptions/notification'
|
30
|
+
require 'merb-exceptions/default_exception_extensions'
|
31
|
+
require 'merb-exceptions/exceptions_helper'
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-exceptions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: true
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- rc1
|
10
|
+
version: 1.1.0.rc1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Andy Kent
|
@@ -9,39 +15,53 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-03-14 00:00:00 +00:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: merb-core
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
25
|
requirements:
|
21
26
|
- - ~>
|
22
27
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 1
|
31
|
+
- 0
|
32
|
+
- rc1
|
33
|
+
version: 1.1.0.rc1
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: merb-mailer
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
40
|
requirements:
|
31
41
|
- - ~>
|
32
42
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
43
|
+
segments:
|
44
|
+
- 1
|
45
|
+
- 1
|
46
|
+
- 0
|
47
|
+
- rc1
|
48
|
+
version: 1.1.0.rc1
|
49
|
+
type: :runtime
|
50
|
+
version_requirements: *id002
|
35
51
|
- !ruby/object:Gem::Dependency
|
36
52
|
name: rspec
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
55
|
requirements:
|
41
56
|
- - ">="
|
42
57
|
- !ruby/object:Gem::Version
|
58
|
+
segments:
|
59
|
+
- 1
|
60
|
+
- 2
|
61
|
+
- 9
|
43
62
|
version: 1.2.9
|
44
|
-
|
63
|
+
type: :development
|
64
|
+
version_requirements: *id003
|
45
65
|
description: Merb plugin that supports exception notification
|
46
66
|
email: andy@new-bamboo.co.uk
|
47
67
|
executables: []
|
@@ -80,18 +100,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
100
|
requirements:
|
81
101
|
- - ">="
|
82
102
|
- !ruby/object:Gem::Version
|
103
|
+
segments:
|
104
|
+
- 0
|
83
105
|
version: "0"
|
84
|
-
version:
|
85
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
107
|
requirements:
|
87
108
|
- - ">"
|
88
109
|
- !ruby/object:Gem::Version
|
110
|
+
segments:
|
111
|
+
- 1
|
112
|
+
- 3
|
113
|
+
- 1
|
89
114
|
version: 1.3.1
|
90
|
-
version:
|
91
115
|
requirements: []
|
92
116
|
|
93
117
|
rubyforge_project:
|
94
|
-
rubygems_version: 1.3.
|
118
|
+
rubygems_version: 1.3.6
|
95
119
|
signing_key:
|
96
120
|
specification_version: 3
|
97
121
|
summary: Merb plugin that provides Email and web hook exceptions for Merb.
|