crashlog 1.0.7 → 1.1.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. data/.travis.yml +19 -8
  2. data/Appraisals +25 -0
  3. data/Gemfile +4 -4
  4. data/Gemfile.lock +54 -13
  5. data/README.md +1 -1
  6. data/Rakefile +4 -0
  7. data/gemfiles/rails_2_3.gemfile +17 -0
  8. data/gemfiles/rails_2_3.gemfile.lock +111 -0
  9. data/gemfiles/rails_3_0.gemfile +17 -0
  10. data/gemfiles/rails_3_0.gemfile.lock +159 -0
  11. data/gemfiles/rails_3_1.gemfile +17 -0
  12. data/gemfiles/rails_3_1.gemfile.lock +169 -0
  13. data/gemfiles/rails_3_2.gemfile +17 -0
  14. data/gemfiles/rails_3_2.gemfile.lock +168 -0
  15. data/lib/crash_log.rb +2 -0
  16. data/lib/crash_log/payload.rb +2 -1
  17. data/lib/crash_log/rails/controller_methods.rb +98 -18
  18. data/lib/crash_log/rails/middleware/debug_exception_catcher.rb +6 -4
  19. data/lib/crash_log/railtie.rb +5 -4
  20. data/lib/crash_log/reporter.rb +4 -4
  21. data/lib/crash_log/sidekiq.rb +18 -0
  22. data/lib/crash_log/version.rb +1 -1
  23. data/spec/crash_log/initializer_spec.rb +39 -39
  24. data/spec/crash_log/payload_spec.rb +2 -0
  25. data/spec/dummy_rails_2/README +243 -0
  26. data/spec/dummy_rails_2/Rakefile +10 -0
  27. data/spec/dummy_rails_2/app/controllers/application_controller.rb +14 -0
  28. data/spec/dummy_rails_2/app/controllers/welcome_controller.rb +13 -0
  29. data/spec/dummy_rails_2/app/helpers/application_helper.rb +3 -0
  30. data/spec/dummy_rails_2/app/helpers/welcome_helper.rb +3 -0
  31. data/spec/dummy_rails_2/app/models/user.rb +2 -0
  32. data/spec/dummy_rails_2/config/boot.rb +114 -0
  33. data/spec/dummy_rails_2/config/environment.rb +41 -0
  34. data/spec/dummy_rails_2/config/environments/test.rb +28 -0
  35. data/spec/dummy_rails_2/config/initializers/backtrace_silencers.rb +7 -0
  36. data/spec/dummy_rails_2/config/initializers/cookie_verification_secret.rb +7 -0
  37. data/spec/{dummy → dummy_rails_2}/config/initializers/crashlog.rb +0 -0
  38. data/spec/dummy_rails_2/config/initializers/inflections.rb +10 -0
  39. data/spec/{dummy → dummy_rails_2}/config/initializers/mime_types.rb +0 -0
  40. data/spec/dummy_rails_2/config/initializers/new_rails_defaults.rb +13 -0
  41. data/spec/dummy_rails_2/config/initializers/session_store.rb +15 -0
  42. data/spec/dummy_rails_2/config/locales/en.yml +5 -0
  43. data/spec/dummy_rails_2/config/routes.rb +38 -0
  44. data/spec/dummy_rails_2/db/seeds.rb +7 -0
  45. data/spec/{dummy/app/mailers/.gitkeep → dummy_rails_2/log/development.log} +0 -0
  46. data/spec/{dummy/app/models/.gitkeep → dummy_rails_2/log/production.log} +0 -0
  47. data/spec/{dummy/lib/assets/.gitkeep → dummy_rails_2/log/server.log} +0 -0
  48. data/spec/dummy_rails_3/.gitignore +4 -0
  49. data/spec/dummy_rails_3/Gemfile +31 -0
  50. data/spec/dummy_rails_3/README +256 -0
  51. data/spec/dummy_rails_3/Rakefile +7 -0
  52. data/spec/dummy_rails_3/app/controllers/application_controller.rb +7 -0
  53. data/spec/dummy_rails_3/app/controllers/welcome_controller.rb +14 -0
  54. data/spec/{dummy → dummy_rails_3}/app/helpers/application_helper.rb +0 -0
  55. data/spec/dummy_rails_3/app/models/user.rb +3 -0
  56. data/spec/dummy_rails_3/app/views/layouts/application.html.erb +14 -0
  57. data/spec/{dummy → dummy_rails_3}/config.ru +0 -0
  58. data/spec/dummy_rails_3/config/application.rb +52 -0
  59. data/spec/dummy_rails_3/config/boot.rb +6 -0
  60. data/spec/{dummy → dummy_rails_3}/config/environment.rb +0 -0
  61. data/spec/dummy_rails_3/config/environments/development.rb +26 -0
  62. data/spec/dummy_rails_3/config/environments/production.rb +49 -0
  63. data/spec/dummy_rails_3/config/environments/test.rb +35 -0
  64. data/spec/{dummy → dummy_rails_3}/config/initializers/backtrace_silencers.rb +0 -0
  65. data/spec/dummy_rails_3/config/initializers/crashlog.rb +8 -0
  66. data/spec/dummy_rails_3/config/initializers/inflections.rb +10 -0
  67. data/spec/dummy_rails_3/config/initializers/mime_types.rb +5 -0
  68. data/spec/dummy_rails_3/config/initializers/secret_token.rb +7 -0
  69. data/spec/{dummy → dummy_rails_3}/config/initializers/session_store.rb +0 -0
  70. data/spec/dummy_rails_3/config/locales/en.yml +5 -0
  71. data/spec/dummy_rails_3/config/routes.rb +5 -0
  72. data/spec/dummy_rails_3/db/seeds.rb +7 -0
  73. data/spec/{dummy → dummy_rails_3_plus}/README.rdoc +0 -0
  74. data/spec/{dummy → dummy_rails_3_plus}/Rakefile +0 -0
  75. data/spec/{dummy → dummy_rails_3_plus}/app/assets/javascripts/application.js +0 -0
  76. data/spec/{dummy → dummy_rails_3_plus}/app/assets/stylesheets/application.css +0 -0
  77. data/spec/dummy_rails_3_plus/app/controllers/application_controller.rb +7 -0
  78. data/spec/{dummy → dummy_rails_3_plus}/app/controllers/break_controller.rb +0 -0
  79. data/spec/dummy_rails_3_plus/app/controllers/welcome_controller.rb +13 -0
  80. data/spec/dummy_rails_3_plus/app/helpers/application_helper.rb +2 -0
  81. data/spec/{dummy/log → dummy_rails_3_plus/app/mailers}/.gitkeep +0 -0
  82. data/spec/{dummy/public/favicon.ico → dummy_rails_3_plus/app/models/.gitkeep} +0 -0
  83. data/spec/{dummy → dummy_rails_3_plus}/app/models/current_user.rb +0 -0
  84. data/spec/{dummy → dummy_rails_3_plus}/app/views/layouts/application.html.erb +0 -0
  85. data/spec/dummy_rails_3_plus/config.ru +4 -0
  86. data/spec/{dummy → dummy_rails_3_plus}/config/application.rb +3 -3
  87. data/spec/{dummy → dummy_rails_3_plus}/config/boot.rb +0 -0
  88. data/spec/dummy_rails_3_plus/config/environment.rb +5 -0
  89. data/spec/{dummy → dummy_rails_3_plus}/config/environments/development.rb +0 -0
  90. data/spec/{dummy → dummy_rails_3_plus}/config/environments/production.rb +0 -0
  91. data/spec/{dummy → dummy_rails_3_plus}/config/environments/test.rb +2 -2
  92. data/spec/dummy_rails_3_plus/config/initializers/backtrace_silencers.rb +7 -0
  93. data/spec/dummy_rails_3_plus/config/initializers/crashlog.rb +7 -0
  94. data/spec/{dummy → dummy_rails_3_plus}/config/initializers/inflections.rb +0 -0
  95. data/spec/dummy_rails_3_plus/config/initializers/mime_types.rb +5 -0
  96. data/spec/{dummy → dummy_rails_3_plus}/config/initializers/secret_token.rb +0 -0
  97. data/spec/dummy_rails_3_plus/config/initializers/session_store.rb +8 -0
  98. data/spec/{dummy → dummy_rails_3_plus}/config/initializers/wrap_parameters.rb +0 -0
  99. data/spec/dummy_rails_3_plus/config/routes.rb +5 -0
  100. data/spec/dummy_rails_3_plus/lib/assets/.gitkeep +0 -0
  101. data/spec/dummy_rails_3_plus/log/.gitkeep +0 -0
  102. data/spec/dummy_rails_3_plus/log/development.log +13209 -0
  103. data/spec/{dummy → dummy_rails_3_plus}/public/404.html +0 -0
  104. data/spec/{dummy → dummy_rails_3_plus}/public/422.html +0 -0
  105. data/spec/{dummy → dummy_rails_3_plus}/public/500.html +0 -0
  106. data/spec/dummy_rails_3_plus/public/favicon.ico +0 -0
  107. data/spec/{dummy → dummy_rails_3_plus}/script/rails +0 -0
  108. data/spec/rails/action_controller_spec.rb +85 -0
  109. data/spec/rails/rails_2_controller_spec.rb +87 -0
  110. data/spec/rails_spec_helper.rb +42 -0
  111. data/spec/requests/rails_controller_rescue_spec.rb +6 -6
  112. data/spec/spec_helper.rb +0 -4
  113. metadata +204 -87
  114. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  115. data/spec/dummy/config/database.yml +0 -44
  116. data/spec/dummy/config/routes.rb +0 -7
@@ -0,0 +1,7 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+ require 'rake'
6
+
7
+ Dummy::Application.load_tasks
@@ -0,0 +1,7 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+
4
+ def current_user
5
+ User.new({:id => 1, :email => 'user@example.com', :full_name => "Johnny Quid"})
6
+ end
7
+ end
@@ -0,0 +1,14 @@
1
+ class WelcomeController < ApplicationController
2
+
3
+ layout :application
4
+
5
+ def index
6
+ render :text => "Welcome"
7
+ end
8
+
9
+ def broken
10
+ header('X-Custom-Header', "BEER ME")
11
+ @projects = []
12
+ raise StandardError, "Broken route"
13
+ end
14
+ end
@@ -0,0 +1,3 @@
1
+ class User < OpenStruct
2
+
3
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag :all %>
6
+ <%= javascript_include_tag :defaults %>
7
+ <%= csrf_meta_tag %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
File without changes
@@ -0,0 +1,52 @@
1
+ ENV['RAILS_ENV'] = 'production'
2
+
3
+ # require File.expand_path('../boot', __FILE__)
4
+
5
+ # Pick the frameworks you want:
6
+ # require "active_record/railtie"
7
+ require "action_controller/railtie"
8
+ # require "action_mailer/railtie"
9
+ # require "active_resource/railtie"
10
+ # require "sprockets/railtie"
11
+ # require "rails/test_unit/railtie"
12
+
13
+ # If you have a Gemfile, require the gems listed there, including any gems
14
+ # you've limited to :test, :development, or :production.
15
+ # Bundler.require(:default, Rails.env) if defined?(Bundler)
16
+
17
+ module Dummy
18
+ class Application < Rails::Application
19
+ # Settings in config/environments/* take precedence over those specified here.
20
+ # Application configuration should go into files in config/initializers
21
+ # -- all .rb files in that directory are automatically loaded.
22
+
23
+ # Custom directories with classes and modules you want to be autoloadable.
24
+ # config.autoload_paths += %W(#{config.root}/extras)
25
+
26
+ # Only load the plugins named here, in the order given (default is alphabetical).
27
+ # :all can be used as a placeholder for all plugins not explicitly named.
28
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
29
+
30
+ # Activate observers that should always be running.
31
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
32
+
33
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
34
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
35
+ # config.time_zone = 'Central Time (US & Canada)'
36
+
37
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
38
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
39
+ # config.i18n.default_locale = :de
40
+
41
+ # JavaScript files you want as :defaults (application.js is always included).
42
+ # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
43
+
44
+ # Configure the default encoding used in templates for Ruby 1.9.
45
+ config.encoding = "utf-8"
46
+
47
+ # Configure sensitive parameters which will be filtered from the log file.
48
+ config.filter_parameters += [:password]
49
+ end
50
+ end
51
+
52
+ require 'crash_log/railtie'
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
File without changes
@@ -0,0 +1,26 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the webserver when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_view.debug_rjs = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Don't care if the mailer can't send
18
+ # config.action_mailer.raise_delivery_errors = false
19
+
20
+ # Print deprecation notices to the Rails logger
21
+ config.active_support.deprecation = :log
22
+
23
+ # Only use best-standards-support built into browsers
24
+ config.action_dispatch.best_standards_support = :builtin
25
+ end
26
+
@@ -0,0 +1,49 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The production environment is meant for finished, "live" apps.
5
+ # Code is not reloaded between requests
6
+ config.cache_classes = true
7
+
8
+ # Full error reports are disabled and caching is turned on
9
+ config.consider_all_requests_local = false
10
+ config.action_controller.perform_caching = true
11
+
12
+ # Specifies the header that your server uses for sending files
13
+ config.action_dispatch.x_sendfile_header = "X-Sendfile"
14
+
15
+ # For nginx:
16
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
17
+
18
+ # If you have no front-end server that supports something like X-Sendfile,
19
+ # just comment this out and Rails will serve the files
20
+
21
+ # See everything in the log (default is :info)
22
+ # config.log_level = :debug
23
+
24
+ # Use a different logger for distributed setups
25
+ # config.logger = SyslogLogger.new
26
+
27
+ # Use a different cache store in production
28
+ # config.cache_store = :mem_cache_store
29
+
30
+ # Disable Rails's static asset server
31
+ # In production, Apache or nginx will already do this
32
+ config.serve_static_assets = false
33
+
34
+ # Enable serving of images, stylesheets, and javascripts from an asset server
35
+ # config.action_controller.asset_host = "http://assets.example.com"
36
+
37
+ # Disable delivery errors, bad email addresses will be ignored
38
+ # config.action_mailer.raise_delivery_errors = false
39
+
40
+ # Enable threaded mode
41
+ # config.threadsafe!
42
+
43
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
44
+ # the I18n.default_locale when a translation can not be found)
45
+ config.i18n.fallbacks = true
46
+
47
+ # Send deprecation notices to registered listeners
48
+ config.active_support.deprecation = :notify
49
+ end
@@ -0,0 +1,35 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Log error messages when you accidentally call methods on nil.
11
+ config.whiny_nils = true
12
+
13
+ # Show full error reports and disable caching
14
+ config.consider_all_requests_local = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Raise exceptions instead of rendering exception templates
18
+ config.action_dispatch.show_exceptions = false
19
+
20
+ # Disable request forgery protection in test environment
21
+ config.action_controller.allow_forgery_protection = false
22
+
23
+ # Tell Action Mailer not to deliver emails to the real world.
24
+ # The :test delivery method accumulates sent emails in the
25
+ # ActionMailer::Base.deliveries array.
26
+ # config.action_mailer.delivery_method = :test
27
+
28
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
29
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
30
+ # like if you have constraints or database-specific column types
31
+ # config.active_record.schema_format = :sql
32
+
33
+ # Print deprecation notices to the stderr
34
+ config.active_support.deprecation = :stderr
35
+ end
@@ -0,0 +1,8 @@
1
+ require 'crashlog'
2
+
3
+ CrashLog.configure do |config|
4
+ config.api_key = "API_KEY"
5
+ config.secret = "SECRET"
6
+ config.dry_run = true
7
+ config.release_stages << config.stage
8
+ end
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = '889a0575509886af265a4a9c1525907b3a07705cfb9eda38eb567350f6898646af865e06e3ee20f3f87541bc62852ed15bb220e96274a47b38b21f2000eba868'
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,5 @@
1
+ Dummy::Application.routes.draw do
2
+ get 'broken' => 'welcome#broken'
3
+
4
+ root :to => "welcome#index"
5
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
+ # Mayor.create(:name => 'Daley', :city => cities.first)
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+
4
+ def current_user
5
+ User.new({:id => 1, :email => 'user@example.com', :full_name => "Johnny Quid"})
6
+ end
7
+ end
@@ -0,0 +1,13 @@
1
+ class WelcomeController < ApplicationController
2
+
3
+ layout :application
4
+
5
+ def index
6
+ render :text => "Welcome"
7
+ end
8
+
9
+ def broken
10
+ @projects = []
11
+ raise StandardError, "Broken route"
12
+ end
13
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -1,4 +1,4 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ # require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  # require 'rails/all'
4
4
  require "action_controller/railtie"
@@ -6,7 +6,7 @@ require "action_controller/railtie"
6
6
  # require "active_resource/railtie"
7
7
  require "sprockets/railtie"
8
8
 
9
- Bundler.require(*Rails.groups)
9
+ # Bundler.require(*Rails.groups)
10
10
 
11
11
  module Dummy
12
12
  class Application < Rails::Application
@@ -56,4 +56,4 @@ module Dummy
56
56
  config.assets.version = '1.0'
57
57
  end
58
58
  end
59
-
59
+ require 'crash_log/railtie'
File without changes
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -15,11 +15,11 @@ Dummy::Application.configure do
15
15
  config.whiny_nils = true
16
16
 
17
17
  # Show full error reports and disable caching
18
- config.consider_all_requests_local = false
18
+ config.consider_all_requests_local = true
19
19
  config.action_controller.perform_caching = false
20
20
 
21
21
  # Raise exceptions instead of rendering exception templates
22
- config.action_dispatch.show_exceptions = false
22
+ config.action_dispatch.show_exceptions = true
23
23
 
24
24
  # Disable request forgery protection in test environment
25
25
  config.action_controller.allow_forgery_protection = false
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,7 @@
1
+ require 'crashlog'
2
+
3
+ CrashLog.configure do |config|
4
+ config.api_key = "API_KEY"
5
+ config.secret = "SECRET"
6
+ config.dry_run = true
7
+ end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone