bugsnag 6.11.1 → 6.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/CONTRIBUTING.md +6 -1
- data/Gemfile +18 -11
- data/README.md +3 -3
- data/UPGRADING.md +22 -0
- data/VERSION +1 -1
- data/features/fixtures/docker-compose.yml +37 -0
- data/features/fixtures/rails3/app/Gemfile +1 -1
- data/features/fixtures/rails4/app/Gemfile +1 -1
- data/features/fixtures/rails5/app/Gemfile +1 -1
- data/features/fixtures/rails6/.dockerignore +1 -0
- data/features/fixtures/rails6/Dockerfile +26 -0
- data/features/fixtures/rails6/app/.browserslistrc +1 -0
- data/features/fixtures/rails6/app/.gitignore +35 -0
- data/features/fixtures/rails6/app/.ruby-version +1 -0
- data/features/fixtures/rails6/app/Gemfile +57 -0
- data/features/fixtures/rails6/app/README.md +24 -0
- data/features/fixtures/rails6/app/Rakefile +6 -0
- data/features/fixtures/rails6/app/app/assets/config/manifest.js +2 -0
- data/features/fixtures/rails6/app/app/assets/images/.keep +0 -0
- data/features/fixtures/rails6/app/app/assets/stylesheets/application.css +15 -0
- data/features/fixtures/rails6/app/app/channels/application_cable/channel.rb +4 -0
- data/features/fixtures/rails6/app/app/channels/application_cable/connection.rb +4 -0
- data/features/fixtures/rails6/app/app/controllers/api_key_controller.rb +16 -0
- data/features/fixtures/rails6/app/app/controllers/app_type_controller.rb +16 -0
- data/features/fixtures/rails6/app/app/controllers/app_version_controller.rb +21 -0
- data/features/fixtures/rails6/app/app/controllers/application_controller.rb +7 -0
- data/features/fixtures/rails6/app/app/controllers/auto_notify_controller.rb +27 -0
- data/features/fixtures/rails6/app/app/controllers/before_notify_controller.rb +40 -0
- data/features/fixtures/rails6/app/app/controllers/breadcrumbs_controller.rb +24 -0
- data/features/fixtures/rails6/app/app/controllers/clearance_controller.rb +33 -0
- data/features/fixtures/rails6/app/app/controllers/concerns/.keep +0 -0
- data/features/fixtures/rails6/app/app/controllers/handled_controller.rb +22 -0
- data/features/fixtures/rails6/app/app/controllers/ignore_classes_controller.rb +19 -0
- data/features/fixtures/rails6/app/app/controllers/metadata_filters_controller.rb +12 -0
- data/features/fixtures/rails6/app/app/controllers/project_root_controller.rb +21 -0
- data/features/fixtures/rails6/app/app/controllers/release_stage_controller.rb +16 -0
- data/features/fixtures/rails6/app/app/controllers/send_code_controller.rb +16 -0
- data/features/fixtures/rails6/app/app/controllers/send_environment_controller.rb +8 -0
- data/features/fixtures/rails6/app/app/controllers/session_tracking_controller.rb +20 -0
- data/features/fixtures/rails6/app/app/controllers/unhandled_controller.rb +7 -0
- data/features/fixtures/rails6/app/app/helpers/application_helper.rb +2 -0
- data/features/fixtures/rails6/app/app/javascript/channels/consumer.js +6 -0
- data/features/fixtures/rails6/app/app/javascript/channels/index.js +5 -0
- data/features/fixtures/rails6/app/app/javascript/packs/application.js +9 -0
- data/features/fixtures/rails6/app/app/jobs/application_job.rb +7 -0
- data/features/fixtures/rails6/app/app/jobs/notify_job.rb +5 -0
- data/features/fixtures/rails6/app/app/mailers/application_mailer.rb +4 -0
- data/features/fixtures/rails6/app/app/models/application_record.rb +3 -0
- data/features/fixtures/rails6/app/app/models/concerns/.keep +0 -0
- data/features/fixtures/rails6/app/app/models/user.rb +3 -0
- data/features/fixtures/rails6/app/app/views/layouts/application.html.erb +15 -0
- data/features/fixtures/rails6/app/app/views/layouts/mailer.html.erb +13 -0
- data/features/fixtures/rails6/app/app/views/layouts/mailer.text.erb +1 -0
- data/features/fixtures/rails6/app/babel.config.js +70 -0
- data/features/fixtures/rails6/app/config.ru +5 -0
- data/features/fixtures/rails6/app/config/application.rb +19 -0
- data/features/fixtures/rails6/app/config/boot.rb +4 -0
- data/features/fixtures/rails6/app/config/cable.yml +13 -0
- data/features/fixtures/rails6/app/config/credentials.yml.enc +1 -0
- data/features/fixtures/rails6/app/config/database.yml +29 -0
- data/features/fixtures/rails6/app/config/environment.rb +5 -0
- data/features/fixtures/rails6/app/config/environments/development.rb +62 -0
- data/features/fixtures/rails6/app/config/environments/production.rb +112 -0
- data/features/fixtures/rails6/app/config/environments/rails_env.rb +55 -0
- data/features/fixtures/rails6/app/config/environments/test.rb +47 -0
- data/features/fixtures/rails6/app/config/initializers/application_controller_renderer.rb +8 -0
- data/features/fixtures/rails6/app/config/initializers/assets.rb +14 -0
- data/features/fixtures/rails6/app/config/initializers/backtrace_silencers.rb +7 -0
- data/features/fixtures/rails6/app/config/initializers/bugsnag.rb +20 -0
- data/features/fixtures/rails6/app/config/initializers/content_security_policy.rb +27 -0
- data/features/fixtures/rails6/app/config/initializers/cookies_serializer.rb +5 -0
- data/features/fixtures/rails6/app/config/initializers/filter_parameter_logging.rb +5 -0
- data/features/fixtures/rails6/app/config/initializers/inflections.rb +16 -0
- data/features/fixtures/rails6/app/config/initializers/mime_types.rb +4 -0
- data/features/fixtures/rails6/app/config/initializers/wrap_parameters.rb +14 -0
- data/features/fixtures/rails6/app/config/locales/en.yml +33 -0
- data/features/fixtures/rails6/app/config/puma.rb +35 -0
- data/features/fixtures/rails6/app/config/routes.rb +58 -0
- data/features/fixtures/rails6/app/config/secrets.yml +25 -0
- data/features/fixtures/rails6/app/config/spring.rb +6 -0
- data/features/fixtures/rails6/app/config/storage.yml +34 -0
- data/features/fixtures/rails6/app/config/webpack/development.js +5 -0
- data/features/fixtures/rails6/app/config/webpack/environment.js +3 -0
- data/features/fixtures/rails6/app/config/webpack/production.js +5 -0
- data/features/fixtures/rails6/app/config/webpack/rails_env.js +5 -0
- data/features/fixtures/rails6/app/config/webpack/test.js +5 -0
- data/features/fixtures/rails6/app/config/webpacker.yml +121 -0
- data/features/fixtures/rails6/app/db/migrate/20180426095545_create_users.rb +17 -0
- data/features/fixtures/rails6/app/db/schema.rb +29 -0
- data/features/fixtures/rails6/app/db/seeds.rb +7 -0
- data/features/fixtures/rails6/app/lib/assets/.keep +0 -0
- data/features/fixtures/rails6/app/lib/tasks/.keep +0 -0
- data/features/fixtures/rails6/app/log/.keep +0 -0
- data/features/fixtures/rails6/app/package.json +15 -0
- data/features/fixtures/rails6/app/postcss.config.js +12 -0
- data/features/fixtures/rails6/app/public/404.html +67 -0
- data/features/fixtures/rails6/app/public/422.html +67 -0
- data/features/fixtures/rails6/app/public/500.html +66 -0
- data/features/fixtures/rails6/app/public/apple-touch-icon-precomposed.png +0 -0
- data/features/fixtures/rails6/app/public/apple-touch-icon.png +0 -0
- data/features/fixtures/rails6/app/public/favicon.ico +0 -0
- data/features/fixtures/rails6/app/public/robots.txt +1 -0
- data/features/fixtures/rails6/app/storage/.keep +0 -0
- data/features/fixtures/rails6/app/test/application_system_test_case.rb +5 -0
- data/features/fixtures/rails6/app/test/channels/application_cable/connection_test.rb +11 -0
- data/features/fixtures/rails6/app/test/controllers/.keep +0 -0
- data/features/fixtures/rails6/app/test/fixtures/.keep +0 -0
- data/features/fixtures/rails6/app/test/fixtures/files/.keep +0 -0
- data/features/fixtures/rails6/app/test/helpers/.keep +0 -0
- data/features/fixtures/rails6/app/test/integration/.keep +0 -0
- data/features/fixtures/rails6/app/test/mailers/.keep +0 -0
- data/features/fixtures/rails6/app/test/models/.keep +0 -0
- data/features/fixtures/rails6/app/test/system/.keep +0 -0
- data/features/fixtures/rails6/app/test/test_helper.rb +13 -0
- data/features/fixtures/rails6/app/tmp/.keep +0 -0
- data/features/fixtures/rails6/app/yarn.lock +6082 -0
- data/features/rails_features/api_key.feature +3 -1
- data/features/rails_features/app_type.feature +3 -1
- data/features/rails_features/app_version.feature +4 -1
- data/features/rails_features/auto_capture_sessions.feature +5 -1
- data/features/rails_features/auto_notify.feature +5 -1
- data/features/rails_features/before_notify.feature +3 -0
- data/features/rails_features/breadcrumbs.feature +5 -0
- data/features/rails_features/handled.feature +3 -0
- data/features/rails_features/ignore_classes.feature +3 -1
- data/features/rails_features/meta_data_filters.feature +1 -0
- data/features/rails_features/project_root.feature +3 -0
- data/features/rails_features/release_stage.feature +4 -1
- data/features/rails_features/send_code.feature +2 -0
- data/features/rails_features/send_environment.feature +2 -1
- data/features/rails_features/unhandled.feature +2 -1
- data/features/rails_features/user_info.feature +3 -1
- data/lib/bugsnag/breadcrumbs/validator.rb +2 -2
- data/lib/bugsnag/configuration.rb +4 -0
- data/lib/bugsnag/integrations/que.rb +16 -11
- data/lib/bugsnag/integrations/rack.rb +4 -1
- data/lib/bugsnag/integrations/railtie.rb +1 -0
- data/lib/bugsnag/integrations/rake.rb +58 -26
- data/lib/bugsnag/integrations/resque.rb +6 -1
- data/lib/bugsnag/integrations/sidekiq.rb +1 -0
- data/lib/bugsnag/middleware/rails3_request.rb +0 -7
- data/lib/bugsnag/report.rb +4 -1
- data/lib/bugsnag/session_tracker.rb +2 -1
- data/spec/breadcrumbs/validator_spec.rb +1 -0
- data/spec/configuration_spec.rb +31 -0
- data/spec/fixtures/tasks/Rakefile +12 -0
- data/spec/integrations/logger_spec.rb +4 -8
- data/spec/integrations/que_spec.rb +35 -1
- data/spec/integrations/rack_spec.rb +23 -1
- data/spec/integrations/rake_spec.rb +11 -12
- data/spec/integrations/resque_spec.rb +8 -1
- data/spec/integrations/sidekiq_spec.rb +2 -0
- data/spec/report_spec.rb +13 -1
- data/spec/session_tracker_spec.rb +1 -0
- metadata +110 -3
@@ -31,6 +31,7 @@ Scenario Outline: Setting api_key in environment variable works
|
|
31
31
|
| 2.4 | 5 |
|
32
32
|
| 2.5 | 3 |
|
33
33
|
| 2.5 | 5 |
|
34
|
+
| 2.5 | 6 |
|
34
35
|
|
35
36
|
Scenario Outline: Changing api_key after initializer works
|
36
37
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -56,4 +57,5 @@ Scenario Outline: Setting api_key in environment variable works
|
|
56
57
|
| 2.4 | 3 |
|
57
58
|
| 2.4 | 5 |
|
58
59
|
| 2.5 | 3 |
|
59
|
-
| 2.5 | 5 |
|
60
|
+
| 2.5 | 5 |
|
61
|
+
| 2.5 | 6 |
|
@@ -35,6 +35,7 @@ Scenario Outline: Setting app_type in initializer works
|
|
35
35
|
| 2.4 | 5 |
|
36
36
|
| 2.5 | 3 |
|
37
37
|
| 2.5 | 5 |
|
38
|
+
| 2.5 | 6 |
|
38
39
|
|
39
40
|
Scenario Outline: Changing app_type after initializer works
|
40
41
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -64,4 +65,5 @@ Scenario Outline: Changing app_type after initializer works
|
|
64
65
|
| 2.4 | 3 |
|
65
66
|
| 2.4 | 5 |
|
66
67
|
| 2.5 | 3 |
|
67
|
-
| 2.5 | 5 |
|
68
|
+
| 2.5 | 5 |
|
69
|
+
| 2.5 | 6 |
|
@@ -29,6 +29,7 @@ Scenario Outline: App_version is nil by default
|
|
29
29
|
| 2.4 | 5 |
|
30
30
|
| 2.5 | 3 |
|
31
31
|
| 2.5 | 5 |
|
32
|
+
| 2.5 | 6 |
|
32
33
|
|
33
34
|
Scenario Outline: Setting app_version in initializer works
|
34
35
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -56,6 +57,7 @@ Scenario Outline: Setting app_version in initializer works
|
|
56
57
|
| 2.4 | 5 |
|
57
58
|
| 2.5 | 3 |
|
58
59
|
| 2.5 | 5 |
|
60
|
+
| 2.5 | 6 |
|
59
61
|
|
60
62
|
Scenario Outline: Setting app_version after initializer works
|
61
63
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -81,4 +83,5 @@ Scenario Outline: Setting app_version after initializer works
|
|
81
83
|
| 2.4 | 3 |
|
82
84
|
| 2.4 | 5 |
|
83
85
|
| 2.5 | 3 |
|
84
|
-
| 2.5 | 5 |
|
86
|
+
| 2.5 | 5 |
|
87
|
+
| 2.5 | 6 |
|
@@ -31,6 +31,7 @@ Scenario Outline: Auto_capture_sessions defaults to true
|
|
31
31
|
| 2.4 | 5 |
|
32
32
|
| 2.5 | 3 |
|
33
33
|
| 2.5 | 5 |
|
34
|
+
| 2.5 | 6 |
|
34
35
|
|
35
36
|
Scenario Outline: Auto_capture_sessions can be set to false in the initializer
|
36
37
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -54,6 +55,7 @@ Scenario Outline: Auto_capture_sessions can be set to false in the initializer
|
|
54
55
|
| 2.4 | 5 |
|
55
56
|
| 2.5 | 3 |
|
56
57
|
| 2.5 | 5 |
|
58
|
+
| 2.5 | 6 |
|
57
59
|
|
58
60
|
Scenario Outline: Manual sessions are still sent if Auto_capture_sessions is false
|
59
61
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -81,6 +83,7 @@ Scenario Outline: Manual sessions are still sent if Auto_capture_sessions is fal
|
|
81
83
|
| 2.4 | 5 |
|
82
84
|
| 2.5 | 3 |
|
83
85
|
| 2.5 | 5 |
|
86
|
+
| 2.5 | 6 |
|
84
87
|
|
85
88
|
Scenario Outline: 100 session calls results in 100 sessions
|
86
89
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -108,4 +111,5 @@ Scenario Outline: 100 session calls results in 100 sessions
|
|
108
111
|
| 2.4 | 3 |
|
109
112
|
| 2.4 | 5 |
|
110
113
|
| 2.5 | 3 |
|
111
|
-
| 2.5 | 5 |
|
114
|
+
| 2.5 | 5 |
|
115
|
+
| 2.5 | 6 |
|
@@ -27,6 +27,7 @@ Scenario Outline: Auto_notify set to false in the initializer prevents unhandled
|
|
27
27
|
| 2.4 | 5 |
|
28
28
|
| 2.5 | 3 |
|
29
29
|
| 2.5 | 5 |
|
30
|
+
| 2.5 | 6 |
|
30
31
|
|
31
32
|
Scenario Outline: Auto_notify set to false in the initializer still sends handled errors
|
32
33
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -59,6 +60,7 @@ Scenario Outline: Auto_notify set to false in the initializer still sends handle
|
|
59
60
|
| 2.4 | 5 |
|
60
61
|
| 2.5 | 3 |
|
61
62
|
| 2.5 | 5 |
|
63
|
+
| 2.5 | 6 |
|
62
64
|
|
63
65
|
Scenario Outline: Auto_notify set to false after the initializer prevents unhandled error sending
|
64
66
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -81,6 +83,7 @@ Scenario Outline: Auto_notify set to false after the initializer prevents unhand
|
|
81
83
|
| 2.4 | 5 |
|
82
84
|
| 2.5 | 3 |
|
83
85
|
| 2.5 | 5 |
|
86
|
+
| 2.5 | 6 |
|
84
87
|
|
85
88
|
Scenario Outline: Auto_notify set to false after the initializer still sends handled errors
|
86
89
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -111,4 +114,5 @@ Scenario Outline: Auto_notify set to false after the initializer still sends han
|
|
111
114
|
| 2.4 | 3 |
|
112
115
|
| 2.4 | 5 |
|
113
116
|
| 2.5 | 3 |
|
114
|
-
| 2.5 | 5 |
|
117
|
+
| 2.5 | 5 |
|
118
|
+
| 2.5 | 6 |
|
@@ -37,6 +37,7 @@ Scenario Outline: Rails before_notify controller method works on handled errors
|
|
37
37
|
| 2.4 | 5 |
|
38
38
|
| 2.5 | 3 |
|
39
39
|
| 2.5 | 5 |
|
40
|
+
| 2.5 | 6 |
|
40
41
|
|
41
42
|
Scenario Outline: Rails before_notify controller method works on unhandled errors
|
42
43
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -70,6 +71,7 @@ Scenario Outline: Rails before_notify controller method works on unhandled error
|
|
70
71
|
| 2.4 | 5 |
|
71
72
|
| 2.5 | 3 |
|
72
73
|
| 2.5 | 5 |
|
74
|
+
| 2.5 | 6 |
|
73
75
|
|
74
76
|
Scenario Outline: Inline block on handled errors is called
|
75
77
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -103,4 +105,5 @@ Scenario Outline: Inline block on handled errors is called
|
|
103
105
|
| 2.4 | 5 |
|
104
106
|
| 2.5 | 3 |
|
105
107
|
| 2.5 | 5 |
|
108
|
+
| 2.5 | 6 |
|
106
109
|
|
@@ -37,6 +37,7 @@ Scenario Outline: Request breadcrumb
|
|
37
37
|
| 2.4 | 5 |
|
38
38
|
| 2.5 | 3 |
|
39
39
|
| 2.5 | 5 |
|
40
|
+
| 2.5 | 6 |
|
40
41
|
|
41
42
|
Scenario Outline: SQL Breadcrumb without bindings
|
42
43
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -65,6 +66,7 @@ Scenario Outline: SQL Breadcrumb without bindings
|
|
65
66
|
| 2.3 | 4 |
|
66
67
|
| 2.4 | 3 |
|
67
68
|
| 2.5 | 3 |
|
69
|
+
| 2.5 | 6 |
|
68
70
|
|
69
71
|
Scenario Outline: SQL Breadcrumb with bindings
|
70
72
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -90,6 +92,7 @@ Scenario Outline: SQL Breadcrumb with bindings
|
|
90
92
|
| 2.3 | 5 |
|
91
93
|
| 2.4 | 5 |
|
92
94
|
| 2.5 | 5 |
|
95
|
+
| 2.5 | 6 |
|
93
96
|
|
94
97
|
Scenario Outline: Active job breadcrumb
|
95
98
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -113,6 +116,7 @@ Scenario Outline: Active job breadcrumb
|
|
113
116
|
| 2.3 | 5 |
|
114
117
|
| 2.4 | 5 |
|
115
118
|
| 2.5 | 5 |
|
119
|
+
| 2.5 | 6 |
|
116
120
|
|
117
121
|
Scenario Outline: Cache read
|
118
122
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -133,3 +137,4 @@ Scenario Outline: Cache read
|
|
133
137
|
| 2.3 | 5 |
|
134
138
|
| 2.4 | 5 |
|
135
139
|
| 2.5 | 5 |
|
140
|
+
| 2.5 | 6 |
|
@@ -37,6 +37,7 @@ Scenario Outline: Unhandled RuntimeError
|
|
37
37
|
| 2.4 | 5 |
|
38
38
|
| 2.5 | 3 |
|
39
39
|
| 2.5 | 5 |
|
40
|
+
| 2.5 | 6 |
|
40
41
|
|
41
42
|
Scenario Outline: Thrown handled NameError
|
42
43
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -70,6 +71,7 @@ Scenario Outline: Thrown handled NameError
|
|
70
71
|
| 2.4 | 5 |
|
71
72
|
| 2.5 | 3 |
|
72
73
|
| 2.5 | 5 |
|
74
|
+
| 2.5 | 6 |
|
73
75
|
|
74
76
|
Scenario Outline: Manual string notify
|
75
77
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -101,3 +103,4 @@ Scenario Outline: Manual string notify
|
|
101
103
|
| 2.4 | 5 |
|
102
104
|
| 2.5 | 3 |
|
103
105
|
| 2.5 | 5 |
|
106
|
+
| 2.5 | 6 |
|
@@ -27,6 +27,7 @@ Scenario Outline: Ignore_classes can be set to a different value in initializer
|
|
27
27
|
| 2.4 | 5 |
|
28
28
|
| 2.5 | 3 |
|
29
29
|
| 2.5 | 5 |
|
30
|
+
| 2.5 | 6 |
|
30
31
|
|
31
32
|
Scenario Outline: Ignore_classes can be set to a different value after initializer
|
32
33
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -48,4 +49,5 @@ Scenario Outline: Ignore_classes can be set to a different value after initializ
|
|
48
49
|
| 2.4 | 3 |
|
49
50
|
| 2.4 | 5 |
|
50
51
|
| 2.5 | 3 |
|
51
|
-
| 2.5 | 5 |
|
52
|
+
| 2.5 | 5 |
|
53
|
+
| 2.5 | 6 |
|
@@ -34,6 +34,7 @@ Scenario Outline: Project_root should default to Rails.root
|
|
34
34
|
| 2.4 | 5 |
|
35
35
|
| 2.5 | 3 |
|
36
36
|
| 2.5 | 5 |
|
37
|
+
| 2.5 | 6 |
|
37
38
|
|
38
39
|
Scenario Outline: Project_root can be set in an initializer
|
39
40
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -65,6 +66,7 @@ Scenario Outline: Project_root can be set in an initializer
|
|
65
66
|
| 2.4 | 5 |
|
66
67
|
| 2.5 | 3 |
|
67
68
|
| 2.5 | 5 |
|
69
|
+
| 2.5 | 6 |
|
68
70
|
|
69
71
|
Scenario Outline: Project_root can be set after an initializer
|
70
72
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -95,3 +97,4 @@ Scenario Outline: Project_root can be set after an initializer
|
|
95
97
|
| 2.4 | 5 |
|
96
98
|
| 2.5 | 3 |
|
97
99
|
| 2.5 | 5 |
|
100
|
+
| 2.5 | 6 |
|
@@ -31,6 +31,7 @@ Scenario Outline: Release_stage should default to RAILS_ENV
|
|
31
31
|
| 2.4 | 5 |
|
32
32
|
| 2.5 | 3 |
|
33
33
|
| 2.5 | 5 |
|
34
|
+
| 2.5 | 6 |
|
34
35
|
|
35
36
|
Scenario Outline: Release_stage can be set in an initializer
|
36
37
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -58,6 +59,7 @@ Scenario Outline: Release_stage can be set in an initializer
|
|
58
59
|
| 2.4 | 5 |
|
59
60
|
| 2.5 | 3 |
|
60
61
|
| 2.5 | 5 |
|
62
|
+
| 2.5 | 6 |
|
61
63
|
|
62
64
|
Scenario Outline: Release_stage can be set after an initializer
|
63
65
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -83,4 +85,5 @@ Scenario Outline: Release_stage can be set after an initializer
|
|
83
85
|
| 2.4 | 3 |
|
84
86
|
| 2.4 | 5 |
|
85
87
|
| 2.5 | 3 |
|
86
|
-
| 2.5 | 5 |
|
88
|
+
| 2.5 | 5 |
|
89
|
+
| 2.5 | 6 |
|
@@ -30,6 +30,7 @@ Scenario Outline: Send_code can be updated in an initializer
|
|
30
30
|
| 2.4 | 5 |
|
31
31
|
| 2.5 | 3 |
|
32
32
|
| 2.5 | 5 |
|
33
|
+
| 2.5 | 6 |
|
33
34
|
|
34
35
|
Scenario Outline: Send_code can be updated after an initializer
|
35
36
|
Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
|
@@ -56,3 +57,4 @@ Scenario Outline: Send_code can be updated after an initializer
|
|
56
57
|
| 2.4 | 5 |
|
57
58
|
| 2.5 | 3 |
|
58
59
|
| 2.5 | 5 |
|
60
|
+
| 2.5 | 6 |
|
@@ -49,11 +49,11 @@ module Bugsnag::Breadcrumbs
|
|
49
49
|
##
|
50
50
|
# Tests whether the meta_data types are non-complex objects.
|
51
51
|
#
|
52
|
-
# Acceptable types are String, Numeric, TrueClass, FalseClass, and nil.
|
52
|
+
# Acceptable types are String, Symbol, Numeric, TrueClass, FalseClass, and nil.
|
53
53
|
#
|
54
54
|
# @param value [Object] the object to be type checked
|
55
55
|
def valid_meta_data_type?(value)
|
56
|
-
value.nil? || value.is_a?(String) || value.is_a?(Numeric) || value.is_a?(FalseClass) || value.is_a?(TrueClass)
|
56
|
+
value.nil? || value.is_a?(String) || value.is_a?(Symbol) || value.is_a?(Numeric) || value.is_a?(FalseClass) || value.is_a?(TrueClass)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -34,6 +34,7 @@ module Bugsnag
|
|
34
34
|
attr_accessor :proxy_password
|
35
35
|
attr_accessor :timeout
|
36
36
|
attr_accessor :hostname
|
37
|
+
attr_accessor :runtime_versions
|
37
38
|
attr_accessor :ignore_classes
|
38
39
|
attr_accessor :auto_capture_sessions
|
39
40
|
attr_accessor :track_sessions
|
@@ -93,6 +94,9 @@ module Bugsnag
|
|
93
94
|
self.send_code = true
|
94
95
|
self.meta_data_filters = Set.new(DEFAULT_META_DATA_FILTERS)
|
95
96
|
self.hostname = default_hostname
|
97
|
+
self.runtime_versions = {}
|
98
|
+
self.runtime_versions["ruby"] = RUBY_VERSION
|
99
|
+
self.runtime_versions["jruby"] = JRUBY_VERSION if defined?(JRUBY_VERSION)
|
96
100
|
self.timeout = 15
|
97
101
|
self.notify_release_stages = nil
|
98
102
|
self.auto_capture_sessions = true
|
@@ -1,21 +1,24 @@
|
|
1
|
+
require 'que'
|
1
2
|
if defined?(::Que)
|
2
3
|
handler = proc do |error, job|
|
3
4
|
begin
|
4
|
-
job
|
5
|
+
job &&= job.dup # Make sure the original job object is not mutated.
|
5
6
|
|
6
7
|
Bugsnag.notify(error, true) do |report|
|
7
|
-
job
|
8
|
+
if job
|
9
|
+
job[:error_count] += 1
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
# If the job was scheduled using ActiveJob then unwrap the job details for clarity:
|
12
|
+
if job[:job_class] == "ActiveJob::QueueAdapters::QueAdapter::JobWrapper"
|
13
|
+
wrapped_job = job[:args].last
|
14
|
+
wrapped_job = wrapped_job.each_with_object({}) { |(k, v), result| result[k.to_sym] = v } # Symbolize keys
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
16
|
+
# Align key names with keys in `job`
|
17
|
+
wrapped_job[:queue] = wrapped_job.delete(:queue_name)
|
18
|
+
wrapped_job[:args] = wrapped_job.delete(:arguments)
|
17
19
|
|
18
|
-
|
20
|
+
job.merge!(wrapper_job_class: job[:job_class], wrapper_job_id: job[:job_id]).merge!(wrapped_job)
|
21
|
+
end
|
19
22
|
end
|
20
23
|
|
21
24
|
report.add_tab(:job, job)
|
@@ -36,9 +39,11 @@ if defined?(::Que)
|
|
36
39
|
|
37
40
|
if Que.respond_to?(:error_notifier=)
|
38
41
|
Bugsnag.configuration.app_type ||= "que"
|
42
|
+
Bugsnag.configuration.runtime_versions["que"] = ::Que::Version
|
39
43
|
Que.error_notifier = handler
|
40
44
|
elsif Que.respond_to?(:error_handler=)
|
41
45
|
Bugsnag.configuration.app_type ||= "que"
|
46
|
+
Bugsnag.configuration.runtime_versions["que"] = ::Que::Version
|
42
47
|
Que.error_handler = handler
|
43
48
|
end
|
44
|
-
end
|
49
|
+
end
|
@@ -20,7 +20,7 @@ module Bugsnag
|
|
20
20
|
if defined?(settings)
|
21
21
|
config.project_root = settings.root
|
22
22
|
else
|
23
|
-
config.warn("You should set your app's project_root (see https://bugsnag.com/
|
23
|
+
config.warn("You should set your app's project_root (see https://docs.bugsnag.com/platforms/ruby/rails/configuration-options/#project_root).")
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -29,7 +29,10 @@ module Bugsnag
|
|
29
29
|
config.middleware.insert_before(Bugsnag::Middleware::Callbacks, Bugsnag::Middleware::WardenUser) if defined?(Warden)
|
30
30
|
config.middleware.insert_before(Bugsnag::Middleware::Callbacks, Bugsnag::Middleware::ClearanceUser) if defined?(Clearance)
|
31
31
|
|
32
|
+
# Set environment data for payload
|
32
33
|
config.app_type ||= "rack"
|
34
|
+
config.runtime_versions["rack"] = ::Rack.release if defined?(::Rack)
|
35
|
+
config.runtime_versions["sinatra"] = ::Sinatra::VERSION if defined?(::Sinatra)
|
33
36
|
end
|
34
37
|
end
|
35
38
|
|
@@ -28,6 +28,7 @@ module Bugsnag
|
|
28
28
|
config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] || ::Rails.env.to_s
|
29
29
|
config.project_root = ::Rails.root.to_s
|
30
30
|
config.middleware.insert_before Bugsnag::Middleware::Callbacks, Bugsnag::Middleware::Rails3Request
|
31
|
+
config.runtime_versions["rails"] = ::Rails::VERSION::STRING
|
31
32
|
end
|
32
33
|
|
33
34
|
ActiveSupport.on_load(:action_controller) do
|
@@ -2,36 +2,68 @@ require 'bugsnag'
|
|
2
2
|
|
3
3
|
Rake::TaskManager.record_task_metadata = true
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
##
|
12
|
-
# Executes the rake task with Bugsnag setup with contextual data.
|
13
|
-
def execute_with_bugsnag(args=nil)
|
14
|
-
Bugsnag.configuration.app_type ||= "rake"
|
15
|
-
old_task = Bugsnag.configuration.request_data[:bugsnag_running_task]
|
16
|
-
Bugsnag.configuration.set_request_data :bugsnag_running_task, self
|
17
|
-
|
18
|
-
execute_without_bugsnag(args)
|
19
|
-
|
20
|
-
rescue Exception => ex
|
21
|
-
Bugsnag.notify(ex, true) do |report|
|
22
|
-
report.severity = "error"
|
23
|
-
report.severity_reason = {
|
24
|
-
:type => Bugsnag::Report::UNHANDLED_EXCEPTION_MIDDLEWARE,
|
25
|
-
:attributes => FRAMEWORK_ATTRIBUTES
|
5
|
+
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0')
|
6
|
+
module Bugsnag
|
7
|
+
module RakeTask
|
8
|
+
FRAMEWORK_ATTRIBUTES = {
|
9
|
+
framework: 'Rake'
|
26
10
|
}
|
11
|
+
|
12
|
+
# Executes the rake task with Bugsnag setup with contextual data.
|
13
|
+
def execute(args = nil)
|
14
|
+
Bugsnag.configuration.app_type ||= "rake"
|
15
|
+
old_task = Bugsnag.configuration.request_data[:bugsnag_running_task]
|
16
|
+
Bugsnag.configuration.set_request_data :bugsnag_running_task, self
|
17
|
+
Bugsnag.configuration.runtime_versions["rake"] = ::Rake::VERSION
|
18
|
+
|
19
|
+
super
|
20
|
+
rescue Exception => ex
|
21
|
+
Bugsnag.notify(ex, true) do |report|
|
22
|
+
report.severity = "error"
|
23
|
+
report.severity_reason = {
|
24
|
+
type: Bugsnag::Report::UNHANDLED_EXCEPTION_MIDDLEWARE,
|
25
|
+
attributes: FRAMEWORK_ATTRIBUTES
|
26
|
+
}
|
27
|
+
end
|
28
|
+
raise
|
29
|
+
ensure
|
30
|
+
Bugsnag.configuration.set_request_data :bugsnag_running_task, old_task
|
31
|
+
end
|
27
32
|
end
|
28
|
-
raise
|
29
|
-
ensure
|
30
|
-
Bugsnag.configuration.set_request_data :bugsnag_running_task, old_task
|
31
33
|
end
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
+
Rake::Task.send(:prepend, Bugsnag::RakeTask)
|
36
|
+
else
|
37
|
+
class Rake::Task
|
38
|
+
FRAMEWORK_ATTRIBUTES = {
|
39
|
+
framework: 'Rake'
|
40
|
+
}
|
41
|
+
|
42
|
+
##
|
43
|
+
# Executes the rake task with Bugsnag setup with contextual data.
|
44
|
+
def execute_with_bugsnag(args=nil)
|
45
|
+
Bugsnag.configuration.app_type ||= "rake"
|
46
|
+
old_task = Bugsnag.configuration.request_data[:bugsnag_running_task]
|
47
|
+
Bugsnag.configuration.set_request_data :bugsnag_running_task, self
|
48
|
+
Bugsnag.configuration.runtime_versions["rake"] = ::Rake::VERSION
|
49
|
+
|
50
|
+
execute_without_bugsnag(args)
|
51
|
+
rescue Exception => ex
|
52
|
+
Bugsnag.notify(ex, true) do |report|
|
53
|
+
report.severity = "error"
|
54
|
+
report.severity_reason = {
|
55
|
+
type: Bugsnag::Report::UNHANDLED_EXCEPTION_MIDDLEWARE,
|
56
|
+
attributes: FRAMEWORK_ATTRIBUTES
|
57
|
+
}
|
58
|
+
end
|
59
|
+
raise
|
60
|
+
ensure
|
61
|
+
Bugsnag.configuration.set_request_data :bugsnag_running_task, old_task
|
62
|
+
end
|
63
|
+
|
64
|
+
alias_method :execute_without_bugsnag, :execute
|
65
|
+
alias_method :execute, :execute_with_bugsnag
|
66
|
+
end
|
35
67
|
end
|
36
68
|
|
37
69
|
Bugsnag.configuration.internal_middleware.use(Bugsnag::Middleware::Rake)
|