errplane 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/.gitignore +3 -2
  2. data/README.md +21 -0
  3. data/errplane.gemspec +2 -2
  4. data/lib/errplane.rb +3 -1
  5. data/lib/errplane/rails.rb +0 -2
  6. data/lib/errplane/sinatra.rb +1 -1
  7. data/lib/errplane/version.rb +1 -1
  8. data/spec/spec_helper.rb +7 -9
  9. data/spec/support/rails2/app/controllers/application_controller.rb +4 -0
  10. data/spec/{rails2 → support/rails2}/app/controllers/widgets_controller.rb +0 -1
  11. data/spec/support/rails2/app/helpers/application_helper.rb +2 -0
  12. data/spec/support/rails2/app/helpers/widgets_helper.rb +2 -0
  13. data/spec/support/rails2/config/environment.rb +4 -0
  14. data/spec/{rails2 → support/rails2}/config/environments/test.rb +0 -0
  15. data/spec/support/rails2/config/initializers/cookie_verification_secret.rb +1 -0
  16. data/spec/{rails2 → support/rails2}/config/initializers/errplane.rb +0 -0
  17. data/spec/support/rails2/config/initializers/new_rails_defaults.rb +8 -0
  18. data/spec/support/rails2/config/initializers/session_store.rb +4 -0
  19. data/spec/{rails2 → support/rails2}/config/routes.rb +0 -0
  20. data/spec/{app/rails3.rb → support/rails3/app.rb} +0 -0
  21. metadata +29 -109
  22. data/gemfiles/Gemfile.rails-2.3.x.lock +0 -76
  23. data/gemfiles/Gemfile.rails-3.0.x.lock +0 -93
  24. data/gemfiles/Gemfile.rails-3.1.x.lock +0 -105
  25. data/gemfiles/Gemfile.rails-3.2.x.lock +0 -103
  26. data/spec/app/rails2.rb +0 -38
  27. data/spec/rails2/README +0 -243
  28. data/spec/rails2/Rakefile +0 -10
  29. data/spec/rails2/app/controllers/application_controller.rb +0 -10
  30. data/spec/rails2/app/helpers/application_helper.rb +0 -3
  31. data/spec/rails2/app/helpers/widgets_helper.rb +0 -1
  32. data/spec/rails2/config/boot.rb +0 -114
  33. data/spec/rails2/config/database.yml +0 -3
  34. data/spec/rails2/config/environment.rb +0 -33
  35. data/spec/rails2/config/environments/development.rb +0 -17
  36. data/spec/rails2/config/environments/production.rb +0 -28
  37. data/spec/rails2/config/initializers/backtrace_silencers.rb +0 -7
  38. data/spec/rails2/config/initializers/cookie_verification_secret.rb +0 -7
  39. data/spec/rails2/config/initializers/inflections.rb +0 -10
  40. data/spec/rails2/config/initializers/mime_types.rb +0 -5
  41. data/spec/rails2/config/initializers/new_rails_defaults.rb +0 -21
  42. data/spec/rails2/config/initializers/session_store.rb +0 -15
  43. data/spec/rails2/config/locales/en.yml +0 -5
  44. data/spec/rails2/lib/tasks/rspec.rake +0 -144
  45. data/spec/rails2/public/404.html +0 -30
  46. data/spec/rails2/public/422.html +0 -30
  47. data/spec/rails2/public/500.html +0 -30
  48. data/spec/rails2/public/favicon.ico +0 -0
  49. data/spec/rails2/public/images/rails.png +0 -0
  50. data/spec/rails2/public/index.html +0 -275
  51. data/spec/rails2/public/javascripts/application.js +0 -2
  52. data/spec/rails2/public/javascripts/controls.js +0 -963
  53. data/spec/rails2/public/javascripts/dragdrop.js +0 -973
  54. data/spec/rails2/public/javascripts/effects.js +0 -1128
  55. data/spec/rails2/public/javascripts/prototype.js +0 -4320
  56. data/spec/rails2/public/robots.txt +0 -5
  57. data/spec/rails2/script/about +0 -4
  58. data/spec/rails2/script/autospec +0 -6
  59. data/spec/rails2/script/console +0 -3
  60. data/spec/rails2/script/dbconsole +0 -3
  61. data/spec/rails2/script/destroy +0 -3
  62. data/spec/rails2/script/generate +0 -3
  63. data/spec/rails2/script/performance/benchmarker +0 -3
  64. data/spec/rails2/script/performance/profiler +0 -3
  65. data/spec/rails2/script/plugin +0 -3
  66. data/spec/rails2/script/runner +0 -3
  67. data/spec/rails2/script/server +0 -3
  68. data/spec/rails2/script/spec +0 -10
  69. data/spec/rails2/test/performance/browsing_test.rb +0 -9
  70. data/spec/rails2/test/test_helper.rb +0 -38
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  .rvmrc
3
3
  *.gem
4
4
  Gemfile.lock
5
+ gemfiles/*.lock
5
6
  pkg/*
6
- spec/app/log
7
- spec/rails2/log
7
+ spec/support/rails2/log/*
8
+ spec/support/rails3/log/*
data/README.md CHANGED
@@ -38,6 +38,27 @@ In your `config/deploy.rb`, add the following line:
38
38
 
39
39
  This will automatically pull your API key from the Rails initializer and notify Errplane of every deployment.
40
40
 
41
+ Sinatra Integration
42
+ --------------------
43
+ Here is a simple sinatra example app. With Sinatra you need to create an application first in the [web site](http://errplane.com/exceptions)
44
+
45
+ ```
46
+ require 'sinatra'
47
+ require 'errplane'
48
+
49
+ Errplane.configure do |config|
50
+ config.api_key = "<API KEY HERE>"
51
+ config.application_id = "<APP KEY HERE>"
52
+ config.ignored_environments = ["development"]
53
+ end
54
+
55
+
56
+ get '/test_error' do
57
+ raise "hello"
58
+ "Hello World!"
59
+ end
60
+ ````
61
+
41
62
  Resque Integration With Multiple Failure Backends
42
63
  -------------------------------------------------
43
64
 
data/errplane.gemspec CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_runtime_dependency 'json'
24
24
 
25
- s.add_development_dependency 'activesupport', ['>= 2.3.14']
26
- s.add_development_dependency 'actionpack', ['>= 2.3.14']
25
+ s.add_dependency 'activesupport', ['>= 2.3.14']
26
+ s.add_dependency 'actionpack', ['>= 2.3.14']
27
27
  s.add_development_dependency 'bundler', ['>= 1.0.0']
28
28
  s.add_development_dependency 'fakeweb', ['>= 0']
29
29
  s.add_development_dependency 'guard', ['>= 0']
data/lib/errplane.rb CHANGED
@@ -13,7 +13,6 @@ require "errplane/backtrace"
13
13
  require "errplane/rack"
14
14
 
15
15
  require "errplane/railtie" if defined?(Rails::Railtie)
16
- require "errplane/sinatra" if defined?(Sinatra::Request)
17
16
 
18
17
  module Errplane
19
18
  class << self
@@ -95,3 +94,6 @@ module Errplane
95
94
  end
96
95
  end
97
96
  end
97
+
98
+ require "errplane/sinatra" if defined?(Sinatra::Request)
99
+
@@ -6,10 +6,8 @@ require 'errplane/rails/air_traffic_controller'
6
6
  module Errplane
7
7
  module Rails
8
8
  def self.initialize
9
- # if defined? Rails::ActionController::Base
10
9
  ActionController::Base.send(:include, Errplane::Rails::AirTrafficController)
11
10
  ActionController::Base.send(:include, Errplane::Rails::Middleware::HijackRescueActionEverywhere)
12
- # end
13
11
 
14
12
  ::Rails.configuration.middleware.insert_after 'ActionController::Failsafe', Errplane::Rack
15
13
 
@@ -1,5 +1,5 @@
1
1
  Errplane.configure(true) do |config|
2
- config.logger ||= logger
2
+ config.logger ||= ENV['rack.logger']
3
3
  config.rails_environment ||= settings.environment
4
4
  config.application_root ||= settings.root
5
5
  config.framework = "Sinatra"
@@ -1,3 +1,3 @@
1
1
  module Errplane
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -18,7 +18,6 @@ else
18
18
  @@configuration = Configuration.new
19
19
  end
20
20
  require 'initializer'
21
- RAILS_ROOT = "#{File.dirname(__FILE__)}/rails2"
22
21
  end
23
22
 
24
23
  require 'bundler/setup'
@@ -30,17 +29,16 @@ FakeWeb.allow_net_connect = false
30
29
  if defined? Rails
31
30
  puts "Loading Rails v#{Rails.version}..."
32
31
 
33
- unless Rails.version.to_f < 3.0
34
- require "app/rails3"
35
- require "rspec/rails"
36
- else
37
- require "rails2/config/environment"
32
+ if Rails.version.to_f < 3.0
33
+ RAILS_ROOT = "#{File.dirname(__FILE__)}/support/rails2"
34
+ require "#{RAILS_ROOT}/config/environment"
38
35
  require "spec/rails"
36
+ else
37
+ require "support/rails3/app"
38
+ require "rspec/rails"
39
39
  end
40
40
  end
41
+
41
42
  if defined? Sinatra
42
43
  require 'spec_helper_for_sinatra'
43
44
  end
44
-
45
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
46
-
@@ -0,0 +1,4 @@
1
+ class ApplicationController < ActionController::Base
2
+ helper :all
3
+ protect_from_forgery
4
+ end
@@ -2,4 +2,3 @@ class WidgetsController < ApplicationController
2
2
  def index; render :nothing => true; end
3
3
  def new; return 1/0; end
4
4
  end
5
-
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module WidgetsHelper
2
+ end
@@ -0,0 +1,4 @@
1
+ Rails::Initializer.run do |config|
2
+ config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
3
+ config.time_zone = 'UTC'
4
+ end
@@ -0,0 +1 @@
1
+ ActionController::Base.cookie_verifier_secret = '171a91942320ec70c77a53d50cf62835b06a9e9e3ee8e9f045d4fe195965b9d5b30ceed7570ac6d77c20ca561229625be0cf987e8342b14f499033a271480970';
@@ -0,0 +1,8 @@
1
+ if defined?(ActiveRecord)
2
+ ActiveRecord::Base.include_root_in_json = true
3
+ ActiveRecord::Base.store_full_sti_class = true
4
+ end
5
+
6
+ ActionController::Routing.generate_best_match = false
7
+ ActiveSupport.use_standard_json_time_format = true
8
+ ActiveSupport.escape_html_entities_in_json = false
@@ -0,0 +1,4 @@
1
+ ActionController::Base.session = {
2
+ :key => '_rails-2.3_session',
3
+ :secret => '76cc9f32d38e9b6227bd663076edcf28cc915dc3021da204763a73dbd0d2741f6f7074af21400d4f8f9ef6c4db72487c467edf4a1dfec732835c5674a9846dd7'
4
+ }
File without changes
File without changes
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.3
4
+ version: 0.4.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-04 00:00:00.000000000 Z
12
+ date: 2012-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -35,7 +35,7 @@ dependencies:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
37
  version: 2.3.14
38
- type: :development
38
+ type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
@@ -51,7 +51,7 @@ dependencies:
51
51
  - - ! '>='
52
52
  - !ruby/object:Gem::Version
53
53
  version: 2.3.14
54
- type: :development
54
+ type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
@@ -203,13 +203,9 @@ files:
203
203
  - config.ru
204
204
  - errplane.gemspec
205
205
  - gemfiles/Gemfile.rails-2.3.x
206
- - gemfiles/Gemfile.rails-2.3.x.lock
207
206
  - gemfiles/Gemfile.rails-3.0.x
208
- - gemfiles/Gemfile.rails-3.0.x.lock
209
207
  - gemfiles/Gemfile.rails-3.1.x
210
- - gemfiles/Gemfile.rails-3.1.x.lock
211
208
  - gemfiles/Gemfile.rails-3.2.x
212
- - gemfiles/Gemfile.rails-3.2.x.lock
213
209
  - generators/errplane/errplane_generator.rb
214
210
  - generators/errplane/templates/initializer.rb
215
211
  - lib/errplane.rb
@@ -232,61 +228,23 @@ files:
232
228
  - lib/rails/generators/errplane/errplane_generator.rb
233
229
  - lib/rails/generators/errplane/templates/initializer.rb
234
230
  - rails/init.rb
235
- - spec/app/rails2.rb
236
- - spec/app/rails3.rb
237
231
  - spec/controllers/widgets_controller_spec.rb
238
232
  - spec/integration/exceptions_spec.rb
239
233
  - spec/integration/integration_helper.rb
240
- - spec/rails2/README
241
- - spec/rails2/Rakefile
242
- - spec/rails2/app/controllers/application_controller.rb
243
- - spec/rails2/app/controllers/widgets_controller.rb
244
- - spec/rails2/app/helpers/application_helper.rb
245
- - spec/rails2/app/helpers/widgets_helper.rb
246
- - spec/rails2/config/boot.rb
247
- - spec/rails2/config/database.yml
248
- - spec/rails2/config/environment.rb
249
- - spec/rails2/config/environments/development.rb
250
- - spec/rails2/config/environments/production.rb
251
- - spec/rails2/config/environments/test.rb
252
- - spec/rails2/config/initializers/backtrace_silencers.rb
253
- - spec/rails2/config/initializers/cookie_verification_secret.rb
254
- - spec/rails2/config/initializers/errplane.rb
255
- - spec/rails2/config/initializers/inflections.rb
256
- - spec/rails2/config/initializers/mime_types.rb
257
- - spec/rails2/config/initializers/new_rails_defaults.rb
258
- - spec/rails2/config/initializers/session_store.rb
259
- - spec/rails2/config/locales/en.yml
260
- - spec/rails2/config/routes.rb
261
- - spec/rails2/lib/tasks/rspec.rake
262
- - spec/rails2/public/404.html
263
- - spec/rails2/public/422.html
264
- - spec/rails2/public/500.html
265
- - spec/rails2/public/favicon.ico
266
- - spec/rails2/public/images/rails.png
267
- - spec/rails2/public/index.html
268
- - spec/rails2/public/javascripts/application.js
269
- - spec/rails2/public/javascripts/controls.js
270
- - spec/rails2/public/javascripts/dragdrop.js
271
- - spec/rails2/public/javascripts/effects.js
272
- - spec/rails2/public/javascripts/prototype.js
273
- - spec/rails2/public/robots.txt
274
- - spec/rails2/script/about
275
- - spec/rails2/script/autospec
276
- - spec/rails2/script/console
277
- - spec/rails2/script/dbconsole
278
- - spec/rails2/script/destroy
279
- - spec/rails2/script/generate
280
- - spec/rails2/script/performance/benchmarker
281
- - spec/rails2/script/performance/profiler
282
- - spec/rails2/script/plugin
283
- - spec/rails2/script/runner
284
- - spec/rails2/script/server
285
- - spec/rails2/script/spec
286
- - spec/rails2/test/performance/browsing_test.rb
287
- - spec/rails2/test/test_helper.rb
288
234
  - spec/spec_helper.rb
289
235
  - spec/suite.sh
236
+ - spec/support/rails2/app/controllers/application_controller.rb
237
+ - spec/support/rails2/app/controllers/widgets_controller.rb
238
+ - spec/support/rails2/app/helpers/application_helper.rb
239
+ - spec/support/rails2/app/helpers/widgets_helper.rb
240
+ - spec/support/rails2/config/environment.rb
241
+ - spec/support/rails2/config/environments/test.rb
242
+ - spec/support/rails2/config/initializers/cookie_verification_secret.rb
243
+ - spec/support/rails2/config/initializers/errplane.rb
244
+ - spec/support/rails2/config/initializers/new_rails_defaults.rb
245
+ - spec/support/rails2/config/initializers/session_store.rb
246
+ - spec/support/rails2/config/routes.rb
247
+ - spec/support/rails3/app.rb
290
248
  - spec/unit/backtrace_spec.rb
291
249
  - spec/unit/black_box_spec.rb
292
250
  - spec/unit/configuration_spec.rb
@@ -312,66 +270,28 @@ required_rubygems_version: !ruby/object:Gem::Requirement
312
270
  version: '0'
313
271
  requirements: []
314
272
  rubyforge_project: errplane
315
- rubygems_version: 1.8.24
273
+ rubygems_version: 1.8.19
316
274
  signing_key:
317
275
  specification_version: 3
318
276
  summary: Rails exception reporting for Errplane.
319
277
  test_files:
320
- - spec/app/rails2.rb
321
- - spec/app/rails3.rb
322
278
  - spec/controllers/widgets_controller_spec.rb
323
279
  - spec/integration/exceptions_spec.rb
324
280
  - spec/integration/integration_helper.rb
325
- - spec/rails2/README
326
- - spec/rails2/Rakefile
327
- - spec/rails2/app/controllers/application_controller.rb
328
- - spec/rails2/app/controllers/widgets_controller.rb
329
- - spec/rails2/app/helpers/application_helper.rb
330
- - spec/rails2/app/helpers/widgets_helper.rb
331
- - spec/rails2/config/boot.rb
332
- - spec/rails2/config/database.yml
333
- - spec/rails2/config/environment.rb
334
- - spec/rails2/config/environments/development.rb
335
- - spec/rails2/config/environments/production.rb
336
- - spec/rails2/config/environments/test.rb
337
- - spec/rails2/config/initializers/backtrace_silencers.rb
338
- - spec/rails2/config/initializers/cookie_verification_secret.rb
339
- - spec/rails2/config/initializers/errplane.rb
340
- - spec/rails2/config/initializers/inflections.rb
341
- - spec/rails2/config/initializers/mime_types.rb
342
- - spec/rails2/config/initializers/new_rails_defaults.rb
343
- - spec/rails2/config/initializers/session_store.rb
344
- - spec/rails2/config/locales/en.yml
345
- - spec/rails2/config/routes.rb
346
- - spec/rails2/lib/tasks/rspec.rake
347
- - spec/rails2/public/404.html
348
- - spec/rails2/public/422.html
349
- - spec/rails2/public/500.html
350
- - spec/rails2/public/favicon.ico
351
- - spec/rails2/public/images/rails.png
352
- - spec/rails2/public/index.html
353
- - spec/rails2/public/javascripts/application.js
354
- - spec/rails2/public/javascripts/controls.js
355
- - spec/rails2/public/javascripts/dragdrop.js
356
- - spec/rails2/public/javascripts/effects.js
357
- - spec/rails2/public/javascripts/prototype.js
358
- - spec/rails2/public/robots.txt
359
- - spec/rails2/script/about
360
- - spec/rails2/script/autospec
361
- - spec/rails2/script/console
362
- - spec/rails2/script/dbconsole
363
- - spec/rails2/script/destroy
364
- - spec/rails2/script/generate
365
- - spec/rails2/script/performance/benchmarker
366
- - spec/rails2/script/performance/profiler
367
- - spec/rails2/script/plugin
368
- - spec/rails2/script/runner
369
- - spec/rails2/script/server
370
- - spec/rails2/script/spec
371
- - spec/rails2/test/performance/browsing_test.rb
372
- - spec/rails2/test/test_helper.rb
373
281
  - spec/spec_helper.rb
374
282
  - spec/suite.sh
283
+ - spec/support/rails2/app/controllers/application_controller.rb
284
+ - spec/support/rails2/app/controllers/widgets_controller.rb
285
+ - spec/support/rails2/app/helpers/application_helper.rb
286
+ - spec/support/rails2/app/helpers/widgets_helper.rb
287
+ - spec/support/rails2/config/environment.rb
288
+ - spec/support/rails2/config/environments/test.rb
289
+ - spec/support/rails2/config/initializers/cookie_verification_secret.rb
290
+ - spec/support/rails2/config/initializers/errplane.rb
291
+ - spec/support/rails2/config/initializers/new_rails_defaults.rb
292
+ - spec/support/rails2/config/initializers/session_store.rb
293
+ - spec/support/rails2/config/routes.rb
294
+ - spec/support/rails3/app.rb
375
295
  - spec/unit/backtrace_spec.rb
376
296
  - spec/unit/black_box_spec.rb
377
297
  - spec/unit/configuration_spec.rb
@@ -1,76 +0,0 @@
1
- PATH
2
- remote: /Users/todd/Projects/errplane/gem
3
- specs:
4
- errplane (0.4.2)
5
- json
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- actionmailer (2.3.14)
11
- actionpack (= 2.3.14)
12
- actionpack (2.3.14)
13
- activesupport (= 2.3.14)
14
- rack (~> 1.1.0)
15
- activerecord (2.3.14)
16
- activesupport (= 2.3.14)
17
- activeresource (2.3.14)
18
- activesupport (= 2.3.14)
19
- activesupport (2.3.14)
20
- fakeweb (1.3.0)
21
- ffi (1.1.4)
22
- guard (1.3.0)
23
- listen (>= 0.4.2)
24
- thor (>= 0.14.6)
25
- guard-rspec (1.2.1)
26
- guard (>= 1.1)
27
- hoe (3.0.6)
28
- rake (~> 0.8)
29
- json (1.7.3)
30
- listen (0.4.7)
31
- rb-fchange (~> 0.0.5)
32
- rb-fsevent (~> 0.9.1)
33
- rb-inotify (~> 0.8.8)
34
- rack (1.1.3)
35
- rails (2.3.14)
36
- actionmailer (= 2.3.14)
37
- actionpack (= 2.3.14)
38
- activerecord (= 2.3.14)
39
- activeresource (= 2.3.14)
40
- activesupport (= 2.3.14)
41
- rake (>= 0.8.3)
42
- rake (0.9.2.2)
43
- rb-fchange (0.0.5)
44
- ffi
45
- rb-fsevent (0.9.1)
46
- rb-inotify (0.8.8)
47
- ffi (>= 0.5.0)
48
- rdoc (3.12)
49
- json (~> 1.4)
50
- rspec (1.3.2)
51
- rspec-rails (1.3.4)
52
- rack (>= 1.0.0)
53
- rspec (~> 1.3.1)
54
- test-unit (1.2.3)
55
- hoe (>= 1.5.1)
56
- thor (0.15.4)
57
- tzinfo (0.3.33)
58
-
59
- PLATFORMS
60
- ruby
61
-
62
- DEPENDENCIES
63
- actionpack (>= 2.3.14)
64
- activesupport (>= 2.3.14)
65
- bundler (>= 1.0.0)
66
- errplane!
67
- fakeweb
68
- guard
69
- guard-rspec
70
- rails (~> 2.3.14)
71
- rake
72
- rdoc
73
- rspec (~> 1.3)
74
- rspec-rails (~> 1.3)
75
- test-unit (= 1.2.3)
76
- tzinfo