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,72 +1,31 @@
1
1
  Feature: Plain report modify stack frames
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I configure the bugsnag endpoint
6
-
7
3
  Scenario Outline: Stack frames can be removed
8
- Given I set environment variable "RUBY_VERSION" to "<ruby version>"
9
- And I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
10
- And I have built the service "plain-ruby"
11
- And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb"
12
- And I wait for 1 second
13
- Then I should receive a request
14
- And the request used the "Ruby Bugsnag Notifier" notifier
15
- And the request used payload v4 headers
16
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
4
+ Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
5
+ When I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb"
6
+ And I wait to receive a request
7
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
17
8
  And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/<initiator>.rb"
18
9
  And the "lineNumber" of stack frame 0 equals <lineNumber>
19
10
 
20
11
  Examples:
21
- | ruby version | initiator | lineNumber |
22
- | 1.9.3 | handled_before_notify | 20 |
23
- | 1.9.3 | unhandled_before_notify | 21 |
24
- | 2.0 | handled_before_notify | 20 |
25
- | 2.0 | unhandled_before_notify | 21 |
26
- | 2.1 | handled_before_notify | 20 |
27
- | 2.1 | unhandled_before_notify | 21 |
28
- | 2.2 | handled_before_notify | 20 |
29
- | 2.2 | unhandled_before_notify | 21 |
30
- | 2.3 | handled_before_notify | 20 |
31
- | 2.3 | unhandled_before_notify | 21 |
32
- | 2.4 | handled_before_notify | 20 |
33
- | 2.4 | unhandled_before_notify | 21 |
34
- | 2.5 | handled_before_notify | 20 |
35
- | 2.5 | unhandled_before_notify | 21 |
36
-
37
- Scenario Outline: Stack frames can be removed from a notified string
38
- Given I set environment variable "RUBY_VERSION" to "<ruby version>"
39
- And I set environment variable "CALLBACK_INITIATOR" to "handled_block"
40
- And I have built the service "plain-ruby"
41
- And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb"
42
- And I wait for 1 second
43
- Then I should receive a request
44
- And the request used the "Ruby Bugsnag Notifier" notifier
45
- And the request used payload v4 headers
46
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
12
+ | initiator | lineNumber |
13
+ | handled_before_notify | 20 |
14
+ | unhandled_before_notify | 21 |
15
+
16
+ Scenario: Stack frames can be removed from a notified string
17
+ Given I set environment variable "CALLBACK_INITIATOR" to "handled_block"
18
+ When I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb"
19
+ And I wait to receive a request
20
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
47
21
  And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/handled_block.rb"
48
22
  And the "lineNumber" of the top non-bugsnag stackframe equals 19
49
23
 
50
- Examples:
51
- | ruby version |
52
- | 1.9.3 |
53
- | 2.0 |
54
- | 2.1 |
55
- | 2.2 |
56
- | 2.3 |
57
- | 2.4 |
58
- | 2.5 |
59
-
60
24
  Scenario Outline: Stack frames can be marked as in project
61
- Given I set environment variable "RUBY_VERSION" to "<ruby version>"
62
- And I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
63
- And I have built the service "plain-ruby"
64
- And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/mark_frames_in_project.rb"
65
- And I wait for 1 second
66
- Then I should receive a request
67
- And the request used the "Ruby Bugsnag Notifier" notifier
68
- And the request used payload v4 headers
69
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
25
+ Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
26
+ When I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/mark_frames_in_project.rb"
27
+ And I wait to receive a request
28
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
70
29
  And the "file" of stack frame 0 equals "/usr/src/app/stack_frame_modification/initiators/<initiator>.rb"
71
30
  And the event "exceptions.0.stacktrace.0.inProject" is null
72
31
  And the event "exceptions.0.stacktrace.1.inProject" is true
@@ -74,44 +33,17 @@ Scenario Outline: Stack frames can be marked as in project
74
33
  And the event "exceptions.0.stacktrace.3.inProject" is true
75
34
 
76
35
  Examples:
77
- | ruby version | initiator |
78
- | 1.9.3 | handled_before_notify |
79
- | 1.9.3 | unhandled_before_notify |
80
- | 2.0 | handled_before_notify |
81
- | 2.0 | unhandled_before_notify |
82
- | 2.1 | handled_before_notify |
83
- | 2.1 | unhandled_before_notify |
84
- | 2.2 | handled_before_notify |
85
- | 2.2 | unhandled_before_notify |
86
- | 2.3 | handled_before_notify |
87
- | 2.3 | unhandled_before_notify |
88
- | 2.4 | handled_before_notify |
89
- | 2.4 | unhandled_before_notify |
90
- | 2.5 | handled_before_notify |
91
- | 2.5 | unhandled_before_notify |
36
+ | initiator |
37
+ | handled_before_notify |
38
+ | unhandled_before_notify |
92
39
 
93
- Scenario Outline: Stack frames can be marked as in project with a handled string
94
- Given I set environment variable "RUBY_VERSION" to "<ruby version>"
95
- And I set environment variable "CALLBACK_INITIATOR" to "handled_block"
96
- And I have built the service "plain-ruby"
40
+ Scenario: Stack frames can be marked as in project with a handled string
41
+ Given I set environment variable "CALLBACK_INITIATOR" to "handled_block"
97
42
  And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/mark_frames_in_project.rb"
98
- And I wait for 1 second
99
- Then I should receive a request
100
- And the request used the "Ruby Bugsnag Notifier" notifier
101
- And the request used payload v4 headers
102
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
43
+ And I wait to receive a request
44
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
103
45
  And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/stack_frame_modification/initiators/handled_block.rb"
104
46
  And the event "exceptions.0.stacktrace.0.inProject" is null
105
47
  And the event "exceptions.0.stacktrace.1.inProject" is true
106
48
  And the event "exceptions.0.stacktrace.2.inProject" is true
107
49
  And the event "exceptions.0.stacktrace.3.inProject" is true
108
-
109
- Examples:
110
- | ruby version |
111
- | 1.9.3 |
112
- | 2.0 |
113
- | 2.1 |
114
- | 2.2 |
115
- | 2.3 |
116
- | 2.4 |
117
- | 2.5 |
@@ -1,118 +1,45 @@
1
1
  Feature: Plain report modify user
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I configure the bugsnag endpoint
6
-
7
3
  Scenario Outline: A report can have a user name, email, and id set
8
- Given I set environment variable "RUBY_VERSION" to "<ruby version>"
9
- And I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
10
- And I have built the service "plain-ruby"
11
- And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/set_user_details.rb"
12
- And I wait for 1 second
13
- Then I should receive a request
14
- And the request used the "Ruby Bugsnag Notifier" notifier
15
- And the request used payload v4 headers
16
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
4
+ Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
5
+ When I run the service "plain-ruby" with the command "bundle exec ruby report_modification/set_user_details.rb"
6
+ And I wait to receive a request
7
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
17
8
  And the event "user.name" equals "leo testman"
18
9
  And the event "user.email" equals "test@test.com"
19
10
  And the event "user.id" equals "0001"
20
11
 
21
12
  Examples:
22
- | ruby version | initiator |
23
- | 1.9.3 | handled_before_notify |
24
- | 1.9.3 | handled_block |
25
- | 1.9.3 | unhandled_before_notify |
26
- | 2.0 | handled_before_notify |
27
- | 2.0 | handled_block |
28
- | 2.0 | unhandled_before_notify |
29
- | 2.1 | handled_before_notify |
30
- | 2.1 | handled_block |
31
- | 2.1 | unhandled_before_notify |
32
- | 2.2 | handled_before_notify |
33
- | 2.2 | handled_block |
34
- | 2.2 | unhandled_before_notify |
35
- | 2.3 | handled_before_notify |
36
- | 2.3 | handled_block |
37
- | 2.3 | unhandled_before_notify |
38
- | 2.4 | handled_before_notify |
39
- | 2.4 | handled_block |
40
- | 2.4 | unhandled_before_notify |
41
- | 2.5 | handled_before_notify |
42
- | 2.5 | handled_block |
43
- | 2.5 | unhandled_before_notify |
13
+ | initiator |
14
+ | handled_before_notify |
15
+ | handled_block |
16
+ | unhandled_before_notify |
44
17
 
45
18
  Scenario Outline: A report can have custom info set
46
- Given I set environment variable "RUBY_VERSION" to "<ruby version>"
47
- And I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
48
- And I have built the service "plain-ruby"
19
+ Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
49
20
  And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/set_custom_user_details.rb"
50
- And I wait for 1 second
51
- Then I should receive a request
52
- And the request used the "Ruby Bugsnag Notifier" notifier
53
- And the request used payload v4 headers
54
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
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"
55
23
  And the event "user.type" equals "amateur"
56
24
  And the event "user.location" equals "testville"
57
25
  And the event "user.details.a" equals "foo"
58
26
  And the event "user.details.b" equals "bar"
59
27
 
60
28
  Examples:
61
- | ruby version | initiator |
62
- | 1.9.3 | handled_before_notify |
63
- | 1.9.3 | handled_block |
64
- | 1.9.3 | unhandled_before_notify |
65
- | 2.0 | handled_before_notify |
66
- | 2.0 | handled_block |
67
- | 2.0 | unhandled_before_notify |
68
- | 2.1 | handled_before_notify |
69
- | 2.1 | handled_block |
70
- | 2.1 | unhandled_before_notify |
71
- | 2.2 | handled_before_notify |
72
- | 2.2 | handled_block |
73
- | 2.2 | unhandled_before_notify |
74
- | 2.3 | handled_before_notify |
75
- | 2.3 | handled_block |
76
- | 2.3 | unhandled_before_notify |
77
- | 2.4 | handled_before_notify |
78
- | 2.4 | handled_block |
79
- | 2.4 | unhandled_before_notify |
80
- | 2.5 | handled_before_notify |
81
- | 2.5 | handled_block |
82
- | 2.5 | unhandled_before_notify |
29
+ | initiator |
30
+ | handled_before_notify |
31
+ | handled_block |
32
+ | unhandled_before_notify |
83
33
 
84
34
  Scenario Outline: A report can have its user info removed
85
- Given I set environment variable "RUBY_VERSION" to "<ruby version>"
86
- And I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
87
- And I have built the service "plain-ruby"
88
- And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/remove_user_details.rb"
89
- And I wait for 1 second
90
- Then I should receive a request
91
- And the request used the "Ruby Bugsnag Notifier" notifier
92
- And the request used payload v4 headers
93
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
35
+ Given I set environment variable "CALLBACK_INITIATOR" to "<initiator>"
36
+ When I run the service "plain-ruby" with the command "bundle exec ruby report_modification/remove_user_details.rb"
37
+ And I wait to receive a request
38
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
94
39
  And the event "user" is null
95
40
 
96
41
  Examples:
97
- | ruby version | initiator |
98
- | 1.9.3 | handled_before_notify |
99
- | 1.9.3 | handled_block |
100
- | 1.9.3 | unhandled_before_notify |
101
- | 2.0 | handled_before_notify |
102
- | 2.0 | handled_block |
103
- | 2.0 | unhandled_before_notify |
104
- | 2.1 | handled_before_notify |
105
- | 2.1 | handled_block |
106
- | 2.1 | unhandled_before_notify |
107
- | 2.2 | handled_before_notify |
108
- | 2.2 | handled_block |
109
- | 2.2 | unhandled_before_notify |
110
- | 2.3 | handled_before_notify |
111
- | 2.3 | handled_block |
112
- | 2.3 | unhandled_before_notify |
113
- | 2.4 | handled_before_notify |
114
- | 2.4 | handled_block |
115
- | 2.4 | unhandled_before_notify |
116
- | 2.5 | handled_before_notify |
117
- | 2.5 | handled_block |
118
- | 2.5 | unhandled_before_notify |
42
+ | initiator |
43
+ | handled_before_notify |
44
+ | handled_block |
45
+ | unhandled_before_notify |
@@ -1,18 +1,9 @@
1
1
  Feature: Plain unhandled errors
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I configure the bugsnag endpoint
6
-
7
3
  Scenario Outline: An unhandled error sends a report
8
- And I set environment variable "RUBY_VERSION" to "<ruby version>"
9
- And I have built the service "plain-ruby"
10
- And I run the service "plain-ruby" with the command "bundle exec ruby unhandled/<file>.rb"
11
- And I wait for 1 second
12
- Then I should receive a request
13
- And the request used the "Ruby Bugsnag Notifier" notifier
14
- And the request used payload v4 headers
15
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
4
+ Given I run the service "plain-ruby" with the command "bundle exec ruby unhandled/<file>.rb"
5
+ And I wait to receive a request
6
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
16
7
  And the event "unhandled" is true
17
8
  And the event "severity" equals "error"
18
9
  And the event "severityReason.type" equals "unhandledException"
@@ -21,84 +12,22 @@ Scenario Outline: An unhandled error sends a report
21
12
  And the "lineNumber" of stack frame 0 equals <lineNumber>
22
13
 
23
14
  Examples:
24
- | ruby version | file | error | lineNumber |
25
- | 1.9.3 | runtime_error | RuntimeError | 6 |
26
- | 1.9.3 | load_error | LoadError | 6 |
27
- | 1.9.3 | syntax_error | SyntaxError | 6 |
28
- | 1.9.3 | local_jump_error | LocalJumpError | 7 |
29
- | 1.9.3 | name_error | NameError | 6 |
30
- | 1.9.3 | no_method_error | NoMethodError | 6 |
31
- | 1.9.3 | system_call_error | Errno::ENOENT | 6 |
32
- | 1.9.3 | custom_error | CustomError | 9 |
33
- | 2.0 | runtime_error | RuntimeError | 6 |
34
- | 2.0 | load_error | LoadError | 6 |
35
- | 2.0 | syntax_error | SyntaxError | 6 |
36
- | 2.0 | local_jump_error | LocalJumpError | 7 |
37
- | 2.0 | name_error | NameError | 6 |
38
- | 2.0 | no_method_error | NoMethodError | 6 |
39
- | 2.0 | system_call_error | Errno::ENOENT | 6 |
40
- | 2.0 | custom_error | CustomError | 9 |
41
- | 2.1 | runtime_error | RuntimeError | 6 |
42
- | 2.1 | load_error | LoadError | 6 |
43
- | 2.1 | syntax_error | SyntaxError | 6 |
44
- | 2.1 | local_jump_error | LocalJumpError | 7 |
45
- | 2.1 | name_error | NameError | 6 |
46
- | 2.1 | no_method_error | NoMethodError | 6 |
47
- | 2.1 | system_call_error | Errno::ENOENT | 6 |
48
- | 2.1 | custom_error | CustomError | 9 |
49
- | 2.2 | runtime_error | RuntimeError | 6 |
50
- | 2.2 | load_error | LoadError | 6 |
51
- | 2.2 | syntax_error | SyntaxError | 6 |
52
- | 2.2 | local_jump_error | LocalJumpError | 7 |
53
- | 2.2 | name_error | NameError | 6 |
54
- | 2.2 | no_method_error | NoMethodError | 6 |
55
- | 2.2 | system_call_error | Errno::ENOENT | 6 |
56
- | 2.2 | custom_error | CustomError | 9 |
57
- | 2.3 | runtime_error | RuntimeError | 6 |
58
- | 2.3 | load_error | LoadError | 6 |
59
- | 2.3 | syntax_error | SyntaxError | 6 |
60
- | 2.3 | local_jump_error | LocalJumpError | 7 |
61
- | 2.3 | name_error | NameError | 6 |
62
- | 2.3 | no_method_error | NoMethodError | 6 |
63
- | 2.3 | system_call_error | Errno::ENOENT | 6 |
64
- | 2.3 | custom_error | CustomError | 9 |
65
- | 2.4 | runtime_error | RuntimeError | 6 |
66
- | 2.4 | load_error | LoadError | 6 |
67
- | 2.4 | syntax_error | SyntaxError | 6 |
68
- | 2.4 | local_jump_error | LocalJumpError | 7 |
69
- | 2.4 | name_error | NameError | 6 |
70
- | 2.4 | no_method_error | NoMethodError | 6 |
71
- | 2.4 | system_call_error | Errno::ENOENT | 6 |
72
- | 2.4 | custom_error | CustomError | 9 |
73
- | 2.5 | runtime_error | RuntimeError | 6 |
74
- | 2.5 | load_error | LoadError | 6 |
75
- | 2.5 | syntax_error | SyntaxError | 6 |
76
- | 2.5 | local_jump_error | LocalJumpError | 7 |
77
- | 2.5 | name_error | NameError | 6 |
78
- | 2.5 | no_method_error | NoMethodError | 6 |
79
- | 2.5 | system_call_error | Errno::ENOENT | 6 |
80
- | 2.5 | custom_error | CustomError | 9 |
15
+ | file | error | lineNumber |
16
+ | runtime_error | RuntimeError | 6 |
17
+ | load_error | LoadError | 6 |
18
+ | syntax_error | SyntaxError | 6 |
19
+ | local_jump_error | LocalJumpError | 7 |
20
+ | name_error | NameError | 6 |
21
+ | no_method_error | NoMethodError | 6 |
22
+ | system_call_error | Errno::ENOENT | 6 |
23
+ | custom_error | CustomError | 9 |
81
24
 
82
25
  Scenario Outline: An unhandled error doesn't send a report
83
- And I set environment variable "RUBY_VERSION" to "<ruby version>"
84
- And I have built the service "plain-ruby"
85
- And I run the service "plain-ruby" with the command "bundle exec ruby unhandled/<file>.rb"
26
+ When I run the service "plain-ruby" with the command "bundle exec ruby unhandled/<file>.rb"
86
27
  And I wait for 1 second
87
- Then I should receive 0 requests
28
+ Then I should receive no requests
88
29
 
89
30
  Examples:
90
- | ruby version | file |
91
- | 1.9.3 | interrupt |
92
- | 1.9.3 | system_exit |
93
- | 2.0 | interrupt |
94
- | 2.0 | system_exit |
95
- | 2.1 | interrupt |
96
- | 2.1 | system_exit |
97
- | 2.2 | interrupt |
98
- | 2.2 | system_exit |
99
- | 2.3 | interrupt |
100
- | 2.3 | system_exit |
101
- | 2.4 | interrupt |
102
- | 2.4 | system_exit |
103
- | 2.5 | interrupt |
104
- | 2.5 | system_exit |
31
+ | file |
32
+ | interrupt |
33
+ | system_exit |
@@ -1,65 +1,15 @@
1
1
  Feature: API key
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: Setting api_key in environment variable works
9
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
10
- And I set environment variable "BUGSNAG_API_KEY" to "b35a2a72bd230ac0aa0f52715bbdc6ab"
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 "/api_key/environment" on port "6128<rails_version>"
14
- Then I should receive a request
15
- And the request is a valid for the error reporting API
16
- And the request used the "Ruby Bugsnag Notifier" notifier
17
- And the request contained the api key "b35a2a72bd230ac0aa0f52715bbdc6ab"
18
- And the payload field "events" is an array with 1 element
19
-
20
- Examples:
21
- | ruby_version | rails_version |
22
- | 2.0 | 3 |
23
- | 2.1 | 3 |
24
- | 2.2 | 3 |
25
- | 2.2 | 4 |
26
- | 2.2 | 5 |
27
- | 2.3 | 3 |
28
- | 2.3 | 4 |
29
- | 2.3 | 5 |
30
- | 2.4 | 3 |
31
- | 2.4 | 5 |
32
- | 2.5 | 3 |
33
- | 2.5 | 5 |
34
- | 2.5 | 6 |
35
- | 2.6 | 5 |
36
- | 2.6 | 6 |
37
-
3
+ @rails3 @rails4 @rails5 @rails6
4
+ Scenario: Setting api_key in environment variable works
5
+ Given I start the rails service
6
+ When I navigate to the route "/api_key/environment" 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
+
10
+ @rails3 @rails4 @rails5 @rails6
38
11
  Scenario Outline: Changing api_key after initializer works
39
- Given I set environment variable "RUBY_VERSION" to "<ruby_version>"
40
- And I start the service "rails<rails_version>"
41
- And I wait for the app to respond on port "6128<rails_version>"
42
- When I navigate to the route "/api_key/changing?api_key=c35a2a72bd230ac0aa0f52715bbdc6ac" on port "6128<rails_version>"
43
- Then I should receive a request
44
- And the request is a valid for the error reporting API
45
- And the request used the "Ruby Bugsnag Notifier" notifier
46
- And the request contained the api key "c35a2a72bd230ac0aa0f52715bbdc6ac"
47
- And the payload field "events" is an array with 1 element
48
-
49
- Examples:
50
- | ruby_version | rails_version |
51
- | 2.0 | 3 |
52
- | 2.1 | 3 |
53
- | 2.2 | 3 |
54
- | 2.2 | 4 |
55
- | 2.2 | 5 |
56
- | 2.3 | 3 |
57
- | 2.3 | 4 |
58
- | 2.3 | 5 |
59
- | 2.4 | 3 |
60
- | 2.4 | 5 |
61
- | 2.5 | 3 |
62
- | 2.5 | 5 |
63
- | 2.5 | 6 |
64
- | 2.6 | 5 |
65
- | 2.6 | 6 |
12
+ Given I start the rails service
13
+ When I navigate to the route "/api_key/changing?api_key=c35a2a72bd230ac0aa0f52715bbdc6ac" on the rails app
14
+ And I wait to receive a request
15
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"