errplane 0.4.7 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -11,8 +11,8 @@ Support
11
11
 
12
12
  Running into any issues? Get in touch with us at [support@errplane.com](mailto:support@errplane.com).
13
13
 
14
- Ruby on Rails Installation
15
- --------------------------
14
+ Rails 3.x Installation
15
+ ----------------------
16
16
 
17
17
  Start by adding the gem to your Gemfile:
18
18
 
@@ -29,6 +29,24 @@ This will create `config/initializers/errplane.rb` for you automatically. If you
29
29
 
30
30
  You should be able to view the exception at [http://errplane.com](http://errplane.com) and also receive an email notification of the test exception.
31
31
 
32
+ Rails 2.3.x Installation
33
+ ------------------------
34
+
35
+ Start by adding the gem to your Gemfile:
36
+
37
+ gem "errplane"
38
+
39
+ Then, issue the following commands in your application's root directory:
40
+
41
+ bundle
42
+ script/generate errplane --api-key your-api-key-goes-here
43
+
44
+ This will create `config/initializers/errplane.rb` for you automatically. If you want to make sure that everything's working correctly, just run:
45
+
46
+ bundle exec rake errplane:test
47
+
48
+ You should be able to view the exception at [http://errplane.com](http://errplane.com) and also receive an email notification of the test exception.
49
+
32
50
  Capistrano Integration
33
51
  ----------------------
34
52
 
data/lib/errplane.rb CHANGED
@@ -96,4 +96,3 @@ module Errplane
96
96
  end
97
97
 
98
98
  require "errplane/sinatra" if defined?(Sinatra::Request)
99
-
@@ -1,33 +1,29 @@
1
- module Errplane
2
- def self.get_logger
3
- if( defined?(logger))
4
- logger
5
- else
6
- ENV['rack.logger']
7
- end
8
- end
1
+ Errplane.configure(true) do |config|
2
+ config.logger ||= (defined?(logger) ? logger : ENV['rack.logger'])
3
+ config.framework = "Sinatra"
4
+ config.framework_version = ::Sinatra::VERSION
5
+
6
+ if defined?(settings)
7
+ config.rails_environment ||= settings.environment
8
+ config.application_root ||= settings.root
9
+ end
9
10
  end
10
11
 
11
- Errplane.configure(true) do |config|
12
- config.logger ||= Errplane::get_logger
13
- config.rails_environment ||= settings.environment if defined?(settings)
14
- config.application_root ||= settings.root if defined?(settings)
15
- config.framework = "Sinatra"
16
- config.framework_version = ::Sinatra::VERSION
12
+ def handle_exception(e)
13
+ request_data = {
14
+ :request_url => request.env["REQUEST_URI"],
15
+ :user_agent => request.env["HTTP_USER_AGENT"],
16
+ :session => (defined?(session) ? session : {})
17
+ }
18
+
19
+ Errplane.transmit_unless_ignorable(e, request_data)
20
+ raise e
17
21
  end
18
22
 
19
23
  if defined?(error)
20
- error do
21
- Errplane.transmit_unless_ignorable(request.env['sinatra.error'], request.env)
22
- raise request.env['sinatra.error']
23
- end
24
+ error { handle_exception(request.env['sinatra.error']) }
24
25
  elsif defined?(Sinatra::Base)
25
- class Sinatra::Base
26
- error do
27
- Errplane.transmit_unless_ignorable(request.env['sinatra.error'], request.env)
28
- raise request.env['sinatra.error']
29
- end
30
- end
26
+ class Sinatra::Base
27
+ error { handle_exception(request.env['sinatra.error']) }
28
+ end
31
29
  end
32
-
33
-
@@ -1,3 +1,3 @@
1
1
  module Errplane
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errplane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-08-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70155376260180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
24
+ version_requirements: *70155376260180
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: activesupport
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70155376259420 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: 2.3.14
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: 2.3.14
35
+ version_requirements: *70155376259420
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: actionpack
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70155376258880 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: 2.3.14
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: 2.3.14
46
+ version_requirements: *70155376258880
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: bundler
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70155376258160 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ! '>='
@@ -69,15 +54,10 @@ dependencies:
69
54
  version: 1.0.0
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: 1.0.0
57
+ version_requirements: *70155376258160
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: fakeweb
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &70155376257460 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ! '>='
@@ -85,15 +65,10 @@ dependencies:
85
65
  version: '0'
86
66
  type: :development
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
68
+ version_requirements: *70155376257460
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: guard
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &70155376256680 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
74
  - - ! '>='
@@ -101,15 +76,10 @@ dependencies:
101
76
  version: '0'
102
77
  type: :development
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
79
+ version_requirements: *70155376256680
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: guard-rspec
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &70155376256160 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
85
  - - ! '>='
@@ -117,15 +87,10 @@ dependencies:
117
87
  version: '0'
118
88
  type: :development
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
90
+ version_requirements: *70155376256160
126
91
  - !ruby/object:Gem::Dependency
127
92
  name: rake
128
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &70155376255620 !ruby/object:Gem::Requirement
129
94
  none: false
130
95
  requirements:
131
96
  - - ! '>='
@@ -133,15 +98,10 @@ dependencies:
133
98
  version: '0'
134
99
  type: :development
135
100
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
101
+ version_requirements: *70155376255620
142
102
  - !ruby/object:Gem::Dependency
143
103
  name: rdoc
144
- requirement: !ruby/object:Gem::Requirement
104
+ requirement: &70155376255060 !ruby/object:Gem::Requirement
145
105
  none: false
146
106
  requirements:
147
107
  - - ! '>='
@@ -149,15 +109,10 @@ dependencies:
149
109
  version: '0'
150
110
  type: :development
151
111
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
112
+ version_requirements: *70155376255060
158
113
  - !ruby/object:Gem::Dependency
159
114
  name: rspec
160
- requirement: !ruby/object:Gem::Requirement
115
+ requirement: &70155376254580 !ruby/object:Gem::Requirement
161
116
  none: false
162
117
  requirements:
163
118
  - - ! '>='
@@ -165,15 +120,10 @@ dependencies:
165
120
  version: '0'
166
121
  type: :development
167
122
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: '0'
123
+ version_requirements: *70155376254580
174
124
  - !ruby/object:Gem::Dependency
175
125
  name: tzinfo
176
- requirement: !ruby/object:Gem::Requirement
126
+ requirement: &70155376254080 !ruby/object:Gem::Requirement
177
127
  none: false
178
128
  requirements:
179
129
  - - ! '>='
@@ -181,12 +131,7 @@ dependencies:
181
131
  version: '0'
182
132
  type: :development
183
133
  prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ! '>='
188
- - !ruby/object:Gem::Version
189
- version: '0'
134
+ version_requirements: *70155376254080
190
135
  description: This gem provides exception reporting with Errplane for Rails 3.x applications.
191
136
  email:
192
137
  - todd@errplane.com
@@ -270,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
215
  version: '0'
271
216
  requirements: []
272
217
  rubyforge_project: errplane
273
- rubygems_version: 1.8.19
218
+ rubygems_version: 1.8.15
274
219
  signing_key:
275
220
  specification_version: 3
276
221
  summary: Rails exception reporting for Errplane.