airbrake 3.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/.gitignore +18 -0
  2. data/.yardopts +3 -0
  3. data/CHANGELOG +441 -0
  4. data/Gemfile +3 -0
  5. data/INSTALL +25 -0
  6. data/MIT-LICENSE +22 -0
  7. data/README.md +431 -0
  8. data/README_FOR_HEROKU_ADDON.md +93 -0
  9. data/Rakefile +188 -0
  10. data/SUPPORTED_RAILS_VERSIONS +14 -0
  11. data/TESTING.md +26 -0
  12. data/airbrake.gemspec +33 -0
  13. data/features/metal.feature +23 -0
  14. data/features/rack.feature +27 -0
  15. data/features/rails.feature +254 -0
  16. data/features/rails_with_js_notifier.feature +78 -0
  17. data/features/rake.feature +23 -0
  18. data/features/sinatra.feature +33 -0
  19. data/features/step_definitions/airbrake_shim.rb.template +15 -0
  20. data/features/step_definitions/file_steps.rb +10 -0
  21. data/features/step_definitions/metal_steps.rb +23 -0
  22. data/features/step_definitions/rack_steps.rb +20 -0
  23. data/features/step_definitions/rails_application_steps.rb +401 -0
  24. data/features/step_definitions/rake_steps.rb +17 -0
  25. data/features/support/airbrake_shim.rb.template +15 -0
  26. data/features/support/env.rb +18 -0
  27. data/features/support/matchers.rb +35 -0
  28. data/features/support/rails.rb +181 -0
  29. data/features/support/rake/Rakefile +57 -0
  30. data/features/support/terminal.rb +103 -0
  31. data/features/user_informer.feature +63 -0
  32. data/generators/airbrake/airbrake_generator.rb +90 -0
  33. data/generators/airbrake/lib/insert_commands.rb +34 -0
  34. data/generators/airbrake/lib/rake_commands.rb +24 -0
  35. data/generators/airbrake/templates/airbrake_tasks.rake +25 -0
  36. data/generators/airbrake/templates/capistrano_hook.rb +6 -0
  37. data/generators/airbrake/templates/initializer.rb +6 -0
  38. data/install.rb +1 -0
  39. data/lib/airbrake.rb +150 -0
  40. data/lib/airbrake/backtrace.rb +100 -0
  41. data/lib/airbrake/capistrano.rb +21 -0
  42. data/lib/airbrake/configuration.rb +247 -0
  43. data/lib/airbrake/notice.rb +348 -0
  44. data/lib/airbrake/rack.rb +42 -0
  45. data/lib/airbrake/rails.rb +41 -0
  46. data/lib/airbrake/rails/action_controller_catcher.rb +30 -0
  47. data/lib/airbrake/rails/controller_methods.rb +68 -0
  48. data/lib/airbrake/rails/error_lookup.rb +33 -0
  49. data/lib/airbrake/rails/javascript_notifier.rb +42 -0
  50. data/lib/airbrake/rails3_tasks.rb +82 -0
  51. data/lib/airbrake/railtie.rb +33 -0
  52. data/lib/airbrake/rake_handler.rb +65 -0
  53. data/lib/airbrake/sender.rb +83 -0
  54. data/lib/airbrake/shared_tasks.rb +30 -0
  55. data/lib/airbrake/tasks.rb +83 -0
  56. data/lib/airbrake/user_informer.rb +25 -0
  57. data/lib/airbrake/version.rb +3 -0
  58. data/lib/airbrake_tasks.rb +50 -0
  59. data/lib/rails/generators/airbrake/airbrake_generator.rb +96 -0
  60. data/lib/templates/javascript_notifier.erb +13 -0
  61. data/lib/templates/rescue.erb +91 -0
  62. data/rails/init.rb +1 -0
  63. data/script/integration_test.rb +38 -0
  64. data/test/airbrake_2_2.xsd +78 -0
  65. data/test/airbrake_tasks_test.rb +163 -0
  66. data/test/backtrace_test.rb +163 -0
  67. data/test/catcher_test.rb +333 -0
  68. data/test/configuration_test.rb +216 -0
  69. data/test/helper.rb +251 -0
  70. data/test/javascript_notifier_test.rb +52 -0
  71. data/test/logger_test.rb +85 -0
  72. data/test/notice_test.rb +459 -0
  73. data/test/notifier_test.rb +235 -0
  74. data/test/rack_test.rb +58 -0
  75. data/test/rails_initializer_test.rb +36 -0
  76. data/test/recursion_test.rb +10 -0
  77. data/test/sender_test.rb +193 -0
  78. data/test/user_informer_test.rb +29 -0
  79. metadata +365 -0
@@ -0,0 +1,29 @@
1
+ require File.dirname(__FILE__) + '/helper'
2
+
3
+ class UserInformerTest < Test::Unit::TestCase
4
+ should "modify output if there is an airbrake id" do
5
+ main_app = lambda do |env|
6
+ env['airbrake.error_id'] = 1
7
+ [200, {}, ["<!-- AIRBRAKE ERROR -->"]]
8
+ end
9
+ informer_app = Airbrake::UserInformer.new(main_app)
10
+
11
+ ShamRack.mount(informer_app, "example.com")
12
+
13
+ response = Net::HTTP.get_response(URI.parse("http://example.com/"))
14
+ assert_equal "Airbrake Error 1", response.body
15
+ assert_equal 16, response["Content-Length"].to_i
16
+ end
17
+
18
+ should "not modify output if there is no airbrake id" do
19
+ main_app = lambda do |env|
20
+ [200, {}, ["<!-- AIRBRAKE ERROR -->"]]
21
+ end
22
+ informer_app = Airbrake::UserInformer.new(main_app)
23
+
24
+ ShamRack.mount(informer_app, "example.com")
25
+
26
+ response = Net::HTTP.get_response(URI.parse("http://example.com/"))
27
+ assert_equal "<!-- AIRBRAKE ERROR -->", response.body
28
+ end
29
+ end
metadata ADDED
@@ -0,0 +1,365 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: airbrake
3
+ version: !ruby/object:Gem::Version
4
+ hash: 15424215
5
+ prerelease: 4
6
+ segments:
7
+ - 3
8
+ - 0
9
+ - rc
10
+ - 1
11
+ version: 3.0.rc1
12
+ platform: ruby
13
+ authors:
14
+ - thoughtbot, inc
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2011-08-19 00:00:00 Z
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: builder
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: activesupport
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :runtime
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: actionpack
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ hash: 19
58
+ segments:
59
+ - 2
60
+ - 3
61
+ - 8
62
+ version: 2.3.8
63
+ type: :development
64
+ version_requirements: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ name: activerecord
67
+ prerelease: false
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ hash: 19
74
+ segments:
75
+ - 2
76
+ - 3
77
+ - 8
78
+ version: 2.3.8
79
+ type: :development
80
+ version_requirements: *id004
81
+ - !ruby/object:Gem::Dependency
82
+ name: activesupport
83
+ prerelease: false
84
+ requirement: &id005 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ hash: 19
90
+ segments:
91
+ - 2
92
+ - 3
93
+ - 8
94
+ version: 2.3.8
95
+ type: :development
96
+ version_requirements: *id005
97
+ - !ruby/object:Gem::Dependency
98
+ name: bourne
99
+ prerelease: false
100
+ requirement: &id006 !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ hash: 15
106
+ segments:
107
+ - 1
108
+ - 0
109
+ version: "1.0"
110
+ type: :development
111
+ version_requirements: *id006
112
+ - !ruby/object:Gem::Dependency
113
+ name: cucumber
114
+ prerelease: false
115
+ requirement: &id007 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ~>
119
+ - !ruby/object:Gem::Version
120
+ hash: 59
121
+ segments:
122
+ - 0
123
+ - 10
124
+ - 6
125
+ version: 0.10.6
126
+ type: :development
127
+ version_requirements: *id007
128
+ - !ruby/object:Gem::Dependency
129
+ name: fakeweb
130
+ prerelease: false
131
+ requirement: &id008 !ruby/object:Gem::Requirement
132
+ none: false
133
+ requirements:
134
+ - - ~>
135
+ - !ruby/object:Gem::Version
136
+ hash: 27
137
+ segments:
138
+ - 1
139
+ - 3
140
+ - 0
141
+ version: 1.3.0
142
+ type: :development
143
+ version_requirements: *id008
144
+ - !ruby/object:Gem::Dependency
145
+ name: nokogiri
146
+ prerelease: false
147
+ requirement: &id009 !ruby/object:Gem::Requirement
148
+ none: false
149
+ requirements:
150
+ - - ~>
151
+ - !ruby/object:Gem::Version
152
+ hash: 113
153
+ segments:
154
+ - 1
155
+ - 4
156
+ - 3
157
+ - 1
158
+ version: 1.4.3.1
159
+ type: :development
160
+ version_requirements: *id009
161
+ - !ruby/object:Gem::Dependency
162
+ name: rspec
163
+ prerelease: false
164
+ requirement: &id010 !ruby/object:Gem::Requirement
165
+ none: false
166
+ requirements:
167
+ - - ~>
168
+ - !ruby/object:Gem::Version
169
+ hash: 23
170
+ segments:
171
+ - 2
172
+ - 6
173
+ - 0
174
+ version: 2.6.0
175
+ type: :development
176
+ version_requirements: *id010
177
+ - !ruby/object:Gem::Dependency
178
+ name: sham_rack
179
+ prerelease: false
180
+ requirement: &id011 !ruby/object:Gem::Requirement
181
+ none: false
182
+ requirements:
183
+ - - ~>
184
+ - !ruby/object:Gem::Version
185
+ hash: 27
186
+ segments:
187
+ - 1
188
+ - 3
189
+ - 0
190
+ version: 1.3.0
191
+ type: :development
192
+ version_requirements: *id011
193
+ - !ruby/object:Gem::Dependency
194
+ name: shoulda
195
+ prerelease: false
196
+ requirement: &id012 !ruby/object:Gem::Requirement
197
+ none: false
198
+ requirements:
199
+ - - ~>
200
+ - !ruby/object:Gem::Version
201
+ hash: 37
202
+ segments:
203
+ - 2
204
+ - 11
205
+ - 3
206
+ version: 2.11.3
207
+ type: :development
208
+ version_requirements: *id012
209
+ description:
210
+ email: support@airbrakeapp.com
211
+ executables: []
212
+
213
+ extensions: []
214
+
215
+ extra_rdoc_files: []
216
+
217
+ files:
218
+ - .gitignore
219
+ - .yardopts
220
+ - CHANGELOG
221
+ - Gemfile
222
+ - INSTALL
223
+ - MIT-LICENSE
224
+ - README.md
225
+ - README_FOR_HEROKU_ADDON.md
226
+ - Rakefile
227
+ - SUPPORTED_RAILS_VERSIONS
228
+ - TESTING.md
229
+ - airbrake.gemspec
230
+ - features/metal.feature
231
+ - features/rack.feature
232
+ - features/rails.feature
233
+ - features/rails_with_js_notifier.feature
234
+ - features/rake.feature
235
+ - features/sinatra.feature
236
+ - features/step_definitions/airbrake_shim.rb.template
237
+ - features/step_definitions/file_steps.rb
238
+ - features/step_definitions/metal_steps.rb
239
+ - features/step_definitions/rack_steps.rb
240
+ - features/step_definitions/rails_application_steps.rb
241
+ - features/step_definitions/rake_steps.rb
242
+ - features/support/airbrake_shim.rb.template
243
+ - features/support/env.rb
244
+ - features/support/matchers.rb
245
+ - features/support/rails.rb
246
+ - features/support/rake/Rakefile
247
+ - features/support/terminal.rb
248
+ - features/user_informer.feature
249
+ - generators/airbrake/airbrake_generator.rb
250
+ - generators/airbrake/lib/insert_commands.rb
251
+ - generators/airbrake/lib/rake_commands.rb
252
+ - generators/airbrake/templates/airbrake_tasks.rake
253
+ - generators/airbrake/templates/capistrano_hook.rb
254
+ - generators/airbrake/templates/initializer.rb
255
+ - install.rb
256
+ - lib/airbrake.rb
257
+ - lib/airbrake/backtrace.rb
258
+ - lib/airbrake/capistrano.rb
259
+ - lib/airbrake/configuration.rb
260
+ - lib/airbrake/notice.rb
261
+ - lib/airbrake/rack.rb
262
+ - lib/airbrake/rails.rb
263
+ - lib/airbrake/rails/action_controller_catcher.rb
264
+ - lib/airbrake/rails/controller_methods.rb
265
+ - lib/airbrake/rails/error_lookup.rb
266
+ - lib/airbrake/rails/javascript_notifier.rb
267
+ - lib/airbrake/rails3_tasks.rb
268
+ - lib/airbrake/railtie.rb
269
+ - lib/airbrake/rake_handler.rb
270
+ - lib/airbrake/sender.rb
271
+ - lib/airbrake/shared_tasks.rb
272
+ - lib/airbrake/tasks.rb
273
+ - lib/airbrake/user_informer.rb
274
+ - lib/airbrake/version.rb
275
+ - lib/airbrake_tasks.rb
276
+ - lib/rails/generators/airbrake/airbrake_generator.rb
277
+ - lib/templates/javascript_notifier.erb
278
+ - lib/templates/rescue.erb
279
+ - rails/init.rb
280
+ - script/integration_test.rb
281
+ - test/airbrake_2_2.xsd
282
+ - test/airbrake_tasks_test.rb
283
+ - test/backtrace_test.rb
284
+ - test/catcher_test.rb
285
+ - test/configuration_test.rb
286
+ - test/helper.rb
287
+ - test/javascript_notifier_test.rb
288
+ - test/logger_test.rb
289
+ - test/notice_test.rb
290
+ - test/notifier_test.rb
291
+ - test/rack_test.rb
292
+ - test/rails_initializer_test.rb
293
+ - test/recursion_test.rb
294
+ - test/sender_test.rb
295
+ - test/user_informer_test.rb
296
+ homepage: http://www.airbrakeapp.com
297
+ licenses: []
298
+
299
+ post_install_message:
300
+ rdoc_options: []
301
+
302
+ require_paths:
303
+ - lib
304
+ required_ruby_version: !ruby/object:Gem::Requirement
305
+ none: false
306
+ requirements:
307
+ - - ">="
308
+ - !ruby/object:Gem::Version
309
+ hash: 3
310
+ segments:
311
+ - 0
312
+ version: "0"
313
+ required_rubygems_version: !ruby/object:Gem::Requirement
314
+ none: false
315
+ requirements:
316
+ - - ">"
317
+ - !ruby/object:Gem::Version
318
+ hash: 25
319
+ segments:
320
+ - 1
321
+ - 3
322
+ - 1
323
+ version: 1.3.1
324
+ requirements: []
325
+
326
+ rubyforge_project:
327
+ rubygems_version: 1.8.6
328
+ signing_key:
329
+ specification_version: 3
330
+ summary: Send your application errors to our hosted service and reclaim your inbox.
331
+ test_files:
332
+ - features/metal.feature
333
+ - features/rack.feature
334
+ - features/rails.feature
335
+ - features/rails_with_js_notifier.feature
336
+ - features/rake.feature
337
+ - features/sinatra.feature
338
+ - features/step_definitions/airbrake_shim.rb.template
339
+ - features/step_definitions/file_steps.rb
340
+ - features/step_definitions/metal_steps.rb
341
+ - features/step_definitions/rack_steps.rb
342
+ - features/step_definitions/rails_application_steps.rb
343
+ - features/step_definitions/rake_steps.rb
344
+ - features/support/airbrake_shim.rb.template
345
+ - features/support/env.rb
346
+ - features/support/matchers.rb
347
+ - features/support/rails.rb
348
+ - features/support/rake/Rakefile
349
+ - features/support/terminal.rb
350
+ - features/user_informer.feature
351
+ - test/airbrake_2_2.xsd
352
+ - test/airbrake_tasks_test.rb
353
+ - test/backtrace_test.rb
354
+ - test/catcher_test.rb
355
+ - test/configuration_test.rb
356
+ - test/helper.rb
357
+ - test/javascript_notifier_test.rb
358
+ - test/logger_test.rb
359
+ - test/notice_test.rb
360
+ - test/notifier_test.rb
361
+ - test/rack_test.rb
362
+ - test/rails_initializer_test.rb
363
+ - test/recursion_test.rb
364
+ - test/sender_test.rb
365
+ - test/user_informer_test.rb