diff --git a/Gemfile b/Gemfile index 87e38b2fc..c6774981f 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,6 @@ end group :maze, optional: true do gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner' if RUBY_VERSION >= '2.0.0' - gem 'os' end gemspec diff --git a/features/delayed_job.feature b/features/delayed_job.feature index aa3f4a591..73e073181 100644 --- a/features/delayed_job.feature +++ b/features/delayed_job.feature @@ -2,7 +2,6 @@ Feature: Bugsnag detects errors in Delayed job workers Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I configure the bugsnag endpoint Scenario: An unhandled RuntimeError sends a report with arguments @@ -11,14 +10,14 @@ Scenario: An unhandled RuntimeError sends a report with arguments And I run the command "bundle exec rails runner 'TestModel.delay.fail_with_args(\"Test\")'" on the service "delayed_job" And I wait for 5 seconds Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "unhandled" is true - And the event "severity" is "error" - And the event "context" is "TestModel.fail_with_args" - And the event "severityReason.type" is "unhandledExceptionMiddleware" - And the event "severityReason.attributes.framework" is "DelayedJob" + And the event "severity" equals "error" + And the event "context" equals "TestModel.fail_with_args" + And the event "severityReason.type" equals "unhandledExceptionMiddleware" + And the event "severityReason.attributes.framework" equals "DelayedJob" And the exception "errorClass" equals "RuntimeError" And the event "metaData.job.class" equals "Delayed::Backend::ActiveRecord::Job" And the event "metaData.job.id" is not null @@ -35,13 +34,13 @@ Scenario: A handled exception sends a report And I run the command "bundle exec rails runner 'TestModel.delay.notify_with_args(\"Test\")'" on the service "delayed_job" And I wait for 5 seconds Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "unhandled" is false - And the event "severity" is "warning" - And the event "context" is "TestModel.notify_with_args" - And the event "severityReason.type" is "handledException" + And the event "severity" equals "warning" + And the event "context" equals "TestModel.notify_with_args" + And the event "severityReason.type" equals "handledException" And the exception "errorClass" equals "RuntimeError" And the event "metaData.job.class" equals "Delayed::Backend::ActiveRecord::Job" And the event "metaData.job.id" is not null diff --git a/features/fixtures/delayed_job/Dockerfile b/features/fixtures/delayed_job/Dockerfile index 8ea2c2b95..015115169 100644 --- a/features/fixtures/delayed_job/Dockerfile +++ b/features/fixtures/delayed_job/Dockerfile @@ -1,5 +1,5 @@ -ARG ruby_version -FROM ruby:$ruby_version +ARG RUBY_VERSION +FROM ruby:$RUBY_VERSION WORKDIR /bugsnag COPY temp-bugsnag-lib ./ diff --git a/features/fixtures/delayed_job/app/config/initializers/bugsnag.rb b/features/fixtures/delayed_job/app/config/initializers/bugsnag.rb index 001b5f430..da2c39de9 100644 --- a/features/fixtures/delayed_job/app/config/initializers/bugsnag.rb +++ b/features/fixtures/delayed_job/app/config/initializers/bugsnag.rb @@ -1,14 +1,14 @@ Bugsnag.configure do |config| - config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["MAZE_API_KEY"] - config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] - config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] - config.app_type = ENV["MAZE_APP_TYPE"] if ENV.include? "MAZE_APP_TYPE" - config.app_version = ENV["MAZE_APP_VERSION"] if ENV.include? "MAZE_APP_VERSION" - config.auto_notify = ENV["MAZE_AUTO_NOTIFY"] != "false" - config.project_root = ENV["MAZE_PROJECT_ROOT"] if ENV.include? "MAZE_PROJECT_ROOT" - config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["MAZE_IGNORE_CLASS"] } if ENV.include? "MAZE_IGNORE_CLASS" - config.auto_capture_sessions = ENV["MAZE_AUTO_CAPTURE_SESSIONS"] == "true" - config.release_stage = ENV["MAZE_RELEASE_STAGE"] if ENV.include? "MAZE_RELEASE_STAGE" - config.send_code = ENV["MAZE_SEND_CODE"] != "false" - config.send_environment = ENV["MAZE_SEND_ENVIRONMENT"] == "true" + config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["BUGSNAG_API_KEY"] + config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["BUGSNAG_ENDPOINT"] + config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["BUGSNAG_ENDPOINT"] + config.app_type = ENV["BUGSNAG_APP_TYPE"] if ENV.include? "BUGSNAG_APP_TYPE" + config.app_version = ENV["BUGSNAG_APP_VERSION"] if ENV.include? "BUGSNAG_APP_VERSION" + config.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false" + config.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT" + config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS" + config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" + config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE" + config.send_code = ENV["BUGSNAG_SEND_CODE"] != "false" + config.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] == "true" end diff --git a/features/fixtures/docker-compose.yml b/features/fixtures/docker-compose.yml index c91438c87..f77ff392b 100644 --- a/features/fixtures/docker-compose.yml +++ b/features/fixtures/docker-compose.yml @@ -14,26 +14,25 @@ services: - BUGSNAG_API_KEY - http_proxy - https_proxy - - MAZE_API_KEY - - MAZE_APP_TYPE - - MAZE_APP_VERSION - - MAZE_AUTO_CAPTURE_SESSIONS - - MAZE_AUTO_NOTIFY - - MAZE_ENDPOINT - - MAZE_IGNORE_CLASS - - MAZE_IGNORE_MESSAGE - - MAZE_META_DATA_FILTERS - - MAZE_NOTIFY_RELEASE_STAGE - - MAZE_PROJECT_ROOT - - MAZE_PROXY_HOST - - MAZE_PROXY_PASSWORD - - MAZE_PROXY_PORT - - MAZE_PROXY_USER - - MAZE_RELEASE_STAGE - - MAZE_SEND_CODE - - MAZE_SEND_ENVIRONMENT - - MAZE_SESSION_ENDPOINT - - MAZE_TIMEOUT + - BUGSNAG_APP_TYPE + - BUGSNAG_APP_VERSION + - BUGSNAG_AUTO_CAPTURE_SESSIONS + - BUGSNAG_AUTO_NOTIFY + - BUGSNAG_ENDPOINT + - BUGSNAG_IGNORE_CLASS + - BUGSNAG_IGNORE_MESSAGE + - BUGSNAG_META_DATA_FILTERS + - BUGSNAG_NOTIFY_RELEASE_STAGE + - BUGSNAG_PROJECT_ROOT + - BUGSNAG_PROXY_HOST + - BUGSNAG_PROXY_PASSWORD + - BUGSNAG_PROXY_PORT + - BUGSNAG_PROXY_USER + - BUGSNAG_RELEASE_STAGE + - BUGSNAG_SEND_CODE + - BUGSNAG_SEND_ENVIRONMENT + - BUGSNAG_SESSION_ENDPOINT + - BUGSNAG_TIMEOUT - CALLBACK_INITIATOR restart: "no" @@ -41,30 +40,29 @@ services: build: context: delayed_job args: - ruby_version: 2.5 + RUBY_VERSION: 2.5 environment: - BUGSNAG_API_KEY - http_proxy - - MAZE_API_KEY - - MAZE_APP_TYPE - - MAZE_APP_VERSION - - MAZE_AUTO_CAPTURE_SESSIONS - - MAZE_AUTO_NOTIFY + - BUGSNAG_APP_TYPE + - BUGSNAG_APP_VERSION + - BUGSNAG_AUTO_CAPTURE_SESSIONS + - BUGSNAG_AUTO_NOTIFY - BUGSNAG_ENDPOINT - - MAZE_IGNORE_CLASS - - MAZE_IGNORE_MESSAGE - - MAZE_META_DATA_FILTERS - - MAZE_NOTIFY_RELEASE_STAGE - - MAZE_PROJECT_ROOT - - MAZE_PROXY_HOST - - MAZE_PROXY_PASSWORD - - MAZE_PROXY_PORT - - MAZE_PROXY_USER - - MAZE_RELEASE_STAGE - - MAZE_SEND_CODE - - MAZE_SEND_ENVIRONMENT - - MAZE_SESSION_ENDPOINT - - MAZE_TIMEOUT + - BUGSNAG_IGNORE_CLASS + - BUGSNAG_IGNORE_MESSAGE + - BUGSNAG_META_DATA_FILTERS + - BUGSNAG_NOTIFY_RELEASE_STAGE + - BUGSNAG_PROJECT_ROOT + - BUGSNAG_PROXY_HOST + - BUGSNAG_PROXY_PASSWORD + - BUGSNAG_PROXY_PORT + - BUGSNAG_PROXY_USER + - BUGSNAG_RELEASE_STAGE + - BUGSNAG_SEND_CODE + - BUGSNAG_SEND_ENVIRONMENT + - BUGSNAG_SESSION_ENDPOINT + - BUGSNAG_TIMEOUT - CALLBACK_INITIATOR restart: "no" @@ -72,7 +70,7 @@ services: build: context: rack1 args: - - ruby_version + - RUBY_VERSION environment: - endpoint ports: @@ -82,7 +80,7 @@ services: build: context: rack2 args: - - ruby_version + - RUBY_VERSION environment: - endpoint ports: @@ -99,26 +97,25 @@ services: - BUGSNAG_API_KEY - http_proxy - RAILS_ENV - - MAZE_API_KEY - - MAZE_APP_TYPE - - MAZE_APP_VERSION - - MAZE_AUTO_CAPTURE_SESSIONS - - MAZE_AUTO_NOTIFY - - MAZE_ENDPOINT - - MAZE_IGNORE_CLASS - - MAZE_IGNORE_MESSAGE - - MAZE_META_DATA_FILTERS - - MAZE_NOTIFY_RELEASE_STAGE - - MAZE_PROJECT_ROOT - - MAZE_PROXY_HOST - - MAZE_PROXY_PASSWORD - - MAZE_PROXY_PORT - - MAZE_PROXY_USER - - MAZE_RELEASE_STAGE - - MAZE_SEND_CODE - - MAZE_SEND_ENVIRONMENT - - MAZE_SESSION_ENDPOINT - - MAZE_TIMEOUT + - BUGSNAG_APP_TYPE + - BUGSNAG_APP_VERSION + - BUGSNAG_AUTO_CAPTURE_SESSIONS + - BUGSNAG_AUTO_NOTIFY + - BUGSNAG_ENDPOINT + - BUGSNAG_IGNORE_CLASS + - BUGSNAG_IGNORE_MESSAGE + - BUGSNAG_META_DATA_FILTERS + - BUGSNAG_NOTIFY_RELEASE_STAGE + - BUGSNAG_PROJECT_ROOT + - BUGSNAG_PROXY_HOST + - BUGSNAG_PROXY_PASSWORD + - BUGSNAG_PROXY_PORT + - BUGSNAG_PROXY_USER + - BUGSNAG_RELEASE_STAGE + - BUGSNAG_SEND_CODE + - BUGSNAG_SEND_ENVIRONMENT + - BUGSNAG_SESSION_ENDPOINT + - BUGSNAG_TIMEOUT - CALLBACK_INITIATOR ports: - target: 3000 @@ -135,26 +132,25 @@ services: - BUGSNAG_API_KEY - http_proxy - RAILS_ENV - - MAZE_API_KEY - - MAZE_APP_TYPE - - MAZE_APP_VERSION - - MAZE_AUTO_CAPTURE_SESSIONS - - MAZE_AUTO_NOTIFY - - MAZE_ENDPOINT - - MAZE_IGNORE_CLASS - - MAZE_IGNORE_MESSAGE - - MAZE_META_DATA_FILTERS - - MAZE_NOTIFY_RELEASE_STAGE - - MAZE_PROJECT_ROOT - - MAZE_PROXY_HOST - - MAZE_PROXY_PASSWORD - - MAZE_PROXY_PORT - - MAZE_PROXY_USER - - MAZE_RELEASE_STAGE - - MAZE_SEND_CODE - - MAZE_SEND_ENVIRONMENT - - MAZE_SESSION_ENDPOINT - - MAZE_TIMEOUT + - BUGSNAG_APP_TYPE + - BUGSNAG_APP_VERSION + - BUGSNAG_AUTO_CAPTURE_SESSIONS + - BUGSNAG_AUTO_NOTIFY + - BUGSNAG_ENDPOINT + - BUGSNAG_IGNORE_CLASS + - BUGSNAG_IGNORE_MESSAGE + - BUGSNAG_META_DATA_FILTERS + - BUGSNAG_NOTIFY_RELEASE_STAGE + - BUGSNAG_PROJECT_ROOT + - BUGSNAG_PROXY_HOST + - BUGSNAG_PROXY_PASSWORD + - BUGSNAG_PROXY_PORT + - BUGSNAG_PROXY_USER + - BUGSNAG_RELEASE_STAGE + - BUGSNAG_SEND_CODE + - BUGSNAG_SEND_ENVIRONMENT + - BUGSNAG_SESSION_ENDPOINT + - BUGSNAG_TIMEOUT - CALLBACK_INITIATOR ports: - target: 3000 @@ -171,26 +167,25 @@ services: - BUGSNAG_API_KEY - http_proxy - RAILS_ENV - - MAZE_API_KEY - - MAZE_APP_TYPE - - MAZE_APP_VERSION - - MAZE_AUTO_CAPTURE_SESSIONS - - MAZE_AUTO_NOTIFY - - MAZE_ENDPOINT - - MAZE_IGNORE_CLASS - - MAZE_IGNORE_MESSAGE - - MAZE_META_DATA_FILTERS - - MAZE_NOTIFY_RELEASE_STAGE - - MAZE_PROJECT_ROOT - - MAZE_PROXY_HOST - - MAZE_PROXY_PASSWORD - - MAZE_PROXY_PORT - - MAZE_PROXY_USER - - MAZE_RELEASE_STAGE - - MAZE_SEND_CODE - - MAZE_SEND_ENVIRONMENT - - MAZE_SESSION_ENDPOINT - - MAZE_TIMEOUT + - BUGSNAG_APP_TYPE + - BUGSNAG_APP_VERSION + - BUGSNAG_AUTO_CAPTURE_SESSIONS + - BUGSNAG_AUTO_NOTIFY + - BUGSNAG_ENDPOINT + - BUGSNAG_IGNORE_CLASS + - BUGSNAG_IGNORE_MESSAGE + - BUGSNAG_META_DATA_FILTERS + - BUGSNAG_NOTIFY_RELEASE_STAGE + - BUGSNAG_PROJECT_ROOT + - BUGSNAG_PROXY_HOST + - BUGSNAG_PROXY_PASSWORD + - BUGSNAG_PROXY_PORT + - BUGSNAG_PROXY_USER + - BUGSNAG_RELEASE_STAGE + - BUGSNAG_SEND_CODE + - BUGSNAG_SEND_ENVIRONMENT + - BUGSNAG_SESSION_ENDPOINT + - BUGSNAG_TIMEOUT - CALLBACK_INITIATOR ports: - target: 3000 @@ -221,26 +216,25 @@ services: environment: - BUGSNAG_API_KEY - http_proxy - - MAZE_API_KEY - - MAZE_APP_TYPE - - MAZE_APP_VERSION - - MAZE_AUTO_CAPTURE_SESSIONS - - MAZE_AUTO_NOTIFY - - MAZE_ENDPOINT - - MAZE_IGNORE_CLASS - - MAZE_IGNORE_MESSAGE - - MAZE_META_DATA_FILTERS - - MAZE_NOTIFY_RELEASE_STAGE - - MAZE_PROJECT_ROOT - - MAZE_PROXY_HOST - - MAZE_PROXY_PASSWORD - - MAZE_PROXY_PORT - - MAZE_PROXY_USER - - MAZE_RELEASE_STAGE - - MAZE_SEND_CODE - - MAZE_SEND_ENVIRONMENT - - MAZE_SESSION_ENDPOINT - - MAZE_TIMEOUT + - BUGSNAG_APP_TYPE + - BUGSNAG_APP_VERSION + - BUGSNAG_AUTO_CAPTURE_SESSIONS + - BUGSNAG_AUTO_NOTIFY + - BUGSNAG_ENDPOINT + - BUGSNAG_IGNORE_CLASS + - BUGSNAG_IGNORE_MESSAGE + - BUGSNAG_META_DATA_FILTERS + - BUGSNAG_NOTIFY_RELEASE_STAGE + - BUGSNAG_PROJECT_ROOT + - BUGSNAG_PROXY_HOST + - BUGSNAG_PROXY_PASSWORD + - BUGSNAG_PROXY_PORT + - BUGSNAG_PROXY_USER + - BUGSNAG_RELEASE_STAGE + - BUGSNAG_SEND_CODE + - BUGSNAG_SEND_ENVIRONMENT + - BUGSNAG_SESSION_ENDPOINT + - BUGSNAG_TIMEOUT - CALLBACK_INITIATOR restart: "no" @@ -248,7 +242,7 @@ services: build: context: sinatra1 args: - - ruby_version + - RUBY_VERSION environment: - endpoint ports: @@ -259,7 +253,7 @@ services: build: context: sinatra2 args: - - ruby_version + - RUBY_VERSION environment: - endpoint ports: diff --git a/features/fixtures/plain/Dockerfile b/features/fixtures/plain/Dockerfile index f97a18a01..fb2347ff1 100644 --- a/features/fixtures/plain/Dockerfile +++ b/features/fixtures/plain/Dockerfile @@ -1,12 +1,11 @@ ARG RUBY_VERSION FROM ruby:$RUBY_VERSION -ARG APP_PATH +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -RUN mkdir -p $APP_PATH -WORKDIR $APP_PATH - -COPY app/Gemfile $APP_PATH +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install -COPY app $APP_PATH +COPY app/ /usr/src/app diff --git a/features/fixtures/plain/app/Gemfile b/features/fixtures/plain/app/Gemfile index 5e08032a7..262fccad2 100644 --- a/features/fixtures/plain/app/Gemfile +++ b/features/fixtures/plain/app/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'bugsnag' +gem 'bugsnag', path: '/bugsnag' diff --git a/features/fixtures/plain/app/app.rb b/features/fixtures/plain/app/app.rb index 52c58f086..516d84a90 100644 --- a/features/fixtures/plain/app/app.rb +++ b/features/fixtures/plain/app/app.rb @@ -3,31 +3,31 @@ def configure_basics Bugsnag.configure do |conf| - conf.api_key = ENV['MAZE_API_KEY'] - conf.endpoint = ENV['MAZE_ENDPOINT'] - conf.session_endpoint = ENV["MAZE_SESSION_ENDPOINT"] if ENV.include? "MAZE_SESSION_ENDPOINT" + conf.api_key = ENV['BUGSNAG_API_KEY'] + conf.endpoint = ENV['BUGSNAG_ENDPOINT'] + conf.session_endpoint = ENV["BUGSNAG_SESSION_ENDPOINT"] if ENV.include? "BUGSNAG_SESSION_ENDPOINT" end end def configure_using_environment pp ENV Bugsnag.configure do |conf| - conf.app_type = ENV["MAZE_APP_TYPE"] if ENV.include? "MAZE_APP_TYPE" - conf.app_version = ENV["MAZE_APP_VERSION"] if ENV.include? "MAZE_APP_VERSION" - conf.auto_capture_sessions = ENV["MAZE_AUTO_CAPTURE_SESSIONS"] != "false" - conf.auto_notify = ENV["MAZE_AUTO_NOTIFY"] != "false" - conf.ignore_classes << lambda { |ex| ex.class.to_s == ENV["MAZE_IGNORE_CLASS"] } if ENV.include? "MAZE_IGNORE_CLASS" - conf.meta_data_filters << ENV["MAZE_META_DATA_FILTERS"] if ENV.include? "MAZE_META_DATA_FILTERS" - conf.notify_release_stages = [ENV["MAZE_NOTIFY_RELEASE_STAGE"]] if ENV.include? "MAZE_NOTIFY_RELEASE_STAGE" - conf.project_root = ENV["MAZE_PROJECT_ROOT"] if ENV.include? "MAZE_PROJECT_ROOT" - conf.proxy_host = ENV["MAZE_PROXY_HOST"] if ENV.include? "MAZE_PROXY_HOST" - conf.proxy_password = ENV["MAZE_PROXY_PASSWORD"] if ENV.include? "MAZE_PROXY_PASSWORD" - conf.proxy_port = ENV["MAZE_PROXY_PORT"] if ENV.include? "MAZE_PROXY_PORT" - conf.proxy_user = ENV["MAZE_PROXY_USER"] if ENV.include? "MAZE_PROXY_USER" - conf.release_stage = ENV["MAZE_RELEASE_STAGE"] if ENV.include? "MAZE_RELEASE_STAGE" - conf.send_environment = ENV["MAZE_SEND_ENVIRONMENT"] != "false" - conf.send_code = ENV["MAZE_SEND_CODE"] != "false" - conf.timeout = ENV["MAZE_TIMEOUT"] if ENV.include? "MAZE_TIMEOUT" + conf.app_type = ENV["BUGSNAG_APP_TYPE"] if ENV.include? "BUGSNAG_APP_TYPE" + conf.app_version = ENV["BUGSNAG_APP_VERSION"] if ENV.include? "BUGSNAG_APP_VERSION" + conf.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] != "false" + conf.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false" + conf.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS" + conf.meta_data_filters << ENV["BUGSNAG_META_DATA_FILTERS"] if ENV.include? "BUGSNAG_META_DATA_FILTERS" + conf.notify_release_stages = [ENV["BUGSNAG_NOTIFY_RELEASE_STAGE"]] if ENV.include? "BUGSNAG_NOTIFY_RELEASE_STAGE" + conf.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT" + conf.proxy_host = ENV["BUGSNAG_PROXY_HOST"] if ENV.include? "BUGSNAG_PROXY_HOST" + conf.proxy_password = ENV["BUGSNAG_PROXY_PASSWORD"] if ENV.include? "BUGSNAG_PROXY_PASSWORD" + conf.proxy_port = ENV["BUGSNAG_PROXY_PORT"] if ENV.include? "BUGSNAG_PROXY_PORT" + conf.proxy_user = ENV["BUGSNAG_PROXY_USER"] if ENV.include? "BUGSNAG_PROXY_USER" + conf.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE" + conf.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] != "false" + conf.send_code = ENV["BUGSNAG_SEND_CODE"] != "false" + conf.timeout = ENV["BUGSNAG_TIMEOUT"] if ENV.include? "BUGSNAG_TIMEOUT" end end diff --git a/features/fixtures/plain/app/configuration/api_key.rb b/features/fixtures/plain/app/configuration/api_key.rb index ef968d470..324ca4d58 100644 --- a/features/fixtures/plain/app/configuration/api_key.rb +++ b/features/fixtures/plain/app/configuration/api_key.rb @@ -3,7 +3,7 @@ configure_basics Bugsnag.configure do |conf| - conf.api_key = ENV["MAZE_API_KEY"] + conf.api_key = ENV["BUGSNAG_API_KEY"] end Bugsnag.notify(RuntimeError.new("Oh no")) \ No newline at end of file diff --git a/features/fixtures/rack1/Dockerfile b/features/fixtures/rack1/Dockerfile index 3e0f1bb42..2663415a1 100644 --- a/features/fixtures/rack1/Dockerfile +++ b/features/fixtures/rack1/Dockerfile @@ -1,12 +1,13 @@ -ARG ruby_version -FROM ruby:$ruby_version +ARG RUBY_VERSION +FROM ruby:$RUBY_VERSION -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -COPY Gemfile /usr/src/app/ +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install -COPY . /usr/src/app +COPY app/ /usr/src/app CMD ["ruby", "app.rb"] diff --git a/features/fixtures/rack1/Gemfile b/features/fixtures/rack1/Gemfile index 3975e7343..e7f60dd3d 100644 --- a/features/fixtures/rack1/Gemfile +++ b/features/fixtures/rack1/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'bugsnag' +gem 'bugsnag', path: '/bugsnag' gem 'rack', '~> 1' diff --git a/features/fixtures/rack2/Dockerfile b/features/fixtures/rack2/Dockerfile index 3e0f1bb42..2663415a1 100644 --- a/features/fixtures/rack2/Dockerfile +++ b/features/fixtures/rack2/Dockerfile @@ -1,12 +1,13 @@ -ARG ruby_version -FROM ruby:$ruby_version +ARG RUBY_VERSION +FROM ruby:$RUBY_VERSION -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -COPY Gemfile /usr/src/app/ +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install -COPY . /usr/src/app +COPY app/ /usr/src/app CMD ["ruby", "app.rb"] diff --git a/features/fixtures/rack2/Gemfile b/features/fixtures/rack2/Gemfile index 89027d2f2..b0706f46a 100644 --- a/features/fixtures/rack2/Gemfile +++ b/features/fixtures/rack2/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'bugsnag' +gem 'bugsnag', path: '/bugsnag' gem 'rack', '~> 2' diff --git a/features/fixtures/rails3/Dockerfile b/features/fixtures/rails3/Dockerfile index a073afdbe..a94ab5a26 100644 --- a/features/fixtures/rails3/Dockerfile +++ b/features/fixtures/rails3/Dockerfile @@ -1,15 +1,14 @@ ARG RUBY_VERSION FROM ruby:$RUBY_VERSION -ARG APP_PATH +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -RUN mkdir -p $APP_PATH -WORKDIR $APP_PATH - -COPY app/Gemfile $APP_PATH +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install -COPY app $APP_PATH +COPY app/ /usr/src/app RUN bundle exec rake db:migrate diff --git a/features/fixtures/rails3/app/Gemfile b/features/fixtures/rails3/app/Gemfile index ebcdba42d..426d00a90 100644 --- a/features/fixtures/rails3/app/Gemfile +++ b/features/fixtures/rails3/app/Gemfile @@ -8,6 +8,6 @@ gem 'sqlite3' gem 'jquery-rails' -gem "bugsnag" +gem 'bugsnag', path: '/bugsnag' gem "warden" diff --git a/features/fixtures/rails3/app/config/initializers/bugsnag.rb b/features/fixtures/rails3/app/config/initializers/bugsnag.rb index 001b5f430..da2c39de9 100644 --- a/features/fixtures/rails3/app/config/initializers/bugsnag.rb +++ b/features/fixtures/rails3/app/config/initializers/bugsnag.rb @@ -1,14 +1,14 @@ Bugsnag.configure do |config| - config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["MAZE_API_KEY"] - config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] - config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] - config.app_type = ENV["MAZE_APP_TYPE"] if ENV.include? "MAZE_APP_TYPE" - config.app_version = ENV["MAZE_APP_VERSION"] if ENV.include? "MAZE_APP_VERSION" - config.auto_notify = ENV["MAZE_AUTO_NOTIFY"] != "false" - config.project_root = ENV["MAZE_PROJECT_ROOT"] if ENV.include? "MAZE_PROJECT_ROOT" - config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["MAZE_IGNORE_CLASS"] } if ENV.include? "MAZE_IGNORE_CLASS" - config.auto_capture_sessions = ENV["MAZE_AUTO_CAPTURE_SESSIONS"] == "true" - config.release_stage = ENV["MAZE_RELEASE_STAGE"] if ENV.include? "MAZE_RELEASE_STAGE" - config.send_code = ENV["MAZE_SEND_CODE"] != "false" - config.send_environment = ENV["MAZE_SEND_ENVIRONMENT"] == "true" + config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["BUGSNAG_API_KEY"] + config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["BUGSNAG_ENDPOINT"] + config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["BUGSNAG_ENDPOINT"] + config.app_type = ENV["BUGSNAG_APP_TYPE"] if ENV.include? "BUGSNAG_APP_TYPE" + config.app_version = ENV["BUGSNAG_APP_VERSION"] if ENV.include? "BUGSNAG_APP_VERSION" + config.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false" + config.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT" + config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS" + config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" + config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE" + config.send_code = ENV["BUGSNAG_SEND_CODE"] != "false" + config.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] == "true" end diff --git a/features/fixtures/rails4/Dockerfile b/features/fixtures/rails4/Dockerfile index 1f40ad92c..c4755ff11 100644 --- a/features/fixtures/rails4/Dockerfile +++ b/features/fixtures/rails4/Dockerfile @@ -1,15 +1,17 @@ ARG RUBY_VERSION FROM ruby:$RUBY_VERSION -ARG APP_PATH +ARG RUBY_VERSION +FROM ruby:$RUBY_VERSION -RUN mkdir -p $APP_PATH -WORKDIR $APP_PATH +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -COPY app/Gemfile $APP_PATH +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install -COPY app $APP_PATH +COPY app/ /usr/src/app RUN bundle exec rake db:migrate diff --git a/features/fixtures/rails4/app/Gemfile b/features/fixtures/rails4/app/Gemfile index b4ddd7a56..4e130191e 100644 --- a/features/fixtures/rails4/app/Gemfile +++ b/features/fixtures/rails4/app/Gemfile @@ -37,6 +37,6 @@ end # gem 'debugger', group: [:development, :test] # Added at 2018-03-26 15:02:53 +0100 by amoinet: -gem "bugsnag" +gem 'bugsnag', path: '/bugsnag' gem 'devise' \ No newline at end of file diff --git a/features/fixtures/rails4/app/config/initializers/bugsnag.rb b/features/fixtures/rails4/app/config/initializers/bugsnag.rb index 001b5f430..da2c39de9 100644 --- a/features/fixtures/rails4/app/config/initializers/bugsnag.rb +++ b/features/fixtures/rails4/app/config/initializers/bugsnag.rb @@ -1,14 +1,14 @@ Bugsnag.configure do |config| - config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["MAZE_API_KEY"] - config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] - config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] - config.app_type = ENV["MAZE_APP_TYPE"] if ENV.include? "MAZE_APP_TYPE" - config.app_version = ENV["MAZE_APP_VERSION"] if ENV.include? "MAZE_APP_VERSION" - config.auto_notify = ENV["MAZE_AUTO_NOTIFY"] != "false" - config.project_root = ENV["MAZE_PROJECT_ROOT"] if ENV.include? "MAZE_PROJECT_ROOT" - config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["MAZE_IGNORE_CLASS"] } if ENV.include? "MAZE_IGNORE_CLASS" - config.auto_capture_sessions = ENV["MAZE_AUTO_CAPTURE_SESSIONS"] == "true" - config.release_stage = ENV["MAZE_RELEASE_STAGE"] if ENV.include? "MAZE_RELEASE_STAGE" - config.send_code = ENV["MAZE_SEND_CODE"] != "false" - config.send_environment = ENV["MAZE_SEND_ENVIRONMENT"] == "true" + config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["BUGSNAG_API_KEY"] + config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["BUGSNAG_ENDPOINT"] + config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["BUGSNAG_ENDPOINT"] + config.app_type = ENV["BUGSNAG_APP_TYPE"] if ENV.include? "BUGSNAG_APP_TYPE" + config.app_version = ENV["BUGSNAG_APP_VERSION"] if ENV.include? "BUGSNAG_APP_VERSION" + config.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false" + config.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT" + config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS" + config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" + config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE" + config.send_code = ENV["BUGSNAG_SEND_CODE"] != "false" + config.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] == "true" end diff --git a/features/fixtures/rails5/Dockerfile b/features/fixtures/rails5/Dockerfile index 428df9684..d3f42497c 100644 --- a/features/fixtures/rails5/Dockerfile +++ b/features/fixtures/rails5/Dockerfile @@ -1,15 +1,14 @@ ARG RUBY_VERSION FROM ruby:$RUBY_VERSION -ARG APP_PATH +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -RUN mkdir -p $APP_PATH -WORKDIR $APP_PATH - -COPY app/Gemfile $APP_PATH +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install -COPY app $APP_PATH +COPY app/ /usr/src/app RUN bundle exec rake db:migrate diff --git a/features/fixtures/rails5/app/Gemfile b/features/fixtures/rails5/app/Gemfile index f5e8cdb26..822bdee38 100644 --- a/features/fixtures/rails5/app/Gemfile +++ b/features/fixtures/rails5/app/Gemfile @@ -41,7 +41,7 @@ end gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] # Added at 2018-03-26 15:20:23 +0100 by amoinet: -gem "bugsnag" +gem 'bugsnag', path: '/bugsnag' # Added at 2018-04-26 10:20:10 +0100 by amoinet: gem "clearance", "~> 1.16" diff --git a/features/fixtures/rails5/app/config/initializers/bugsnag.rb b/features/fixtures/rails5/app/config/initializers/bugsnag.rb index 001b5f430..da2c39de9 100644 --- a/features/fixtures/rails5/app/config/initializers/bugsnag.rb +++ b/features/fixtures/rails5/app/config/initializers/bugsnag.rb @@ -1,14 +1,14 @@ Bugsnag.configure do |config| - config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["MAZE_API_KEY"] - config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] - config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] - config.app_type = ENV["MAZE_APP_TYPE"] if ENV.include? "MAZE_APP_TYPE" - config.app_version = ENV["MAZE_APP_VERSION"] if ENV.include? "MAZE_APP_VERSION" - config.auto_notify = ENV["MAZE_AUTO_NOTIFY"] != "false" - config.project_root = ENV["MAZE_PROJECT_ROOT"] if ENV.include? "MAZE_PROJECT_ROOT" - config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["MAZE_IGNORE_CLASS"] } if ENV.include? "MAZE_IGNORE_CLASS" - config.auto_capture_sessions = ENV["MAZE_AUTO_CAPTURE_SESSIONS"] == "true" - config.release_stage = ENV["MAZE_RELEASE_STAGE"] if ENV.include? "MAZE_RELEASE_STAGE" - config.send_code = ENV["MAZE_SEND_CODE"] != "false" - config.send_environment = ENV["MAZE_SEND_ENVIRONMENT"] == "true" + config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["BUGSNAG_API_KEY"] + config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["BUGSNAG_ENDPOINT"] + config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["BUGSNAG_ENDPOINT"] + config.app_type = ENV["BUGSNAG_APP_TYPE"] if ENV.include? "BUGSNAG_APP_TYPE" + config.app_version = ENV["BUGSNAG_APP_VERSION"] if ENV.include? "BUGSNAG_APP_VERSION" + config.auto_notify = ENV["BUGSNAG_AUTO_NOTIFY"] != "false" + config.project_root = ENV["BUGSNAG_PROJECT_ROOT"] if ENV.include? "BUGSNAG_PROJECT_ROOT" + config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["BUGSNAG_IGNORE_CLASS"] } if ENV.include? "BUGSNAG_IGNORE_CLASS" + config.auto_capture_sessions = ENV["BUGSNAG_AUTO_CAPTURE_SESSIONS"] == "true" + config.release_stage = ENV["BUGSNAG_RELEASE_STAGE"] if ENV.include? "BUGSNAG_RELEASE_STAGE" + config.send_code = ENV["BUGSNAG_SEND_CODE"] != "false" + config.send_environment = ENV["BUGSNAG_SEND_ENVIRONMENT"] == "true" end diff --git a/features/fixtures/resque/Dockerfile b/features/fixtures/resque/Dockerfile index ce5dce5fc..5e5e0fe62 100644 --- a/features/fixtures/resque/Dockerfile +++ b/features/fixtures/resque/Dockerfile @@ -1,10 +1,11 @@ -ARG ruby_version -FROM ruby:$ruby_version +ARG RUBY_VERSION +FROM ruby:$RUBY_VERSION -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -COPY Gemfile /usr/src/app/ +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install COPY . /usr/src/app diff --git a/features/fixtures/resque/Gemfile b/features/fixtures/resque/Gemfile index 2193d5247..73f483882 100644 --- a/features/fixtures/resque/Gemfile +++ b/features/fixtures/resque/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'bugsnag' +gem 'bugsnag', path: '/bugsnag' gem 'resque' gem 'rake' gem 'redis' diff --git a/features/fixtures/sidekiq/Dockerfile b/features/fixtures/sidekiq/Dockerfile index 36d97a487..516e1466c 100644 --- a/features/fixtures/sidekiq/Dockerfile +++ b/features/fixtures/sidekiq/Dockerfile @@ -1,9 +1,11 @@ ARG RUBY_VERSION FROM ruby:$RUBY_VERSION +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ + ARG APP_PATH -RUN mkdir -p $APP_PATH WORKDIR $APP_PATH ARG SIDEKIQ_VERSION @@ -12,6 +14,6 @@ ENV SIDEKIQ_VERSION $SIDEKIQ_VERSION COPY app/Gemfile $APP_PATH RUN bundle install -COPY app $APP_PATH +COPY app/ $APP_PATH CMD ["bundle", "exec", "sidekiq", "-r", "./app.rb"] \ No newline at end of file diff --git a/features/fixtures/sidekiq/app/Gemfile b/features/fixtures/sidekiq/app/Gemfile index c0c0a20fb..e8a6f9bd4 100644 --- a/features/fixtures/sidekiq/app/Gemfile +++ b/features/fixtures/sidekiq/app/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'bugsnag' +gem 'bugsnag', path: '/bugsnag' gem 'sidekiq', ENV['SIDEKIQ_VERSION'] diff --git a/features/fixtures/sidekiq/app/app.rb b/features/fixtures/sidekiq/app/app.rb index 04b03e45f..44e9b50fe 100644 --- a/features/fixtures/sidekiq/app/app.rb +++ b/features/fixtures/sidekiq/app/app.rb @@ -2,10 +2,10 @@ Bundler.require Bugsnag.configure do |conf| - puts "Configuring `api_key` to #{ENV['MAZE_API_KEY']}" - conf.api_key = ENV['MAZE_API_KEY'] - puts "Configuring `endpoint` to #{ENV['MAZE_ENDPOINT']}" - conf.endpoint = ENV['MAZE_ENDPOINT'] + puts "Configuring `api_key` to #{ENV['BUGSNAG_API_KEY']}" + conf.api_key = ENV['BUGSNAG_API_KEY'] + puts "Configuring `endpoint` to #{ENV['BUGSNAG_ENDPOINT']}" + conf.endpoint = ENV['BUGSNAG_ENDPOINT'] end Sidekiq.configure_client do |config| diff --git a/features/fixtures/sinatra1/Dockerfile b/features/fixtures/sinatra1/Dockerfile index 3e0f1bb42..868172f6a 100644 --- a/features/fixtures/sinatra1/Dockerfile +++ b/features/fixtures/sinatra1/Dockerfile @@ -1,10 +1,11 @@ -ARG ruby_version -FROM ruby:$ruby_version +ARG RUBY_VERSION +FROM ruby:$RUBY_VERSION -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -COPY Gemfile /usr/src/app/ +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install COPY . /usr/src/app diff --git a/features/fixtures/sinatra1/Gemfile b/features/fixtures/sinatra1/Gemfile index 61a130ae4..2c6acdfbe 100644 --- a/features/fixtures/sinatra1/Gemfile +++ b/features/fixtures/sinatra1/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'bugsnag' +gem 'bugsnag', path: '/bugsnag' gem 'sinatra', '~> 1' diff --git a/features/fixtures/sinatra2/Dockerfile b/features/fixtures/sinatra2/Dockerfile index 3e0f1bb42..868172f6a 100644 --- a/features/fixtures/sinatra2/Dockerfile +++ b/features/fixtures/sinatra2/Dockerfile @@ -1,10 +1,11 @@ -ARG ruby_version -FROM ruby:$ruby_version +ARG RUBY_VERSION +FROM ruby:$RUBY_VERSION -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app +WORKDIR /bugsnag +COPY temp-bugsnag-lib ./ -COPY Gemfile /usr/src/app/ +WORKDIR /usr/src/app +COPY app/Gemfile /usr/src/app/ RUN bundle install COPY . /usr/src/app diff --git a/features/fixtures/sinatra2/Gemfile b/features/fixtures/sinatra2/Gemfile index 9db6aca8c..e20c0d612 100644 --- a/features/fixtures/sinatra2/Gemfile +++ b/features/fixtures/sinatra2/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'bugsnag' +gem 'bugsnag', path: '/bugsnag' gem 'sinatra', '~> 2' diff --git a/features/plain_features/add_tab.feature b/features/plain_features/add_tab.feature index 38fa36314..8c5fa58ae 100644 --- a/features/plain_features/add_tab.feature +++ b/features/plain_features/add_tab.feature @@ -2,8 +2,6 @@ Feature: Plain add tab to metadata Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Metadata can be added to a report using add_tab @@ -13,13 +11,13 @@ Scenario Outline: Metadata can be added to a report using add_tab And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/add_tab.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "metaData.additional_metadata.foo" is "foo" - And the event "metaData.additional_metadata.bar.0" is "b" - And the event "metaData.additional_metadata.bar.1" is "a" - And the event "metaData.additional_metadata.bar.2" is "r" + And the event "metaData.additional_metadata.foo" equals "foo" + And the event "metaData.additional_metadata.bar.0" equals "b" + And the event "metaData.additional_metadata.bar.1" equals "a" + And the event "metaData.additional_metadata.bar.2" equals "r" Examples: | ruby version | initiator | @@ -52,15 +50,15 @@ Scenario Outline: Metadata can be added to an existing tab using add_tab And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/add_tab_existing.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "metaData.additional_metadata.foo" is "foo" - And the event "metaData.additional_metadata.bar.0" is "b" - And the event "metaData.additional_metadata.bar.1" is "a" - And the event "metaData.additional_metadata.bar.2" is "r" - And the event "metaData.additional_metadata.foobar.first" is "foo" - And the event "metaData.additional_metadata.foobar.then" is "bar" + And the event "metaData.additional_metadata.foo" equals "foo" + And the event "metaData.additional_metadata.bar.0" equals "b" + And the event "metaData.additional_metadata.bar.1" equals "a" + And the event "metaData.additional_metadata.bar.2" equals "r" + And the event "metaData.additional_metadata.foobar.first" equals "foo" + And the event "metaData.additional_metadata.foobar.then" equals "bar" Examples: | ruby version | initiator | @@ -93,11 +91,11 @@ Scenario Outline: Metadata can be overwritten using add_tab And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/add_tab_override.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "metaData.additional_metadata.foo" is "foo" - And the event "metaData.additional_metadata.bar" is "bar" + And the event "metaData.additional_metadata.foo" equals "foo" + And the event "metaData.additional_metadata.bar" equals "bar" Examples: | ruby version | initiator | diff --git a/features/plain_features/api_key.feature b/features/plain_features/api_key.feature index 91f16c543..ab7e37b51 100644 --- a/features/plain_features/api_key.feature +++ b/features/plain_features/api_key.feature @@ -1,17 +1,16 @@ Feature: API Key configuration options Background: - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: The API key configuration option can be set Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_API_KEY" to "b35a2a72bd230ac0aa0f52715bbdc6aa" + And I set environment variable "BUGSNAG_API_KEY" to "b35a2a72bd230ac0aa0f52715bbdc6aa" And I have built the service "plain-ruby" And I run the service "plain-ruby" with the command "bundle exec ruby configuration/api_key.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "b35a2a72bd230ac0aa0f52715bbdc6aa" diff --git a/features/plain_features/app_type.feature b/features/plain_features/app_type.feature index 8e1b8c804..3215a5677 100644 --- a/features/plain_features/app_type.feature +++ b/features/plain_features/app_type.feature @@ -2,21 +2,19 @@ Feature: App type configuration option Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: The App type configuration option can be set Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_APP_TYPE" to "test_app" + And I set environment variable "BUGSNAG_APP_TYPE" to "test_app" And I have built the service "plain-ruby" And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_handled.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "app.type" is "test_app" + And the event "app.type" equals "test_app" Examples: | ruby version | diff --git a/features/plain_features/app_version.feature b/features/plain_features/app_version.feature index 836bdce30..824dd6162 100644 --- a/features/plain_features/app_version.feature +++ b/features/plain_features/app_version.feature @@ -2,21 +2,19 @@ Feature: App version configuration option Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: The App version configuration option can be set Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_APP_VERSION" to "9.9.8" + And I set environment variable "BUGSNAG_APP_VERSION" to "9.9.8" And I have built the service "plain-ruby" And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_handled.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "app.version" is "9.9.8" + And the event "app.version" equals "9.9.8" Examples: | ruby version | diff --git a/features/plain_features/auto_notify.feature b/features/plain_features/auto_notify.feature index 07722bf41..5b54bce22 100644 --- a/features/plain_features/auto_notify.feature +++ b/features/plain_features/auto_notify.feature @@ -2,13 +2,11 @@ Feature: Auto notify configuration option Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: When Auto-notify is false notifications are not sent Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_AUTO_NOTIFY" to "false" + And I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false" And I have built the service "plain-ruby" And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_unhandled.rb" And I wait for 1 second diff --git a/features/plain_features/delivery.feature b/features/plain_features/delivery.feature index ef26a6125..772eb6b16 100644 --- a/features/plain_features/delivery.feature +++ b/features/plain_features/delivery.feature @@ -2,8 +2,6 @@ Feature: delivery_method configuration option Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: When the delivery_method is set to :synchronous @@ -12,7 +10,7 @@ Scenario Outline: When the delivery_method is set to :synchronous And I run the service "plain-ruby" with the command "bundle exec ruby delivery/synchronous.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the exception "errorClass" equals "RuntimeError" And the event "metaData.config" matches the JSON fixture in "features/fixtures/plain/json/delivery_synchronous.json" @@ -33,7 +31,7 @@ Scenario Outline: When the delivery_method is set to :thread_queue And I run the service "plain-ruby" with the command "bundle exec ruby delivery/threadpool.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the exception "errorClass" equals "RuntimeError" And the event "metaData.config" matches the JSON fixture in "features/fixtures/plain/json/delivery_threadpool.json" @@ -54,7 +52,7 @@ Scenario Outline: When the delivery_method is set to :thread_queue in a fork And I run the service "plain-ruby" with the command "bundle exec ruby delivery/fork_threadpool.rb" And I wait for 1 second Then I should receive 2 requests - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the exception "errorClass" equals "RuntimeError" And the event "metaData.config" matches the JSON fixture in "features/fixtures/plain/json/delivery_fork.json" diff --git a/features/plain_features/exception_data.feature b/features/plain_features/exception_data.feature index b28892cc3..4b16881f7 100644 --- a/features/plain_features/exception_data.feature +++ b/features/plain_features/exception_data.feature @@ -2,8 +2,6 @@ Feature: Plain exception data Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: An error has built in meta-data @@ -12,7 +10,7 @@ Scenario Outline: An error has built in meta-data And I run the service "plain-ruby" with the command "bundle exec ruby exception_data/_meta_data.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the exception "errorClass" equals "CustomError" And the event "metaData.exception.exception_type" equals "FATAL" @@ -41,7 +39,7 @@ Scenario Outline: An error has built in context And I run the service "plain-ruby" with the command "bundle exec ruby exception_data/_context.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the exception "errorClass" equals "CustomError" @@ -70,7 +68,7 @@ Scenario Outline: An error has built in grouping hash And I run the service "plain-ruby" with the command "bundle exec ruby exception_data/_hash.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the exception "errorClass" equals "CustomError" And the event "groupingHash" equals "ABCDE12345" @@ -98,7 +96,7 @@ Scenario Outline: An error has built in user id And I run the service "plain-ruby" with the command "bundle exec ruby exception_data/_user_id.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the exception "errorClass" equals "CustomError" diff --git a/features/plain_features/filters.feature b/features/plain_features/filters.feature index 45e243bb2..7100ac16a 100644 --- a/features/plain_features/filters.feature +++ b/features/plain_features/filters.feature @@ -2,8 +2,6 @@ Feature: Plain filtering of metadata Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Metadata is filtered through the default filters @@ -12,7 +10,7 @@ Scenario Outline: Metadata is filtered through the default filters And I run the service "plain-ruby" with the command "bundle exec ruby filters/default_filters.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "metaData.filter" matches the JSON fixture in "features/fixtures/plain/json/filters_default_metadata_filters.json" @@ -29,15 +27,15 @@ Scenario Outline: Metadata is filtered through the default filters Scenario Outline: Additional filters can be added to the filter list Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_META_DATA_FILTERS" to "filter_me" + And I set environment variable "BUGSNAG_META_DATA_FILTERS" to "filter_me" And I have built the service "plain-ruby" And I run the service "plain-ruby" with the command "bundle exec ruby filters/additional_filters.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "metaData.filter.filter_me" is "[FILTERED]" + And the event "metaData.filter.filter_me" equals "[FILTERED]" Examples: | ruby version | diff --git a/features/plain_features/handled_errors.feature b/features/plain_features/handled_errors.feature index f5cf6c08a..0c183206c 100644 --- a/features/plain_features/handled_errors.feature +++ b/features/plain_features/handled_errors.feature @@ -2,8 +2,6 @@ Feature: Plain handled errors Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: A handled error sends a report @@ -12,14 +10,14 @@ Scenario Outline: A handled error sends a report And I run the service "plain-ruby" with the command "bundle exec ruby handled/.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "unhandled" is false - And the event "severity" is "warning" - And the event "severityReason.type" is "handledException" + And the event "severity" equals "warning" + And the event "severityReason.type" equals "handledException" And the exception "errorClass" equals "RuntimeError" - And the "file" of stack frame 0 equals "/usr/src/handled/.rb" + And the "file" of stack frame 0 equals "/usr/src/app/handled/.rb" And the "lineNumber" of stack frame 0 equals Examples: @@ -62,17 +60,17 @@ Scenario Outline: A handled error can attach metadata in a block And I run the service "plain-ruby" with the command "bundle exec ruby handled/block_metadata.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "unhandled" is false - And the event "severity" is "warning" - And the event "severityReason.type" is "handledException" + And the event "severity" equals "warning" + And the event "severityReason.type" equals "handledException" And the exception "errorClass" equals "RuntimeError" - And the "file" of stack frame 0 equals "/usr/src/handled/block_metadata.rb" + And the "file" of stack frame 0 equals "/usr/src/app/handled/block_metadata.rb" And the "lineNumber" of stack frame 0 equals 6 - And the event "metaData.account.id" is "1234abcd" - And the event "metaData.account.name" is "Acme Co" + And the event "metaData.account.id" equals "1234abcd" + And the event "metaData.account.name" equals "Acme Co" And the event "metaData.account.support" is true Examples: diff --git a/features/plain_features/ignore_classes.feature b/features/plain_features/ignore_classes.feature index b196cc15f..ace47b0b8 100644 --- a/features/plain_features/ignore_classes.feature +++ b/features/plain_features/ignore_classes.feature @@ -2,8 +2,6 @@ Feature: Plain ignore classes Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: An errors class is in the ignore_classes array diff --git a/features/plain_features/ignore_report.feature b/features/plain_features/ignore_report.feature index 6d2382fbb..33307322d 100644 --- a/features/plain_features/ignore_report.feature +++ b/features/plain_features/ignore_report.feature @@ -2,8 +2,6 @@ Feature: Plain ignore report Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: A reports severity can be modified diff --git a/features/plain_features/proxies.feature b/features/plain_features/proxies.feature index 23ebfe660..572f02656 100644 --- a/features/plain_features/proxies.feature +++ b/features/plain_features/proxies.feature @@ -2,16 +2,14 @@ Feature: proxy configuration options Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Proxy settings are provided as configuration options Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_PROXY_HOST" to the current IP - And I set environment variable "MAZE_PROXY_PORT" to the mock API port - And I set environment variable "MAZE_PROXY_USER" to "tester" - And I set environment variable "MAZE_PROXY_PASSWORD" to "testpass" + And I set environment variable "BUGSNAG_PROXY_HOST" to the current IP + And I set environment variable "BUGSNAG_PROXY_PORT" to the mock API port + And I set environment variable "BUGSNAG_PROXY_USER" to "tester" + And I set environment variable "BUGSNAG_PROXY_PASSWORD" to "testpass" And I have built the service "plain-ruby" And I run the service "plain-ruby" with the command "bundle exec ruby configuration/proxy.rb" And I wait for 1 second diff --git a/features/plain_features/release_stages.feature b/features/plain_features/release_stages.feature index a1299db61..c0643e2e8 100644 --- a/features/plain_features/release_stages.feature +++ b/features/plain_features/release_stages.feature @@ -2,14 +2,12 @@ Feature: Release stage configuration options Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Doesn't notify in the wrong release stage Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_NOTIFY_RELEASE_STAGE" to "stage_one" - And I set environment variable "MAZE_RELEASE_STAGE" to "stage_two" + And I set environment variable "BUGSNAG_NOTIFY_RELEASE_STAGE" to "stage_one" + And I set environment variable "BUGSNAG_RELEASE_STAGE" to "stage_two" And I have built the service "plain-ruby" And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_unhandled.rb" And I wait for 1 second @@ -27,20 +25,20 @@ Scenario Outline: Doesn't notify in the wrong release stage Scenario Outline: Doesn't notify in the wrong release stage Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_NOTIFY_RELEASE_STAGE" to "stage_one" - And I set environment variable "MAZE_RELEASE_STAGE" to "stage_one" + And I set environment variable "BUGSNAG_NOTIFY_RELEASE_STAGE" to "stage_one" + And I set environment variable "BUGSNAG_RELEASE_STAGE" to "stage_one" And I have built the service "plain-ruby" And I run the service "plain-ruby" with the command "bundle exec ruby configuration/send_unhandled.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "unhandled" is true - And the event "severity" is "error" - And the event "severityReason.type" is "unhandledException" + And the event "severity" equals "error" + And the event "severityReason.type" equals "unhandledException" And the exception "errorClass" equals "RuntimeError" - And the "file" of stack frame 0 equals "/usr/src/configuration/send_unhandled.rb" + And the "file" of stack frame 0 equals "/usr/src/app/configuration/send_unhandled.rb" Examples: | ruby version | diff --git a/features/plain_features/report_api_key.feature b/features/plain_features/report_api_key.feature index bee69943c..ef4cf7135 100644 --- a/features/plain_features/report_api_key.feature +++ b/features/plain_features/report_api_key.feature @@ -2,8 +2,6 @@ Feature: Plain report modify api key Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: A report can have its api_key modified @@ -13,7 +11,7 @@ Scenario Outline: A report can have its api_key modified And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/modify_api_key.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "abcdefghijklmnopqrstuvwxyz123456" diff --git a/features/plain_features/report_severity.feature b/features/plain_features/report_severity.feature index 73b4ad9ac..084811846 100644 --- a/features/plain_features/report_severity.feature +++ b/features/plain_features/report_severity.feature @@ -2,8 +2,6 @@ Feature: Plain report modify severity Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: A reports severity can be modified @@ -13,11 +11,11 @@ Scenario Outline: A reports severity can be modified And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/modify_severity.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "severity" is "info" - And the event "severityReason.type" is "userCallbackSetSeverity" + And the event "severity" equals "info" + And the event "severityReason.type" equals "userCallbackSetSeverity" Examples: | ruby version | initiator | diff --git a/features/plain_features/report_stack_frames.feature b/features/plain_features/report_stack_frames.feature index 883ded771..f37dddd5a 100644 --- a/features/plain_features/report_stack_frames.feature +++ b/features/plain_features/report_stack_frames.feature @@ -2,8 +2,6 @@ Feature: Plain report modify stack frames Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Stack frames can be removed @@ -13,10 +11,10 @@ Scenario Outline: Stack frames can be removed And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/remove_stack_frame.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the "file" of stack frame 0 equals "/usr/src/stack_frame_modification/initiators/.rb" + And the "file" of stack frame 0 equals "/usr/src/app/stack_frame_modification/initiators/.rb" And the "lineNumber" of stack frame 0 equals Examples: @@ -50,10 +48,10 @@ Scenario Outline: Stack frames can be marked as in project And I run the service "plain-ruby" with the command "bundle exec ruby stack_frame_modification/mark_frames_in_project.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the "file" of stack frame 0 equals "/usr/src/stack_frame_modification/initiators/.rb" + And the "file" of stack frame 0 equals "/usr/src/app/stack_frame_modification/initiators/.rb" And the event "exceptions.0.stacktrace.0.inProject" is null And the event "exceptions.0.stacktrace.1.inProject" is true And the event "exceptions.0.stacktrace.2.inProject" is true diff --git a/features/plain_features/report_user.feature b/features/plain_features/report_user.feature index dc8b2f630..f485030ee 100644 --- a/features/plain_features/report_user.feature +++ b/features/plain_features/report_user.feature @@ -2,8 +2,6 @@ Feature: Plain report modify user Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: A report can have a user name, email, and id set @@ -13,12 +11,12 @@ Scenario Outline: A report can have a user name, email, and id set And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/set_user_details.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "user.name" is "leo testman" - And the event "user.email" is "test@test.com" - And the event "user.id" is "0001" + And the event "user.name" equals "leo testman" + And the event "user.email" equals "test@test.com" + And the event "user.id" equals "0001" Examples: | ruby version | initiator | @@ -51,13 +49,13 @@ Scenario Outline: A report can have custom info set And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/set_custom_user_details.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" - And the event "user.type" is "amateur" - And the event "user.location" is "testville" - And the event "user.details.a" is "foo" - And the event "user.details.b" is "bar" + And the event "user.type" equals "amateur" + And the event "user.location" equals "testville" + And the event "user.details.a" equals "foo" + And the event "user.details.b" equals "bar" Examples: | ruby version | initiator | @@ -90,7 +88,7 @@ Scenario Outline: A report can have its user info removed And I run the service "plain-ruby" with the command "bundle exec ruby report_modification/remove_user_details.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "user" is null diff --git a/features/plain_features/unhandled_errors.feature b/features/plain_features/unhandled_errors.feature index bd24c3f3d..084996b6f 100644 --- a/features/plain_features/unhandled_errors.feature +++ b/features/plain_features/unhandled_errors.feature @@ -2,8 +2,6 @@ Feature: Plain unhandled errors Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: An unhandled error sends a report @@ -12,14 +10,14 @@ Scenario Outline: An unhandled error sends a report And I run the service "plain-ruby" with the command "bundle exec ruby unhandled/.rb" And I wait for 1 second Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "unhandled" is true - And the event "severity" is "error" - And the event "severityReason.type" is "unhandledException" + And the event "severity" equals "error" + And the event "severityReason.type" equals "unhandledException" And the exception "errorClass" equals "" - And the "file" of stack frame 0 equals "/usr/src/unhandled/.rb" + And the "file" of stack frame 0 equals "/usr/src/app/unhandled/.rb" And the "lineNumber" of stack frame 0 equals Examples: diff --git a/features/rails_features/api_key.feature b/features/rails_features/api_key.feature index b829e43d9..dc66e8f9a 100644 --- a/features/rails_features/api_key.feature +++ b/features/rails_features/api_key.feature @@ -1,7 +1,7 @@ Feature: API key Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -13,7 +13,7 @@ Scenario Outline: Setting api_key in environment variable works When I navigate to the route "/api_key/environment" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "b35a2a72bd230ac0aa0f52715bbdc6ab" And the payload field "events" is an array with 1 element @@ -39,7 +39,7 @@ Scenario Outline: Setting api_key in environment variable works When I navigate to the route "/api_key/changing?api_key=c35a2a72bd230ac0aa0f52715bbdc6ac" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "c35a2a72bd230ac0aa0f52715bbdc6ac" And the payload field "events" is an array with 1 element diff --git a/features/rails_features/app_type.feature b/features/rails_features/app_type.feature index 89e427caa..2d69f2668 100644 --- a/features/rails_features/app_type.feature +++ b/features/rails_features/app_type.feature @@ -1,19 +1,19 @@ Feature: App type configuration Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Setting app_type in initializer works Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_APP_TYPE" to "custom_app_type" + And I set environment variable "BUGSNAG_APP_TYPE" to "custom_app_type" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/app_type/initializer" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" @@ -43,7 +43,7 @@ Scenario Outline: Changing app_type after initializer works When I navigate to the route "/app_type/after?type=maze_after_initializer" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" diff --git a/features/rails_features/app_version.feature b/features/rails_features/app_version.feature index cc7854eec..6b0956009 100644 --- a/features/rails_features/app_version.feature +++ b/features/rails_features/app_version.feature @@ -1,7 +1,7 @@ Feature: App version configuration Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -32,7 +32,7 @@ Scenario Outline: App_version is nil by default Scenario Outline: Setting app_version in initializer works Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_APP_VERSION" to "1.0.0" + And I set environment variable "BUGSNAG_APP_VERSION" to "1.0.0" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/app_version/initializer" on port "6128" diff --git a/features/rails_features/auto_capture_sessions.feature b/features/rails_features/auto_capture_sessions.feature index a3dcf7148..12923e748 100644 --- a/features/rails_features/auto_capture_sessions.feature +++ b/features/rails_features/auto_capture_sessions.feature @@ -1,19 +1,19 @@ Feature: Auto capture sessions Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Auto_capture_sessions can be set to true in the initializer Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_AUTO_CAPTURE_SESSIONS" to "true" + And I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "true" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/session_tracking/initializer" on port "6128" Then I should receive a request And the request is a valid for the session tracking API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the "Bugsnag-API-Key" header equals "a35a2a72bd230ac0aa0f52715bbdc6aa" And the sessionCount "startedAt" is a timestamp @@ -41,7 +41,7 @@ Scenario Outline: Auto_capture_sessions can be set to true after the initializer When I navigate to the route "/session_tracking/initializer" on port "6128" Then I should receive a request And the request is a valid for the session tracking API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the "Bugsnag-API-Key" header equals "a35a2a72bd230ac0aa0f52715bbdc6aa" And the sessionCount "startedAt" is a timestamp diff --git a/features/rails_features/auto_notify.feature b/features/rails_features/auto_notify.feature index 0cdb2b10c..81be580ba 100644 --- a/features/rails_features/auto_notify.feature +++ b/features/rails_features/auto_notify.feature @@ -1,13 +1,13 @@ Feature: Auto notify Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Auto_notify set to false in the initializer prevents unhandled error sending Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_AUTO_NOTIFY" to "false" + And I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/auto_notify/unhandled" on port "6128" @@ -30,13 +30,13 @@ Scenario Outline: Auto_notify set to false in the initializer prevents unhandled Scenario Outline: Auto_notify set to false in the initializer still sends handled errors Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_AUTO_NOTIFY" to "false" + And I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/auto_notify/handled" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the event "unhandled" is false @@ -89,7 +89,7 @@ Scenario Outline: Auto_notify set to false after the initializer still sends han When I navigate to the route "/auto_notify/handled_after" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" diff --git a/features/rails_features/before_notify.feature b/features/rails_features/before_notify.feature index 1192446eb..8ecc0d029 100644 --- a/features/rails_features/before_notify.feature +++ b/features/rails_features/before_notify.feature @@ -1,7 +1,7 @@ Feature: Before notify callbacks Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -12,7 +12,7 @@ Scenario Outline: Rails before_notify controller method works on handled errors When I navigate to the route "/before_notify/handled" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" @@ -45,7 +45,7 @@ Scenario Outline: Rails before_notify controller method works on unhandled error When I navigate to the route "/before_notify/unhandled" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "NameError" @@ -78,7 +78,7 @@ Scenario Outline: Inline block on handled errors is called When I navigate to the route "/before_notify/inline" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" diff --git a/features/rails_features/handled.feature b/features/rails_features/handled.feature index 2ff8bf048..8a028d939 100644 --- a/features/rails_features/handled.feature +++ b/features/rails_features/handled.feature @@ -1,7 +1,7 @@ Feature: Rails handled errors Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -12,7 +12,7 @@ Scenario Outline: Unhandled RuntimeError When I navigate to the route "/handled/unthrown" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the event "unhandled" is false @@ -21,7 +21,7 @@ Scenario Outline: Unhandled RuntimeError And the event "app.type" equals "rails" And the event "metaData.request.url" ends with "/handled/unthrown" And the event "severity" equals "warning" - And the event "severityReason.type" is "handledException" + And the event "severityReason.type" equals "handledException" Examples: | ruby_version | rails_version | @@ -45,7 +45,7 @@ Scenario Outline: Thrown handled NameError When I navigate to the route "/handled/thrown" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "NameError" @@ -54,7 +54,7 @@ Scenario Outline: Thrown handled NameError And the event "metaData.request.url" ends with "/handled/thrown" And the event "app.type" equals "rails" And the event "severity" equals "warning" - And the event "severityReason.type" is "handledException" + And the event "severityReason.type" equals "handledException" Examples: | ruby_version | rails_version | @@ -78,7 +78,7 @@ Scenario Outline: Manual string notify When I navigate to the route "/handled/string_notify" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" diff --git a/features/rails_features/ignore_classes.feature b/features/rails_features/ignore_classes.feature index 8d56a655f..8a97862d9 100644 --- a/features/rails_features/ignore_classes.feature +++ b/features/rails_features/ignore_classes.feature @@ -1,13 +1,13 @@ Feature: Ignore classes Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Ignore_classes can be set to a different value in initializer Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_IGNORE_CLASS" to "IgnoredError" + And I set environment variable "BUGSNAG_IGNORE_CLASS" to "IgnoredError" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/ignore_classes/initializer" on port "6128" diff --git a/features/rails_features/meta_data_filters.feature b/features/rails_features/meta_data_filters.feature index 7196cde4a..11d0c5ba4 100644 --- a/features/rails_features/meta_data_filters.feature +++ b/features/rails_features/meta_data_filters.feature @@ -1,7 +1,7 @@ Feature: Metadata filters Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -12,7 +12,7 @@ Scenario Outline: Meta_data_filters should include Rails.configuration.filter_pa When I navigate to the route "/metadata_filters/filter" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the event "unhandled" is false diff --git a/features/rails_features/project_root.feature b/features/rails_features/project_root.feature index 73d36a488..c98df2696 100644 --- a/features/rails_features/project_root.feature +++ b/features/rails_features/project_root.feature @@ -1,7 +1,7 @@ Feature: Project root configuration Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -12,7 +12,7 @@ Scenario Outline: Project_root should default to Rails.root When I navigate to the route "/project_root/default" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" @@ -37,13 +37,13 @@ Scenario Outline: Project_root should default to Rails.root Scenario Outline: Project_root can be set in an initializer Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_PROJECT_ROOT" to "/foo/bar" + And I set environment variable "BUGSNAG_PROJECT_ROOT" to "/foo/bar" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/project_root/initializer" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" @@ -73,7 +73,7 @@ Scenario Outline: Project_root can be set after an initializer When I navigate to the route "/project_root/after" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" diff --git a/features/rails_features/release_stage.feature b/features/rails_features/release_stage.feature index 2072565d9..0e93c86e2 100644 --- a/features/rails_features/release_stage.feature +++ b/features/rails_features/release_stage.feature @@ -1,7 +1,7 @@ Feature: Release stage Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -34,7 +34,7 @@ Scenario Outline: Release_stage should default to RAILS_ENV Scenario Outline: Release_stage can be set in an initializer Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_RELEASE_STAGE" to "maze_release_stage_env" + And I set environment variable "BUGSNAG_RELEASE_STAGE" to "maze_release_stage_env" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/release_stage/default" on port "6128" diff --git a/features/rails_features/send_code.feature b/features/rails_features/send_code.feature index 26e7cf104..9981ab58e 100644 --- a/features/rails_features/send_code.feature +++ b/features/rails_features/send_code.feature @@ -1,13 +1,13 @@ Feature: Send code Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Send_code can be updated in an initializer Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_SEND_CODE" to "false" + And I set environment variable "BUGSNAG_SEND_CODE" to "false" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/send_code/initializer" on port "6128" diff --git a/features/rails_features/send_environment.feature b/features/rails_features/send_environment.feature index 7d8a52812..1888ee500 100644 --- a/features/rails_features/send_environment.feature +++ b/features/rails_features/send_environment.feature @@ -1,19 +1,19 @@ Feature: Send environment Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint Scenario Outline: Send_environment should send environment in handled errors when true Given I set environment variable "RUBY_VERSION" to "" - And I set environment variable "MAZE_SEND_ENVIRONMENT" to "true" + And I set environment variable "BUGSNAG_SEND_ENVIRONMENT" to "true" And I start the service "rails" And I wait for the app to respond on port "6128" When I navigate to the route "/send_environment/initializer" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the exception "errorClass" equals "RuntimeError" diff --git a/features/rails_features/unhandled.feature b/features/rails_features/unhandled.feature index 56e79a735..bbe0ad781 100644 --- a/features/rails_features/unhandled.feature +++ b/features/rails_features/unhandled.feature @@ -1,7 +1,7 @@ Feature: Unhandled exceptions support Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -12,7 +12,7 @@ Scenario Outline: Unhandled RuntimeError When I navigate to the route "/unhandled/error" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the event "unhandled" is true @@ -21,8 +21,8 @@ Scenario Outline: Unhandled RuntimeError And the event "app.type" equals "rails" And the event "metaData.request.url" ends with "/unhandled/error" And the event "severity" equals "error" - And the event "severityReason.type" is "unhandledExceptionMiddleware" - And the event "severityReason.attributes.framework" is "Rack" + And the event "severityReason.type" equals "unhandledExceptionMiddleware" + And the event "severityReason.attributes.framework" equals "Rack" Examples: | ruby_version | rails_version | diff --git a/features/rails_features/user_info.feature b/features/rails_features/user_info.feature index ce1aaaa49..05b990c0d 100644 --- a/features/rails_features/user_info.feature +++ b/features/rails_features/user_info.feature @@ -1,7 +1,7 @@ Feature: Capture user information Background: - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -13,7 +13,7 @@ Scenario Outline: Warden user information is sent And I navigate to the route "/warden/?email=testtest@test.test" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the event "user.email" equals "testtest@test.test" @@ -45,7 +45,7 @@ Scenario Outline: Devise user information is sent And I navigate to the route "/devise/" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the event "user.email" equals "test+test@test.test" @@ -68,7 +68,7 @@ Scenario Outline: Clearance user information is sent And I navigate to the route "/clearance/" on port "6128" Then I should receive a request And the request is a valid for the error reporting API - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the payload field "events" is an array with 1 element And the event "user.email" equals "testtest@test.test" diff --git a/features/sidekiq.feature b/features/sidekiq.feature index 0231da576..1b6f29403 100644 --- a/features/sidekiq.feature +++ b/features/sidekiq.feature @@ -2,7 +2,6 @@ Feature: Bugsnag raises errors in Sidekiq workers Background: Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" - Given I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" And I set environment variable "APP_PATH" to "/usr/src" And I configure the bugsnag endpoint @@ -13,14 +12,14 @@ Scenario Outline: An unhandled RuntimeError sends a report And I run the command "bundle exec ruby initializers/UnhandledError.rb" on the service "sidekiq" And I wait for 1 seconds Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "unhandled" is true - And the event "severity" is "error" - And the event "context" is "UnhandledError@default" - And the event "severityReason.type" is "unhandledExceptionMiddleware" - And the event "severityReason.attributes.framework" is "Sidekiq" + And the event "severity" equals "error" + And the event "context" equals "UnhandledError@default" + And the event "severityReason.type" equals "unhandledExceptionMiddleware" + And the event "severityReason.attributes.framework" equals "Sidekiq" And the exception "errorClass" equals "RuntimeError" And the "file" of stack frame 0 equals "/usr/src/app.rb" And the "lineNumber" of stack frame 0 equals 33 @@ -59,13 +58,13 @@ Scenario Outline: A handled RuntimeError can be notified And I run the command "bundle exec ruby initializers/HandledError.rb" on the service "sidekiq" And I wait for 1 seconds Then I should receive a request - And the request used the Ruby notifier + And the request used the "Ruby Bugsnag Notifier" notifier And the request used payload v4 headers And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa" And the event "unhandled" is false - And the event "context" is "HandledError@default" - And the event "severity" is "warning" - And the event "severityReason.type" is "handledException" + And the event "context" equals "HandledError@default" + And the event "severity" equals "warning" + And the event "severityReason.type" equals "handledException" And the exception "errorClass" equals "RuntimeError" And the "file" of stack frame 0 equals "/usr/src/app.rb" And the "lineNumber" of stack frame 0 equals 24 diff --git a/features/steps/ruby_notifier_steps.rb b/features/steps/ruby_notifier_steps.rb index d430d8c91..b14c167a8 100644 --- a/features/steps/ruby_notifier_steps.rb +++ b/features/steps/ruby_notifier_steps.rb @@ -1,19 +1,3 @@ -require 'net/http' -require 'open3' - -When("I configure the bugsnag endpoint") do - steps %Q{ - When I set environment variable "MAZE_ENDPOINT" to "http://#{current_ip}:#{MOCK_API_PORT}" - } -end - -When("I navigate to the route {string} on port {string}") do |route, port| - steps %Q{ - When I open the URL "http://localhost:#{port}#{route}" - And I wait for 1 second - } -end - When("I set environment variable {string} to the current IP") do |env_var| steps %Q{ When I set environment variable "#{env_var}" to "#{current_ip}" @@ -28,17 +12,4 @@ steps %Q{ When I set environment variable "#{env_var}" to "#{credentials}@#{current_ip}:#{MOCK_API_PORT}" } -end -Then("the request used the Ruby notifier") do - bugsnag_regex = /^http(s?):\/\/www.bugsnag.com/ - steps %Q{ - Then the payload field "notifier.name" equals "Ruby Bugsnag Notifier" - And the payload field "notifier.url" matches the regex "#{bugsnag_regex}" - } -end - -Then("the event {string} is {string}") do |key, value| - steps %Q{ - Then the event "#{key}" equals "#{value}" - } end \ No newline at end of file diff --git a/features/support/env.rb b/features/support/env.rb index 9c87e6159..e7a1f9c00 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,5 +1,4 @@ -require 'open3' -require 'os' +require 'fileutils' Before do find_default_docker_compose @@ -34,14 +33,24 @@ def install_fixture_gems end end -def current_ip - if OS.mac? - 'host.docker.internal' - else - ip_addr = `ifconfig | grep -Eo 'inet (addr:)?([0-9]*\\\.){3}[0-9]*' | grep -v '127.0.0.1'` - ip_list = /((?:[0-9]*\.){3}[0-9]*)/.match(ip_addr) - ip_list.captures.first +# Added to ensure that multiple versions of Gems do not exist within the fixture folders, +# which can be difficult to track down and clear up +def remove_installed_gems + removal_targets = ['temp-bugsnag-lib', 'bugsnag-*.gem'] + Dir.entries('features/fixtures').reject { |entry| ['.', '..'].include?(entry) }.each do |entry| + target_dir = "features/fixtures/#{entry}" + target_entries = [] + removal_targets.each do |r_target| + target_entries += Dir.glob("#{target_dir}/#{r_target}") + end + target_entries.each do |d_target| + FileUtils.rm_rf(d_target) + end end end +at_exit do + remove_installed_gems +end + install_fixture_gems