bugsnag 6.12.2 → 6.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.buildkite/pipeline.yml +470 -0
  3. data/.rubocop_todo.yml +1 -1
  4. data/CHANGELOG.md +12 -0
  5. data/CONTRIBUTING.md +1 -9
  6. data/Gemfile +11 -6
  7. data/TESTING.md +81 -0
  8. data/VERSION +1 -1
  9. data/docker-compose.yml +46 -0
  10. data/dockerfiles/Dockerfile.jruby-unit-tests +13 -0
  11. data/dockerfiles/Dockerfile.ruby-maze-runner +26 -0
  12. data/dockerfiles/Dockerfile.ruby-unit-tests +12 -0
  13. data/features/delayed_job.feature +6 -22
  14. data/features/fixtures/delayed_job/Dockerfile +2 -4
  15. data/features/fixtures/delayed_job/app/Gemfile +1 -1
  16. data/features/fixtures/delayed_job/app/Rakefile +18 -0
  17. data/features/fixtures/docker-compose.yml +28 -40
  18. data/features/fixtures/expected_breadcrumbs/active_job.json +9 -0
  19. data/features/fixtures/expected_breadcrumbs/mongo_failed.json +15 -0
  20. data/features/fixtures/expected_breadcrumbs/mongo_filtered_request.json +15 -0
  21. data/features/fixtures/expected_breadcrumbs/mongo_filtered_result.json +15 -0
  22. data/features/fixtures/expected_breadcrumbs/mongo_success.json +14 -0
  23. data/features/fixtures/expected_breadcrumbs/request.json +13 -0
  24. data/features/fixtures/expected_breadcrumbs/sql_with_bindings.json +12 -0
  25. data/features/fixtures/expected_breadcrumbs/sql_without_bindings.json +11 -0
  26. data/features/fixtures/plain/Dockerfile +2 -2
  27. data/features/fixtures/plain/app/app.rb +1 -3
  28. data/features/fixtures/plain/app/delivery/fork_threadpool.rb +3 -1
  29. data/features/fixtures/plain/app/unhandled/{Interrupt.rb → interrupt.rb} +0 -0
  30. data/features/fixtures/rack1/Dockerfile +2 -2
  31. data/features/fixtures/rack2/Dockerfile +2 -2
  32. data/features/fixtures/rails3/Dockerfile +2 -2
  33. data/features/fixtures/rails3/app/Gemfile +4 -0
  34. data/features/fixtures/rails3/app/config/initializers/bugsnag.rb +1 -1
  35. data/features/fixtures/rails4/Dockerfile +2 -5
  36. data/features/fixtures/rails4/app/config/initializers/bugsnag.rb +1 -1
  37. data/features/fixtures/rails5/Dockerfile +2 -2
  38. data/features/fixtures/rails5/app/config/initializers/bugsnag.rb +1 -1
  39. data/features/fixtures/rails6/Dockerfile +2 -2
  40. data/features/fixtures/rails6/app/Gemfile +3 -2
  41. data/features/fixtures/rails6/app/app/controllers/mongo_controller.rb +22 -0
  42. data/features/fixtures/rails6/app/app/models/mongo_model.rb +6 -0
  43. data/features/fixtures/rails6/app/config/environments/development.rb +2 -0
  44. data/features/fixtures/rails6/app/config/environments/production.rb +1 -0
  45. data/features/fixtures/rails6/app/config/environments/rails_env.rb +1 -0
  46. data/features/fixtures/rails6/app/config/environments/test.rb +1 -0
  47. data/features/fixtures/rails6/app/config/initializers/bugsnag.rb +1 -1
  48. data/features/fixtures/rails6/app/config/mongoid.yml +23 -0
  49. data/features/fixtures/rails6/app/config/routes.rb +4 -0
  50. data/features/fixtures/resque/Dockerfile +2 -2
  51. data/features/fixtures/sidekiq/Dockerfile +5 -7
  52. data/features/fixtures/sidekiq/app/Gemfile +2 -1
  53. data/features/fixtures/sidekiq/app/Rakefile.rb +14 -0
  54. data/features/fixtures/sinatra1/Dockerfile +2 -2
  55. data/features/fixtures/sinatra2/Dockerfile +2 -2
  56. data/features/plain_features/add_tab.feature +24 -97
  57. data/features/plain_features/app_type.feature +6 -25
  58. data/features/plain_features/app_version.feature +6 -25
  59. data/features/plain_features/auto_notify.feature +4 -20
  60. data/features/plain_features/delivery.feature +12 -60
  61. data/features/plain_features/exception_data.feature +24 -94
  62. data/features/plain_features/filters.feature +9 -43
  63. data/features/plain_features/handled_errors.feature +16 -78
  64. data/features/plain_features/ignore_classes.feature +5 -23
  65. data/features/plain_features/ignore_report.feature +6 -24
  66. data/features/plain_features/proxies.feature +13 -56
  67. data/features/plain_features/release_stages.feature +9 -40
  68. data/features/plain_features/report_api_key.feature +9 -35
  69. data/features/plain_features/report_severity.feature +8 -35
  70. data/features/plain_features/report_stack_frames.feature +24 -92
  71. data/features/plain_features/report_user.feature +23 -96
  72. data/features/plain_features/unhandled_errors.feature +17 -88
  73. data/features/rails_features/api_key.feature +12 -62
  74. data/features/rails_features/app_type.feature +13 -62
  75. data/features/rails_features/app_version.feature +19 -86
  76. data/features/rails_features/auto_capture_sessions.feature +31 -120
  77. data/features/rails_features/auto_notify.feature +28 -113
  78. data/features/rails_features/before_notify.feature +18 -89
  79. data/features/rails_features/breadcrumbs.feature +40 -147
  80. data/features/rails_features/handled.feature +18 -88
  81. data/features/rails_features/ignore_classes.feature +12 -55
  82. data/features/rails_features/meta_data_filters.feature +6 -34
  83. data/features/rails_features/mongo_breadcrumbs.feature +22 -105
  84. data/features/rails_features/project_root.feature +19 -90
  85. data/features/rails_features/release_stage.feature +20 -88
  86. data/features/rails_features/send_code.feature +13 -59
  87. data/features/rails_features/send_environment.feature +7 -35
  88. data/features/rails_features/unhandled.feature +6 -33
  89. data/features/rails_features/user_info.feature +27 -68
  90. data/features/sidekiq.feature +12 -79
  91. data/features/steps/ruby_notifier_steps.rb +59 -15
  92. data/features/support/env.rb +12 -45
  93. data/lib/bugsnag/cleaner.rb +2 -3
  94. data/lib/bugsnag/configuration.rb +12 -0
  95. data/lib/bugsnag/stacktrace.rb +1 -4
  96. data/spec/configuration_spec.rb +11 -0
  97. data/spec/fixtures/apps/rails-initializer-config/Gemfile +5 -1
  98. data/spec/fixtures/apps/rails-invalid-initializer-config/Gemfile +5 -1
  99. data/spec/fixtures/apps/rails-no-config/Gemfile +5 -1
  100. data/spec/integrations/logger_spec.rb +1 -1
  101. data/spec/integrations/rake_spec.rb +1 -1
  102. data/spec/stacktrace_spec.rb +39 -0
  103. metadata +21 -5
  104. data/.travis.yml +0 -122
  105. data/features/plain_features/api_key.feature +0 -25
@@ -1,20 +1,11 @@
1
1
  Feature: Before notify callbacks
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I set environment variable "APP_PATH" to "/usr/src"
6
- And I configure the bugsnag endpoint
7
-
8
- Scenario Outline: Rails before_notify controller method works on handled errors
9
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
10
- And I start the service "rails<rails_version>"
11
- And I wait for the app to respond on port "6128<rails_version>"
12
- When I navigate to the route "/before_notify/handled" on port "6128<rails_version>"
13
- Then I should receive a request
14
- And the request is a valid for the error reporting API
15
- And the request used the "Ruby Bugsnag Notifier" notifier
16
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
17
- And the payload field "events" is an array with 1 element
3
+ @rails3 @rails4 @rails5 @rails6
4
+ Scenario: Rails before_notify controller method works on handled errors
5
+ Given I start the rails service
6
+ When I navigate to the route "/before_notify/handled" on the rails app
7
+ And I wait to receive a request
8
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
18
9
  And the exception "errorClass" equals "RuntimeError"
19
10
  And the exception "message" starts with "handled string"
20
11
  And the event "unhandled" is false
@@ -23,34 +14,12 @@ Scenario Outline: Rails before_notify controller method works on handled errors
23
14
  And the event "metaData.before_notify.source" equals "rails_before_handled"
24
15
  And the event "metaData.controller.name" equals "BeforeNotifyController"
25
16
 
26
- Examples:
27
- | ruby_version | rails_version |
28
- | 2.0 | 3 |
29
- | 2.1 | 3 |
30
- | 2.2 | 3 |
31
- | 2.2 | 4 |
32
- | 2.2 | 5 |
33
- | 2.3 | 3 |
34
- | 2.3 | 4 |
35
- | 2.3 | 5 |
36
- | 2.4 | 3 |
37
- | 2.4 | 5 |
38
- | 2.5 | 3 |
39
- | 2.5 | 5 |
40
- | 2.5 | 6 |
41
- | 2.6 | 5 |
42
- | 2.6 | 6 |
43
-
44
- Scenario Outline: Rails before_notify controller method works on unhandled errors
45
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
46
- And I start the service "rails<rails_version>"
47
- And I wait for the app to respond on port "6128<rails_version>"
48
- When I navigate to the route "/before_notify/unhandled" on port "6128<rails_version>"
49
- Then I should receive a request
50
- And the request is a valid for the error reporting API
51
- And the request used the "Ruby Bugsnag Notifier" notifier
52
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
53
- And the payload field "events" is an array with 1 element
17
+ @rails3 @rails4 @rails5 @rails6
18
+ Scenario: Rails before_notify controller method works on unhandled errors
19
+ Given I start the rails service
20
+ When I navigate to the route "/before_notify/unhandled" on the rails app
21
+ And I wait to receive a request
22
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
54
23
  And the exception "errorClass" equals "NameError"
55
24
  And the exception "message" starts with "undefined local variable or method `generate_unhandled_error' for #<BeforeNotifyController"
56
25
  And the event "unhandled" is true
@@ -59,34 +28,12 @@ Scenario Outline: Rails before_notify controller method works on unhandled error
59
28
  And the event "metaData.before_notify.source" equals "rails_before_unhandled"
60
29
  And the event "metaData.controller.name" equals "BeforeNotifyController"
61
30
 
62
- Examples:
63
- | ruby_version | rails_version |
64
- | 2.0 | 3 |
65
- | 2.1 | 3 |
66
- | 2.2 | 3 |
67
- | 2.2 | 4 |
68
- | 2.2 | 5 |
69
- | 2.3 | 3 |
70
- | 2.3 | 4 |
71
- | 2.3 | 5 |
72
- | 2.4 | 3 |
73
- | 2.4 | 5 |
74
- | 2.5 | 3 |
75
- | 2.5 | 5 |
76
- | 2.5 | 6 |
77
- | 2.6 | 5 |
78
- | 2.6 | 6 |
79
-
80
- Scenario Outline: Inline block on handled errors is called
81
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
82
- And I start the service "rails<rails_version>"
83
- And I wait for the app to respond on port "6128<rails_version>"
84
- When I navigate to the route "/before_notify/inline" on port "6128<rails_version>"
85
- Then I should receive a request
86
- And the request is a valid for the error reporting API
87
- And the request used the "Ruby Bugsnag Notifier" notifier
88
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
89
- And the payload field "events" is an array with 1 element
31
+ @rails3 @rails4 @rails5 @rails6
32
+ Scenario: Inline block on handled errors is called
33
+ Given I start the rails service
34
+ When I navigate to the route "/before_notify/inline" on the rails app
35
+ And I wait to receive a request
36
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
90
37
  And the exception "errorClass" equals "RuntimeError"
91
38
  And the exception "message" starts with "handled string"
92
39
  And the event "unhandled" is false
@@ -95,21 +42,3 @@ Scenario Outline: Inline block on handled errors is called
95
42
  And the event "metaData.before_notify.source" equals "rails_inline"
96
43
  And the event "metaData.controller.name" equals "BeforeNotifyController"
97
44
 
98
- Examples:
99
- | ruby_version | rails_version |
100
- | 2.0 | 3 |
101
- | 2.1 | 3 |
102
- | 2.2 | 3 |
103
- | 2.2 | 4 |
104
- | 2.2 | 5 |
105
- | 2.3 | 3 |
106
- | 2.3 | 4 |
107
- | 2.3 | 5 |
108
- | 2.4 | 3 |
109
- | 2.4 | 5 |
110
- | 2.5 | 3 |
111
- | 2.5 | 5 |
112
- | 2.5 | 6 |
113
- | 2.6 | 5 |
114
- | 2.6 | 6 |
115
-
@@ -1,150 +1,43 @@
1
1
  Feature: Rails automatic breadcrumbs
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I set environment variable "APP_PATH" to "/usr/src"
6
- And I configure the bugsnag endpoint
7
-
8
- Scenario Outline: Request breadcrumb
9
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
10
- And I start the service "rails<rails_version>"
11
- And I wait for the app to respond on port "6128<rails_version>"
12
- When I navigate to the route "/breadcrumbs/handled" on port "6128<rails_version>"
13
- Then I should receive a request
14
- And the request is a valid for the error reporting API
15
- And the request used the "Ruby Bugsnag Notifier" notifier
16
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
17
- And the event has a "request" breadcrumb named "Controller started processing"
18
- And the event "breadcrumbs.0.timestamp" is a timestamp
19
- And the event "breadcrumbs.0.metaData.controller" equals "BreadcrumbsController"
20
- And the event "breadcrumbs.0.metaData.action" equals "handled"
21
- And the event "breadcrumbs.0.metaData.method" equals "GET"
22
- And the event "breadcrumbs.0.metaData.path" equals "/breadcrumbs/handled"
23
- And the event "breadcrumbs.0.metaData.event_name" equals "start_processing.action_controller"
24
- And the event "breadcrumbs.0.metaData.event_id" is not null
25
-
26
- Examples:
27
- | ruby_version | rails_version |
28
- | 2.0 | 3 |
29
- | 2.1 | 3 |
30
- | 2.2 | 3 |
31
- | 2.2 | 4 |
32
- | 2.2 | 5 |
33
- | 2.3 | 3 |
34
- | 2.3 | 4 |
35
- | 2.3 | 5 |
36
- | 2.4 | 3 |
37
- | 2.4 | 5 |
38
- | 2.5 | 3 |
39
- | 2.5 | 5 |
40
- | 2.5 | 6 |
41
- | 2.6 | 5 |
42
- | 2.6 | 6 |
43
-
44
- Scenario Outline: SQL Breadcrumb without bindings
45
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
46
- And I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
47
- And I start the service "rails<rails_version>"
48
- And I wait for the app to respond on port "6128<rails_version>"
49
- When I navigate to the route "/breadcrumbs/sql_breadcrumb" on port "6128<rails_version>"
50
- Then I should receive a request
51
- And the request is a valid for the error reporting API
52
- And the request used the "Ruby Bugsnag Notifier" notifier
53
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
54
- And the event has a "process" breadcrumb named "ActiveRecord SQL query"
55
- And the event "breadcrumbs.0.timestamp" is a timestamp
56
- And the event "breadcrumbs.0.metaData.name" equals "User Load"
57
- And the event "breadcrumbs.0.metaData.connection_id" is not null
58
- And the event "breadcrumbs.0.metaData.event_name" equals "sql.active_record"
59
- And the event "breadcrumbs.0.metaData.event_id" is not null
60
-
61
- Examples:
62
- | ruby_version | rails_version |
63
- | 2.0 | 3 |
64
- | 2.1 | 3 |
65
- | 2.2 | 3 |
66
- | 2.2 | 4 |
67
- | 2.3 | 3 |
68
- | 2.3 | 4 |
69
- | 2.4 | 3 |
70
- | 2.5 | 3 |
71
- | 2.5 | 6 |
72
- | 2.6 | 5 |
73
- | 2.6 | 6 |
74
-
75
- Scenario Outline: SQL Breadcrumb with bindings
76
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
77
- And I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
78
- And I start the service "rails<rails_version>"
79
- And I wait for the app to respond on port "6128<rails_version>"
80
- When I navigate to the route "/breadcrumbs/sql_breadcrumb" on port "6128<rails_version>"
81
- Then I should receive a request
82
- And the request is a valid for the error reporting API
83
- And the request used the "Ruby Bugsnag Notifier" notifier
84
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
85
- And the event has a "process" breadcrumb named "ActiveRecord SQL query"
86
- And the event "breadcrumbs.0.timestamp" is a timestamp
87
- And the event "breadcrumbs.0.metaData.name" equals "User Load"
88
- And the event "breadcrumbs.0.metaData.connection_id" is not null
89
- And the event "breadcrumbs.0.metaData.event_name" equals "sql.active_record"
90
- And the event "breadcrumbs.0.metaData.event_id" is not null
91
- And the event "breadcrumbs.0.metaData.binds" equals "{"email":"?","LIMIT":"?"}"
92
-
93
- Examples:
94
- | ruby_version | rails_version |
95
- | 2.2 | 5 |
96
- | 2.3 | 5 |
97
- | 2.4 | 5 |
98
- | 2.5 | 5 |
99
- | 2.5 | 6 |
100
- | 2.6 | 5 |
101
- | 2.6 | 6 |
102
-
103
- Scenario Outline: Active job breadcrumb
104
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
105
- And I start the service "rails<rails_version>"
106
- And I wait for the app to respond on port "6128<rails_version>"
107
- When I navigate to the route "/breadcrumbs/active_job" on port "6128<rails_version>"
108
- Then I should receive a request
109
- And the request is a valid for the error reporting API
110
- And the request used the "Ruby Bugsnag Notifier" notifier
111
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
112
- And the event has a "process" breadcrumb named "Start perform ActiveJob"
113
- And the event "breadcrumbs.0.timestamp" is a timestamp
114
- And the event "breadcrumbs.0.metaData.event_name" equals "perform_start.active_job"
115
- And the event "breadcrumbs.0.metaData.event_id" is not null
116
-
117
- Examples:
118
- | ruby_version | rails_version |
119
- | 2.2 | 4 |
120
- | 2.2 | 5 |
121
- | 2.3 | 4 |
122
- | 2.3 | 5 |
123
- | 2.4 | 5 |
124
- | 2.5 | 5 |
125
- | 2.5 | 6 |
126
- | 2.6 | 5 |
127
- | 2.6 | 6 |
128
-
129
- Scenario Outline: Cache read
130
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
131
- And I start the service "rails<rails_version>"
132
- And I wait for the app to respond on port "6128<rails_version>"
133
- When I navigate to the route "/breadcrumbs/cache_read" on port "6128<rails_version>"
134
- Then I should receive a request
135
- And the request is a valid for the error reporting API
136
- And the request used the "Ruby Bugsnag Notifier" notifier
137
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
3
+ @rails3 @rails4 @rails5 @rails6
4
+ Scenario: Request breadcrumb
5
+ Given I start the rails service
6
+ When I navigate to the route "/breadcrumbs/handled" on the rails app
7
+ And I wait to receive a request
8
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
9
+ And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/request.json"
10
+
11
+ @rails3 @rails4
12
+ Scenario: SQL Breadcrumb without bindings
13
+ Given I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
14
+ And I start the rails service
15
+ When I navigate to the route "/breadcrumbs/sql_breadcrumb" on the rails app
16
+ And I wait to receive a request
17
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
18
+ And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/sql_without_bindings.json"
19
+
20
+ @rails5 @rails6
21
+ Scenario: SQL Breadcrumb with bindings
22
+ Given I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
23
+ And I start the rails service
24
+ When I navigate to the route "/breadcrumbs/sql_breadcrumb" on the rails app
25
+ And I wait to receive a request
26
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
27
+ And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/sql_with_bindings.json"
28
+
29
+ @rails4 @rails5 @rails6
30
+ Scenario: Active job breadcrumb
31
+ Given I start the rails service
32
+ When I navigate to the route "/breadcrumbs/active_job" on the rails app
33
+ And I wait to receive a request
34
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
35
+ And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/active_job.json"
36
+
37
+ @rails4 @rails5 @rails6
38
+ Scenario: Cache read
39
+ Given I start the rails service
40
+ When I navigate to the route "/breadcrumbs/cache_read" on the rails app
41
+ And I wait to receive a request
42
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
138
43
  And the event has a "process" breadcrumb named "Read cache"
139
-
140
- Examples:
141
- | ruby_version | rails_version |
142
- | 2.2 | 4 |
143
- | 2.2 | 5 |
144
- | 2.3 | 4 |
145
- | 2.3 | 5 |
146
- | 2.4 | 5 |
147
- | 2.5 | 5 |
148
- | 2.5 | 6 |
149
- | 2.6 | 5 |
150
- | 2.6 | 6 |
@@ -1,20 +1,11 @@
1
1
  Feature: Rails handled errors
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I set environment variable "APP_PATH" to "/usr/src"
6
- And I configure the bugsnag endpoint
7
-
8
- Scenario Outline: Unhandled RuntimeError
9
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
10
- And I start the service "rails<rails_version>"
11
- And I wait for the app to respond on port "6128<rails_version>"
12
- When I navigate to the route "/handled/unthrown" on port "6128<rails_version>"
13
- Then I should receive a request
14
- And the request is a valid for the error reporting API
15
- And the request used the "Ruby Bugsnag Notifier" notifier
16
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
17
- And the payload field "events" is an array with 1 element
3
+ @rails3 @rails4 @rails5 @rails6
4
+ Scenario: Unhandled RuntimeError
5
+ Given I start the rails service
6
+ When I navigate to the route "/handled/unthrown" on the rails app
7
+ And I wait to receive a request
8
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
18
9
  And the event "unhandled" is false
19
10
  And the exception "errorClass" equals "RuntimeError"
20
11
  And the exception "message" starts with "handled unthrown error"
@@ -23,34 +14,12 @@ Scenario Outline: Unhandled RuntimeError
23
14
  And the event "severity" equals "warning"
24
15
  And the event "severityReason.type" equals "handledException"
25
16
 
26
- Examples:
27
- | ruby_version | rails_version |
28
- | 2.0 | 3 |
29
- | 2.1 | 3 |
30
- | 2.2 | 3 |
31
- | 2.2 | 4 |
32
- | 2.2 | 5 |
33
- | 2.3 | 3 |
34
- | 2.3 | 4 |
35
- | 2.3 | 5 |
36
- | 2.4 | 3 |
37
- | 2.4 | 5 |
38
- | 2.5 | 3 |
39
- | 2.5 | 5 |
40
- | 2.5 | 6 |
41
- | 2.6 | 5 |
42
- | 2.6 | 6 |
43
-
44
- Scenario Outline: Thrown handled NameError
45
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
46
- And I start the service "rails<rails_version>"
47
- And I wait for the app to respond on port "6128<rails_version>"
48
- When I navigate to the route "/handled/thrown" on port "6128<rails_version>"
49
- Then I should receive a request
50
- And the request is a valid for the error reporting API
51
- And the request used the "Ruby Bugsnag Notifier" notifier
52
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
53
- And the payload field "events" is an array with 1 element
17
+ @rails3 @rails4 @rails5 @rails6
18
+ Scenario: Thrown handled NameError
19
+ Given I start the rails service
20
+ When I navigate to the route "/handled/thrown" on the rails app
21
+ And I wait to receive a request
22
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
54
23
  And the exception "errorClass" equals "NameError"
55
24
  And the exception "message" starts with "undefined local variable or method `generate_unhandled_error' for #<HandledController"
56
25
  And the event "unhandled" is false
@@ -59,54 +28,15 @@ Scenario Outline: Thrown handled NameError
59
28
  And the event "severity" equals "warning"
60
29
  And the event "severityReason.type" equals "handledException"
61
30
 
62
- Examples:
63
- | ruby_version | rails_version |
64
- | 2.0 | 3 |
65
- | 2.1 | 3 |
66
- | 2.2 | 3 |
67
- | 2.2 | 4 |
68
- | 2.2 | 5 |
69
- | 2.3 | 3 |
70
- | 2.3 | 4 |
71
- | 2.3 | 5 |
72
- | 2.4 | 3 |
73
- | 2.4 | 5 |
74
- | 2.5 | 3 |
75
- | 2.5 | 5 |
76
- | 2.5 | 6 |
77
- | 2.6 | 5 |
78
- | 2.6 | 6 |
79
-
80
- Scenario Outline: Manual string notify
81
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
82
- And I start the service "rails<rails_version>"
83
- And I wait for the app to respond on port "6128<rails_version>"
84
- When I navigate to the route "/handled/string_notify" on port "6128<rails_version>"
85
- Then I should receive a request
86
- And the request is a valid for the error reporting API
87
- And the request used the "Ruby Bugsnag Notifier" notifier
88
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
89
- And the payload field "events" is an array with 1 element
31
+ @rails3 @rails4 @rails5 @rails6
32
+ Scenario: Manual string notify
33
+ Given I start the rails service
34
+ When I navigate to the route "/handled/string_notify" on the rails app
35
+ And I wait to receive a request
36
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
90
37
  And the exception "errorClass" equals "RuntimeError"
91
38
  And the exception "message" starts with "handled string"
92
39
  And the event "unhandled" is false
93
40
  And the event "metaData.request.url" ends with "/handled/string_notify"
94
41
  And the event "app.type" equals "rails"
95
42
 
96
- Examples:
97
- | ruby_version | rails_version |
98
- | 2.0 | 3 |
99
- | 2.1 | 3 |
100
- | 2.2 | 3 |
101
- | 2.2 | 4 |
102
- | 2.2 | 5 |
103
- | 2.3 | 3 |
104
- | 2.3 | 4 |
105
- | 2.3 | 5 |
106
- | 2.4 | 3 |
107
- | 2.4 | 5 |
108
- | 2.5 | 3 |
109
- | 2.5 | 5 |
110
- | 2.5 | 6 |
111
- | 2.6 | 5 |
112
- | 2.6 | 6 |
@@ -1,57 +1,14 @@
1
1
  Feature: Ignore classes
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I set environment variable "APP_PATH" to "/usr/src"
6
- And I configure the bugsnag endpoint
7
-
8
- Scenario Outline: Ignore_classes can be set to a different value in initializer
9
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
10
- And I set environment variable "BUGSNAG_IGNORE_CLASS" to "IgnoredError"
11
- And I start the service "rails<rails_version>"
12
- And I wait for the app to respond on port "6128<rails_version>"
13
- When I navigate to the route "/ignore_classes/initializer" on port "6128<rails_version>"
14
- Then I should receive 0 requests
15
-
16
- Examples:
17
- | ruby_version | rails_version |
18
- | 2.0 | 3 |
19
- | 2.1 | 3 |
20
- | 2.2 | 3 |
21
- | 2.2 | 4 |
22
- | 2.2 | 5 |
23
- | 2.3 | 3 |
24
- | 2.3 | 4 |
25
- | 2.3 | 5 |
26
- | 2.4 | 3 |
27
- | 2.4 | 5 |
28
- | 2.5 | 3 |
29
- | 2.5 | 5 |
30
- | 2.5 | 6 |
31
- | 2.6 | 5 |
32
- | 2.6 | 6 |
33
-
34
- Scenario Outline: Ignore_classes can be set to a different value after initializer
35
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
36
- And I start the service "rails<rails_version>"
37
- And I wait for the app to respond on port "6128<rails_version>"
38
- When I navigate to the route "/ignore_classes/after?ignore=IgnoredError" on port "6128<rails_version>"
39
- Then I should receive 0 requests
40
-
41
- Examples:
42
- | ruby_version | rails_version |
43
- | 2.0 | 3 |
44
- | 2.1 | 3 |
45
- | 2.2 | 3 |
46
- | 2.2 | 4 |
47
- | 2.2 | 5 |
48
- | 2.3 | 3 |
49
- | 2.3 | 4 |
50
- | 2.3 | 5 |
51
- | 2.4 | 3 |
52
- | 2.4 | 5 |
53
- | 2.5 | 3 |
54
- | 2.5 | 5 |
55
- | 2.5 | 6 |
56
- | 2.6 | 5 |
57
- | 2.6 | 6 |
3
+ @rails3 @rails4 @rails5 @rails6
4
+ Scenario: Ignore_classes can be set to a different value in initializer
5
+ Given I set environment variable "BUGSNAG_IGNORE_CLASS" to "IgnoredError"
6
+ And I start the rails service
7
+ When I navigate to the route "/ignore_classes/initializer" on the rails app
8
+ Then I should receive no requests
9
+
10
+ @rails3 @rails4 @rails5 @rails6
11
+ Scenario: Ignore_classes can be set to a different value after initializer
12
+ Given I start the rails service
13
+ When I navigate to the route "/ignore_classes/after?ignore=IgnoredError" on the rails app
14
+ Then I should receive no requests