bugsnag 6.8.0 → 6.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +1 -0
  3. data/.travis.yml +12 -7
  4. data/CHANGELOG.md +12 -0
  5. data/README.md +1 -1
  6. data/VERSION +1 -1
  7. data/features/.gitignore +1 -0
  8. data/features/delayed_job.feature +53 -0
  9. data/features/fixtures/delayed_job/Dockerfile +10 -5
  10. data/features/fixtures/delayed_job/app/.gitignore +21 -0
  11. data/features/fixtures/delayed_job/app/Gemfile +57 -0
  12. data/features/fixtures/delayed_job/app/README.md +24 -0
  13. data/features/fixtures/delayed_job/app/Rakefile +6 -0
  14. data/features/fixtures/delayed_job/app/app/assets/config/manifest.js +3 -0
  15. data/features/fixtures/delayed_job/app/app/assets/images/.keep +0 -0
  16. data/features/fixtures/delayed_job/app/app/assets/javascripts/application.js +16 -0
  17. data/features/fixtures/delayed_job/app/app/assets/javascripts/cable.js +13 -0
  18. data/features/fixtures/delayed_job/app/app/assets/javascripts/channels/.keep +0 -0
  19. data/features/fixtures/delayed_job/app/app/assets/stylesheets/application.css +15 -0
  20. data/features/fixtures/delayed_job/app/app/channels/application_cable/channel.rb +4 -0
  21. data/features/fixtures/delayed_job/app/app/channels/application_cable/connection.rb +4 -0
  22. data/features/fixtures/delayed_job/app/app/controllers/application_controller.rb +3 -0
  23. data/features/fixtures/delayed_job/app/app/controllers/concerns/.keep +0 -0
  24. data/features/fixtures/delayed_job/app/app/helpers/application_helper.rb +2 -0
  25. data/features/fixtures/delayed_job/app/app/jobs/application_job.rb +2 -0
  26. data/features/fixtures/delayed_job/app/app/mailers/application_mailer.rb +4 -0
  27. data/features/fixtures/delayed_job/app/app/models/application_record.rb +3 -0
  28. data/features/fixtures/delayed_job/app/app/models/concerns/.keep +0 -0
  29. data/features/fixtures/delayed_job/app/app/models/test_model.rb +10 -0
  30. data/features/fixtures/delayed_job/app/app/views/layouts/application.html.erb +14 -0
  31. data/features/fixtures/delayed_job/app/app/views/layouts/mailer.html.erb +13 -0
  32. data/features/fixtures/delayed_job/app/app/views/layouts/mailer.text.erb +1 -0
  33. data/features/fixtures/delayed_job/app/config.ru +5 -0
  34. data/features/fixtures/delayed_job/app/config/application.rb +15 -0
  35. data/features/fixtures/delayed_job/app/config/boot.rb +3 -0
  36. data/features/fixtures/delayed_job/app/config/cable.yml +9 -0
  37. data/features/fixtures/delayed_job/app/config/database.yml +25 -0
  38. data/features/fixtures/delayed_job/app/config/environment.rb +5 -0
  39. data/features/fixtures/delayed_job/app/config/environments/development.rb +54 -0
  40. data/features/fixtures/delayed_job/app/config/environments/production.rb +86 -0
  41. data/features/fixtures/delayed_job/app/config/environments/test.rb +42 -0
  42. data/features/fixtures/delayed_job/app/config/initializers/application_controller_renderer.rb +8 -0
  43. data/features/fixtures/delayed_job/app/config/initializers/assets.rb +11 -0
  44. data/features/fixtures/delayed_job/app/config/initializers/backtrace_silencers.rb +7 -0
  45. data/features/fixtures/delayed_job/app/config/initializers/bugsnag.rb +14 -0
  46. data/features/fixtures/delayed_job/app/config/initializers/cookies_serializer.rb +5 -0
  47. data/features/fixtures/delayed_job/app/config/initializers/delayed_job.rb +3 -0
  48. data/features/fixtures/delayed_job/app/config/initializers/filter_parameter_logging.rb +4 -0
  49. data/features/fixtures/delayed_job/app/config/initializers/inflections.rb +16 -0
  50. data/features/fixtures/delayed_job/app/config/initializers/mime_types.rb +4 -0
  51. data/features/fixtures/delayed_job/app/config/initializers/new_framework_defaults.rb +26 -0
  52. data/features/fixtures/delayed_job/app/config/initializers/session_store.rb +3 -0
  53. data/features/fixtures/delayed_job/app/config/initializers/wrap_parameters.rb +14 -0
  54. data/features/fixtures/delayed_job/app/config/locales/en.yml +23 -0
  55. data/features/fixtures/delayed_job/app/config/puma.rb +47 -0
  56. data/features/fixtures/delayed_job/app/config/routes.rb +3 -0
  57. data/features/fixtures/delayed_job/app/config/secrets.yml +22 -0
  58. data/features/fixtures/delayed_job/app/config/spring.rb +6 -0
  59. data/features/fixtures/delayed_job/app/db/migrate/20181024232549_create_delayed_jobs.rb +22 -0
  60. data/features/fixtures/delayed_job/app/db/migrate/20181024232817_create_test_models.rb +8 -0
  61. data/features/fixtures/delayed_job/app/db/schema.rb +30 -0
  62. data/features/fixtures/delayed_job/app/db/seeds.rb +7 -0
  63. data/features/fixtures/delayed_job/app/lib/assets/.keep +0 -0
  64. data/features/fixtures/delayed_job/app/lib/tasks/.keep +0 -0
  65. data/features/fixtures/delayed_job/app/log/.keep +0 -0
  66. data/features/fixtures/delayed_job/app/public/404.html +67 -0
  67. data/features/fixtures/delayed_job/app/public/422.html +67 -0
  68. data/features/fixtures/delayed_job/app/public/500.html +66 -0
  69. data/features/fixtures/delayed_job/app/public/apple-touch-icon-precomposed.png +0 -0
  70. data/features/fixtures/delayed_job/app/public/apple-touch-icon.png +0 -0
  71. data/features/fixtures/delayed_job/app/public/favicon.ico +0 -0
  72. data/features/fixtures/delayed_job/app/public/robots.txt +5 -0
  73. data/features/fixtures/delayed_job/app/test/controllers/.keep +0 -0
  74. data/features/fixtures/delayed_job/app/test/fixtures/.keep +0 -0
  75. data/features/fixtures/delayed_job/app/test/fixtures/files/.keep +0 -0
  76. data/features/fixtures/delayed_job/app/test/fixtures/test_models.yml +11 -0
  77. data/features/fixtures/delayed_job/app/test/helpers/.keep +0 -0
  78. data/features/fixtures/delayed_job/app/test/integration/.keep +0 -0
  79. data/features/fixtures/delayed_job/app/test/mailers/.keep +0 -0
  80. data/features/fixtures/delayed_job/app/test/models/.keep +0 -0
  81. data/features/fixtures/delayed_job/app/test/models/test_model_test.rb +7 -0
  82. data/features/fixtures/delayed_job/app/test/test_helper.rb +10 -0
  83. data/features/fixtures/delayed_job/app/tmp/.keep +0 -0
  84. data/features/fixtures/docker-compose.yml +24 -4
  85. data/features/sidekiq.feature +3 -1
  86. data/features/steps/ruby_notifier_steps.rb +0 -33
  87. data/features/support/env.rb +18 -0
  88. data/lib/bugsnag.rb +1 -0
  89. data/lib/bugsnag/integrations/delayed_job.rb +21 -78
  90. data/lib/bugsnag/integrations/sidekiq.rb +34 -19
  91. data/lib/bugsnag/middleware/delayed_job.rb +73 -0
  92. data/spec/integrations/sidekiq_spec.rb +51 -16
  93. metadata +80 -6
  94. data/features/fixtures/delayed_job/.dockerignore +0 -1
  95. data/features/fixtures/delayed_job/Gemfile +0 -4
  96. data/spec/integrations/delayed_job_spec.rb +0 -118
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
3
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rails secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 5bbdeedb5f00f9af930e144daef68828cbed84586a9e59880c0865e1759974a1b16f8f568d59da1e6d2891e40c06c9cdda35a897ab9e87048388b661c1b861d3
15
+
16
+ test:
17
+ secret_key_base: 124f3db03c0ca01dc5e19e50e7993b7305dd05841a62c5c54886204f30679a96e514ce9aae9ef17b291510efc87de8d207f7511931e4f80b5f6e06160a74ef6e
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,6 @@
1
+ %w(
2
+ .ruby-version
3
+ .rbenv-vars
4
+ tmp/restart.txt
5
+ tmp/caching-dev.txt
6
+ ).each { |path| Spring.watch(path) }
@@ -0,0 +1,22 @@
1
+ class CreateDelayedJobs < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ create_table :delayed_jobs, force: true do |table|
4
+ table.integer :priority, default: 0, null: false # Allows some jobs to jump to the front of the queue
5
+ table.integer :attempts, default: 0, null: false # Provides for retries, but still fail eventually.
6
+ table.text :handler, null: false # YAML-encoded string of the object that will do work
7
+ table.text :last_error # reason for last failure (See Note below)
8
+ table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
9
+ table.datetime :locked_at # Set when a client is working on this object
10
+ table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
11
+ table.string :locked_by # Who is working on this object (if locked)
12
+ table.string :queue # The name of the queue this job is in
13
+ table.timestamps null: true
14
+ end
15
+
16
+ add_index :delayed_jobs, [:priority, :run_at], name: "delayed_jobs_priority"
17
+ end
18
+
19
+ def self.down
20
+ drop_table :delayed_jobs
21
+ end
22
+ end
@@ -0,0 +1,8 @@
1
+ class CreateTestModels < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :test_models do |t|
4
+
5
+ t.timestamps
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,30 @@
1
+ # This file is auto-generated from the current state of the database. Instead
2
+ # of editing this file, please use the migrations feature of Active Record to
3
+ # incrementally modify your database, and then regenerate this schema definition.
4
+ #
5
+ # Note that this schema.rb definition is the authoritative source for your
6
+ # database schema. If you need to create the application database on another
7
+ # system, you should be using db:schema:load, not running all the migrations
8
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
10
+ #
11
+ # It's strongly recommended that you check this file into your version control system.
12
+
13
+ ActiveRecord::Schema.define(version: 20181024232549) do
14
+
15
+ create_table "delayed_jobs", force: :cascade do |t|
16
+ t.integer "priority", default: 0, null: false
17
+ t.integer "attempts", default: 0, null: false
18
+ t.text "handler", null: false
19
+ t.text "last_error"
20
+ t.datetime "run_at"
21
+ t.datetime "locked_at"
22
+ t.datetime "failed_at"
23
+ t.string "locked_by"
24
+ t.string "queue"
25
+ t.datetime "created_at"
26
+ t.datetime "updated_at"
27
+ t.index ["priority", "run_at"], name: "delayed_jobs_priority"
28
+ end
29
+
30
+ 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 rails db:seed command (or created alongside the database with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
7
+ # Character.create(name: 'Luke', movie: movies.first)
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the '{}' from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class TestModelTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,10 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7
+ fixtures :all
8
+
9
+ # Add more helper methods to be used by all tests here...
10
+ end
@@ -41,11 +41,31 @@ services:
41
41
  build:
42
42
  context: delayed_job
43
43
  args:
44
- ruby_version: 2.0
45
- depends_on:
46
- - redis
44
+ ruby_version: 2.5
47
45
  environment:
48
- - endpoint
46
+ - BUGSNAG_API_KEY
47
+ - http_proxy
48
+ - MAZE_API_KEY
49
+ - MAZE_APP_TYPE
50
+ - MAZE_APP_VERSION
51
+ - MAZE_AUTO_CAPTURE_SESSIONS
52
+ - MAZE_AUTO_NOTIFY
53
+ - BUGSNAG_ENDPOINT
54
+ - MAZE_IGNORE_CLASS
55
+ - MAZE_IGNORE_MESSAGE
56
+ - MAZE_META_DATA_FILTERS
57
+ - MAZE_NOTIFY_RELEASE_STAGE
58
+ - MAZE_PROJECT_ROOT
59
+ - MAZE_PROXY_HOST
60
+ - MAZE_PROXY_PASSWORD
61
+ - MAZE_PROXY_PORT
62
+ - MAZE_PROXY_USER
63
+ - MAZE_RELEASE_STAGE
64
+ - MAZE_SEND_CODE
65
+ - MAZE_SEND_ENVIRONMENT
66
+ - MAZE_SESSION_ENDPOINT
67
+ - MAZE_TIMEOUT
68
+ - CALLBACK_INITIATOR
49
69
  restart: "no"
50
70
 
51
71
  rack1:
@@ -18,6 +18,7 @@ Scenario Outline: An unhandled RuntimeError sends a report
18
18
  And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
19
19
  And the event "unhandled" is true
20
20
  And the event "severity" is "error"
21
+ And the event "context" is "UnhandledError@default"
21
22
  And the event "severityReason.type" is "unhandledExceptionMiddleware"
22
23
  And the event "severityReason.attributes.framework" is "Sidekiq"
23
24
  And the exception "errorClass" equals "RuntimeError"
@@ -62,6 +63,7 @@ Scenario Outline: A handled RuntimeError can be notified
62
63
  And the request used payload v4 headers
63
64
  And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
64
65
  And the event "unhandled" is false
66
+ And the event "context" is "HandledError@default"
65
67
  And the event "severity" is "warning"
66
68
  And the event "severityReason.type" is "handledException"
67
69
  And the exception "errorClass" equals "RuntimeError"
@@ -93,4 +95,4 @@ Scenario Outline: A handled RuntimeError can be notified
93
95
  | 2.5 | ~> 2 | false |
94
96
  | 2.5 | ~> 3 | true |
95
97
  | 2.5 | ~> 4 | true |
96
- | 2.5 | ~> 5 | true |
98
+ | 2.5 | ~> 5 | true |
@@ -7,23 +7,6 @@ When("I configure the bugsnag endpoint") do
7
7
  }
8
8
  end
9
9
 
10
- When("I wait for the app to respond on port {string}") do |port|
11
- max_attempts = ENV.include?('MAX_MAZE_CONNECT_ATTEMPTS')? ENV['MAX_MAZE_CONNECT_ATTEMPTS'].to_i : 10
12
- attempts = 0
13
- up = false
14
- until (attempts >= max_attempts) || up
15
- attempts += 1
16
- begin
17
- uri = URI("http://localhost:#{port}/")
18
- response = Net::HTTP.get_response(uri)
19
- up = (response.code == "200")
20
- rescue EOFError
21
- end
22
- sleep 1
23
- end
24
- raise "App not ready in time!" unless up
25
- end
26
-
27
10
  When("I navigate to the route {string} on port {string}") do |route, port|
28
11
  steps %Q{
29
12
  When I open the URL "http://localhost:#{port}#{route}"
@@ -46,22 +29,6 @@ When("I set environment variable {string} to the proxy settings with credentials
46
29
  When I set environment variable "#{env_var}" to "#{credentials}@#{current_ip}:#{MOCK_API_PORT}"
47
30
  }
48
31
  end
49
-
50
- Then("the request used payload v4 headers") do
51
- steps %Q{
52
- Then the "bugsnag-api-key" header is not null
53
- And the "bugsnag-payload-version" header equals "4.0"
54
- And the "bugsnag-sent-at" header is a timestamp
55
- }
56
- end
57
-
58
- Then("the request contained the api key {string}") do |api_key|
59
- steps %Q{
60
- Then the "bugsnag-api-key" header equals "#{api_key}"
61
- And the payload field "apiKey" equals "#{api_key}"
62
- }
63
- end
64
-
65
32
  Then("the request used the Ruby notifier") do
66
33
  bugsnag_regex = /^http(s?):\/\/www.bugsnag.com/
67
34
  steps %Q{