bugsnag 6.12.2 → 6.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.buildkite/pipeline.yml +470 -0
  3. data/.rubocop_todo.yml +1 -1
  4. data/CHANGELOG.md +12 -0
  5. data/CONTRIBUTING.md +1 -9
  6. data/Gemfile +11 -6
  7. data/TESTING.md +81 -0
  8. data/VERSION +1 -1
  9. data/docker-compose.yml +46 -0
  10. data/dockerfiles/Dockerfile.jruby-unit-tests +13 -0
  11. data/dockerfiles/Dockerfile.ruby-maze-runner +26 -0
  12. data/dockerfiles/Dockerfile.ruby-unit-tests +12 -0
  13. data/features/delayed_job.feature +6 -22
  14. data/features/fixtures/delayed_job/Dockerfile +2 -4
  15. data/features/fixtures/delayed_job/app/Gemfile +1 -1
  16. data/features/fixtures/delayed_job/app/Rakefile +18 -0
  17. data/features/fixtures/docker-compose.yml +28 -40
  18. data/features/fixtures/expected_breadcrumbs/active_job.json +9 -0
  19. data/features/fixtures/expected_breadcrumbs/mongo_failed.json +15 -0
  20. data/features/fixtures/expected_breadcrumbs/mongo_filtered_request.json +15 -0
  21. data/features/fixtures/expected_breadcrumbs/mongo_filtered_result.json +15 -0
  22. data/features/fixtures/expected_breadcrumbs/mongo_success.json +14 -0
  23. data/features/fixtures/expected_breadcrumbs/request.json +13 -0
  24. data/features/fixtures/expected_breadcrumbs/sql_with_bindings.json +12 -0
  25. data/features/fixtures/expected_breadcrumbs/sql_without_bindings.json +11 -0
  26. data/features/fixtures/plain/Dockerfile +2 -2
  27. data/features/fixtures/plain/app/app.rb +1 -3
  28. data/features/fixtures/plain/app/delivery/fork_threadpool.rb +3 -1
  29. data/features/fixtures/plain/app/unhandled/{Interrupt.rb → interrupt.rb} +0 -0
  30. data/features/fixtures/rack1/Dockerfile +2 -2
  31. data/features/fixtures/rack2/Dockerfile +2 -2
  32. data/features/fixtures/rails3/Dockerfile +2 -2
  33. data/features/fixtures/rails3/app/Gemfile +4 -0
  34. data/features/fixtures/rails3/app/config/initializers/bugsnag.rb +1 -1
  35. data/features/fixtures/rails4/Dockerfile +2 -5
  36. data/features/fixtures/rails4/app/config/initializers/bugsnag.rb +1 -1
  37. data/features/fixtures/rails5/Dockerfile +2 -2
  38. data/features/fixtures/rails5/app/config/initializers/bugsnag.rb +1 -1
  39. data/features/fixtures/rails6/Dockerfile +2 -2
  40. data/features/fixtures/rails6/app/Gemfile +3 -2
  41. data/features/fixtures/rails6/app/app/controllers/mongo_controller.rb +22 -0
  42. data/features/fixtures/rails6/app/app/models/mongo_model.rb +6 -0
  43. data/features/fixtures/rails6/app/config/environments/development.rb +2 -0
  44. data/features/fixtures/rails6/app/config/environments/production.rb +1 -0
  45. data/features/fixtures/rails6/app/config/environments/rails_env.rb +1 -0
  46. data/features/fixtures/rails6/app/config/environments/test.rb +1 -0
  47. data/features/fixtures/rails6/app/config/initializers/bugsnag.rb +1 -1
  48. data/features/fixtures/rails6/app/config/mongoid.yml +23 -0
  49. data/features/fixtures/rails6/app/config/routes.rb +4 -0
  50. data/features/fixtures/resque/Dockerfile +2 -2
  51. data/features/fixtures/sidekiq/Dockerfile +5 -7
  52. data/features/fixtures/sidekiq/app/Gemfile +2 -1
  53. data/features/fixtures/sidekiq/app/Rakefile.rb +14 -0
  54. data/features/fixtures/sinatra1/Dockerfile +2 -2
  55. data/features/fixtures/sinatra2/Dockerfile +2 -2
  56. data/features/plain_features/add_tab.feature +24 -97
  57. data/features/plain_features/app_type.feature +6 -25
  58. data/features/plain_features/app_version.feature +6 -25
  59. data/features/plain_features/auto_notify.feature +4 -20
  60. data/features/plain_features/delivery.feature +12 -60
  61. data/features/plain_features/exception_data.feature +24 -94
  62. data/features/plain_features/filters.feature +9 -43
  63. data/features/plain_features/handled_errors.feature +16 -78
  64. data/features/plain_features/ignore_classes.feature +5 -23
  65. data/features/plain_features/ignore_report.feature +6 -24
  66. data/features/plain_features/proxies.feature +13 -56
  67. data/features/plain_features/release_stages.feature +9 -40
  68. data/features/plain_features/report_api_key.feature +9 -35
  69. data/features/plain_features/report_severity.feature +8 -35
  70. data/features/plain_features/report_stack_frames.feature +24 -92
  71. data/features/plain_features/report_user.feature +23 -96
  72. data/features/plain_features/unhandled_errors.feature +17 -88
  73. data/features/rails_features/api_key.feature +12 -62
  74. data/features/rails_features/app_type.feature +13 -62
  75. data/features/rails_features/app_version.feature +19 -86
  76. data/features/rails_features/auto_capture_sessions.feature +31 -120
  77. data/features/rails_features/auto_notify.feature +28 -113
  78. data/features/rails_features/before_notify.feature +18 -89
  79. data/features/rails_features/breadcrumbs.feature +40 -147
  80. data/features/rails_features/handled.feature +18 -88
  81. data/features/rails_features/ignore_classes.feature +12 -55
  82. data/features/rails_features/meta_data_filters.feature +6 -34
  83. data/features/rails_features/mongo_breadcrumbs.feature +22 -105
  84. data/features/rails_features/project_root.feature +19 -90
  85. data/features/rails_features/release_stage.feature +20 -88
  86. data/features/rails_features/send_code.feature +13 -59
  87. data/features/rails_features/send_environment.feature +7 -35
  88. data/features/rails_features/unhandled.feature +6 -33
  89. data/features/rails_features/user_info.feature +27 -68
  90. data/features/sidekiq.feature +12 -79
  91. data/features/steps/ruby_notifier_steps.rb +59 -15
  92. data/features/support/env.rb +12 -45
  93. data/lib/bugsnag/cleaner.rb +2 -3
  94. data/lib/bugsnag/configuration.rb +12 -0
  95. data/lib/bugsnag/stacktrace.rb +1 -4
  96. data/spec/configuration_spec.rb +11 -0
  97. data/spec/fixtures/apps/rails-initializer-config/Gemfile +5 -1
  98. data/spec/fixtures/apps/rails-invalid-initializer-config/Gemfile +5 -1
  99. data/spec/fixtures/apps/rails-no-config/Gemfile +5 -1
  100. data/spec/integrations/logger_spec.rb +1 -1
  101. data/spec/integrations/rake_spec.rb +1 -1
  102. data/spec/stacktrace_spec.rb +39 -0
  103. metadata +21 -5
  104. data/.travis.yml +0 -122
  105. data/features/plain_features/api_key.feature +0 -25
@@ -568,7 +568,7 @@ Style/RedundantSelf:
568
568
  - 'lib/bugsnag/configuration.rb'
569
569
  - 'lib/bugsnag/integrations/railtie.rb'
570
570
 
571
- # Offense count: 3
571
+ # Offense count: 2
572
572
  # Cop supports --auto-correct.
573
573
  # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
574
574
  # SupportedStyles: slashes, percent_r, mixed
@@ -1,6 +1,18 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 6.13.0 (30 Jan 2020)
5
+
6
+ ### Enhancements
7
+
8
+ * Add configurable `vendor_path` to configure which file paths are out of project stacktrace.
9
+ | [#544](https://github.com/bugsnag/bugsnag-ruby/pull/544)
10
+
11
+ ### Fixes
12
+
13
+ * Resolve Ruby deprecation warning for keyword parameters
14
+ | [#580](https://github.com/bugsnag/bugsnag-ruby/pull/582)
15
+
4
16
  ## 6.12.2 (24 Oct 2019)
5
17
 
6
18
  ### Fixes
@@ -20,15 +20,7 @@ Thank you!
20
20
  ```
21
21
  bundle exec rake spec
22
22
  ```
23
- - You will need to add the following test dependencies:
24
-
25
- ```
26
- bundle install --with test --binstubs
27
- ```
28
- - For adding a new integration (like support for a web framework or worker
29
- queue), include an example in the `example/` directory showing off what
30
- you've built. Include a `README` with the example app so others know how to
31
- run it.
23
+ - Further information on installing and running the tests can be found in [the testing guide](TESTING.md)
32
24
 
33
25
 
34
26
  ### Ship it!
data/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- ruby_version = Gem::Version.new(RUBY_VERSION)
3
+ ruby_version = Gem::Version.new(RUBY_VERSION.dup)
4
4
 
5
5
  group :test, optional: true do
6
6
  gem 'rake', ruby_version <= Gem::Version.new('1.9.3') ? '~> 11.3.0' : '~> 12.3.0'
7
7
  gem 'rspec'
8
8
  gem 'rspec-mocks'
9
- gem 'rdoc', '~> 5.1.0'
9
+ gem 'rdoc', ruby_version < Gem::Version.new('2.2.0') ? '4.3.0' : '~> 5.1.0'
10
10
  gem 'pry'
11
11
  gem 'addressable', '~> 2.3.8'
12
12
  if ruby_version >= Gem::Version.new('2.2.2')
@@ -15,6 +15,15 @@ group :test, optional: true do
15
15
  end
16
16
  gem 'webmock', ruby_version <= Gem::Version.new('1.9.3') ? '2.3.2': '>2.3.2'
17
17
  gem 'hashdiff', ruby_version <= Gem::Version.new('1.9.3') ? '0.3.8': '>0.3.8'
18
+ if ruby_version >= Gem::Version.new('2.7.0')
19
+ gem 'did_you_mean', '~> 1.4.0'
20
+ elsif ruby_version >= Gem::Version.new('2.5.0')
21
+ gem 'did_you_mean', '~> 1.3.1'
22
+ elsif ruby_version >= Gem::Version.new('2.4.0')
23
+ gem 'did_you_mean', '~> 1.1.0'
24
+ elsif ruby_version >= Gem::Version.new('2.3.0')
25
+ gem 'did_you_mean', '~> 1.0.4'
26
+ end
18
27
  end
19
28
 
20
29
  group :coverage, optional: true do
@@ -36,8 +45,4 @@ group :doc, optional: true do
36
45
  gem 'hanna-nouveau'
37
46
  end
38
47
 
39
- group :maze, optional: true do
40
- gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner' if ruby_version >= Gem::Version.new('2.0.0')
41
- end
42
-
43
48
  gemspec
@@ -0,0 +1,81 @@
1
+ # Testing the Ruby Bugsnag notifier
2
+
3
+ ## Unit tests
4
+
5
+ To run locally:
6
+
7
+ ```
8
+ bundle install --with test sidekiq --binstubs
9
+ bundle exec rake
10
+ ```
11
+
12
+ To run within a different environment, set `RUBY_TEST_VERSION` to your desired Ruby version, then run:
13
+
14
+ ```
15
+ RUBY_TEST_VERSION=2.6 docker-compose up --build ruby-unit-tests
16
+ ```
17
+
18
+ To run the unit tests against JRuby, run:
19
+
20
+ ```
21
+ docker-compose up --build jruby-unit-tests
22
+ ```
23
+
24
+ ## End-to-end tests
25
+
26
+ These tests are implemented with our notifier testing tool [Maze Runner](https://github.com/bugsnag/maze-runner).
27
+
28
+ End to end tests are written in cucumber-style `.feature` files, and need Ruby-backed "steps" in order to know what to run. The tests are located in the top level [`features`](/features/) directory.
29
+
30
+ Maze runner's CLI and the test fixtures are containerised so you'll need Docker (and Docker Compose) to run them.
31
+
32
+ __Note: only Bugsnag employees can run the end-to-end tests.__ We have dedicated test infrastructure and private BrowserStack credentials which can't be shared outside of the organisation.
33
+
34
+ ##### Authenticating with the private container registry
35
+
36
+ You'll need to set the credentials for the aws profile in order to access the private docker registry:
37
+
38
+ ```
39
+ aws configure --profile=opensource
40
+ ```
41
+
42
+ Subsequently you'll need to run the following commmand to authenticate with the registry:
43
+
44
+ ```
45
+ $(aws ecr get-login --profile=opensource --no-include-email)
46
+ ```
47
+
48
+ __Your session will periodically expire__, so you'll need to run this command to re-authenticate when that happens.
49
+
50
+ ### Running the end to end tests
51
+
52
+ Once registered with the remote repository, build the test container:
53
+
54
+ ```
55
+ docker-compose build ruby-maze-runner
56
+ ```
57
+
58
+ Configure the tests to be run in the following way:
59
+
60
+ - Determine the Ruby version to be tested using the environment variable `RUBY_TEST_VERSION` e.g. `RUBY_TEST_VERSION=2.6`
61
+ - If testing rails, set the rails version to be tested using the environment variable `RAILS_VERSION` e.g. `RAILS_VERSION=3`
62
+ - If testing sidekiq, set the version to be tested using the environment variable `SIDEKIQ_VERSION` as the bundler version, e.g. `SIDEKIQ_VERSION="~> 2"`
63
+
64
+ When running the end-to-end tests, you'll want to restrict the feature files run to the specific test features for the platform. This is done using the Cucumber CLI syntax at the end of the `docker-compose run ruby-maze-runner` command, i.e:
65
+
66
+ ```
67
+ RUBY_TEST_VERSION=2.6 RAILS_VERSION=6 docker-compose run ruby-maze-runner features/rails_features --tags "@rails6"
68
+ ```
69
+
70
+ - Plain ruby tests should target `features/plain_features`
71
+ - Sidekiq tests should target `features/sidekiq.feature`
72
+ - Delayed job tests should target `features/delayed_job.feature`
73
+ - Rails test should target `features/rails_features`. In addition, the tag syntax should be used to specify which of the scenarios within those files are run. For example rails 3 test should feature the tag `"@rails3"`
74
+
75
+ In order to target specific features the exact `.feature` file can be specified, i.e:
76
+
77
+ ```
78
+ RUBY_TEST_VERSION=2.6 RAILS_VERSION=6 docker-compose run ruby-maze-runner features/rails_features/app_version.feature --tags "@rails6"
79
+ ```
80
+
81
+ In order to avoid running flakey or unfinished tests, the tag `"not @wip"` can be added to the tags option. This is recommended for all CI runs. If a tag is already specified, this should be added using the `and` keyword, e.g. `--tags "@rails6 and not @wip"`
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.12.2
1
+ 6.13.0
@@ -0,0 +1,46 @@
1
+ version: '3.6'
2
+ services:
3
+ ruby-maze-runner:
4
+ build:
5
+ context: .
6
+ dockerfile: dockerfiles/Dockerfile.ruby-maze-runner
7
+ target: ruby-maze-runner
8
+ environment:
9
+ NETWORK_NAME: "${BUILDKITE_JOB_ID:-ruby-maze-runner}-${RUBY_TEST_VERSION:-local}"
10
+ BUILDKITE_JOB_ID:
11
+ RAILS_VERSION:
12
+ SIDEKIQ_VERSION:
13
+ RUBY_TEST_VERSION:
14
+ VERBOSE:
15
+ DEBUG:
16
+ networks:
17
+ default:
18
+ aliases:
19
+ - maze-runner
20
+ volumes:
21
+ - /var/run/docker.sock:/var/run/docker.sock
22
+
23
+ ruby-unit-tests:
24
+ build:
25
+ context: .
26
+ dockerfile: dockerfiles/Dockerfile.ruby-unit-tests
27
+ args:
28
+ - RUBY_TEST_VERSION
29
+ - GEMSETS=${GEMSETS:-test}
30
+ - BUNDLE_VERSION=${BUNDLE_VERSION:-1.12.0}
31
+ environment:
32
+ COVERALLS_REPO_TOKEN:
33
+ GEMSETS:
34
+ CI:
35
+
36
+ jruby-unit-tests:
37
+ build:
38
+ context: .
39
+ dockerfile: dockerfiles/Dockerfile.jruby-unit-tests
40
+ args:
41
+ - GEMSETS=${GEMSETS:-test}
42
+ - BUNDLE_VERSION=${BUNDLE_VERSION:-1.12.0}
43
+
44
+ networks:
45
+ default:
46
+ name: ${BUILDKITE_JOB_ID:-ruby-maze-runner}-${RUBY_TEST_VERSION:-local}
@@ -0,0 +1,13 @@
1
+ FROM jruby:latest
2
+
3
+ RUN apt-get update && apt-get install -y git
4
+
5
+ WORKDIR /app/
6
+
7
+ COPY . .
8
+ ARG BUNDLE_VERSION
9
+ ARG GEMSETS
10
+ RUN gem install bundler -v $BUNDLE_VERSION
11
+ RUN bundle _${BUNDLE_VERSION}_ install --with "$GEMSETS" --binstubs
12
+
13
+ CMD ["bundle", "exec", "./bin/rake", "spec"]
@@ -0,0 +1,26 @@
1
+ FROM ruby:2.6 as ruby-package-builder
2
+
3
+ RUN gem install bundler
4
+
5
+ WORKDIR /app
6
+
7
+ COPY bugsnag.gemspec Gemfile VERSION ./
8
+
9
+ RUN bundle install
10
+
11
+ COPY CHANGELOG.md CONTRIBUTING.md TESTING.md LICENSE.txt Rakefile README.md UPGRADING.md .gitignore .rdoc_options .rspec .rubocop.yml .rubocop_todo.yml issue_template.md docker-compose.yml ./
12
+ COPY .buildkite ./.buildkite
13
+ COPY .git ./.git
14
+ COPY .github ./.github
15
+ COPY dockerfiles ./dockerfiles
16
+ COPY features ./features
17
+ COPY lib ./lib
18
+ COPY spec ./spec
19
+
20
+ RUN gem build bugsnag.gemspec
21
+
22
+ # The maze-runner node tests
23
+ FROM 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner:v2-cli as ruby-maze-runner
24
+ WORKDIR /app/
25
+ COPY features ./features
26
+ COPY --from=ruby-package-builder /app/bugsnag-*.gem bugsnag.gem
@@ -0,0 +1,12 @@
1
+ ARG RUBY_TEST_VERSION
2
+ FROM ruby:$RUBY_TEST_VERSION
3
+
4
+ WORKDIR /app/
5
+
6
+ COPY . .
7
+ ARG BUNDLE_VERSION
8
+ ARG GEMSETS
9
+ RUN gem install bundler -v ${BUNDLE_VERSION}
10
+ RUN bundle _${BUNDLE_VERSION}_ install --with "$GEMSETS" --binstubs
11
+
12
+ CMD ["bundle", "exec", "./bin/rake", "spec"]
@@ -1,18 +1,9 @@
1
1
  Feature: Bugsnag detects errors in Delayed job workers
2
2
 
3
- Background:
4
- Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
- And I configure the bugsnag endpoint
6
-
7
3
  Scenario: An unhandled RuntimeError sends a report with arguments
8
- Given I set environment variable "RUBY_VERSION" to "2.5"
9
- And I start the service "delayed_job"
10
- And I run the command "bundle exec rails runner 'TestModel.delay.fail_with_args(\"Test\")'" on the service "delayed_job"
11
- And I wait for 5 seconds
12
- Then I should receive a request
13
- And the request used the "Ruby Bugsnag Notifier" notifier
14
- And the request used payload v4 headers
15
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
4
+ Given I run the service "delayed_job" with the command "bundle exec rake delayed_job_tests:fail_with_args"
5
+ And I wait to receive a request
6
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
16
7
  And the event "unhandled" is true
17
8
  And the event "severity" equals "error"
18
9
  And the event "context" equals "TestModel.fail_with_args"
@@ -25,18 +16,12 @@ Scenario: An unhandled RuntimeError sends a report with arguments
25
16
  And the event "metaData.job.max_attempts" equals 1
26
17
  And the event "metaData.job.payload.display_name" equals "TestModel.fail_with_args"
27
18
  And the event "metaData.job.payload.method_name" equals "fail_with_args"
28
- And the payload field "events.0.metaData.job.payload.args" is an array with 1 element
29
19
  And the payload field "events.0.metaData.job.payload.args.0" equals "Test"
30
20
 
31
21
  Scenario: A handled exception sends a report
32
- Given I set environment variable "RUBY_VERSION" to "2.5"
33
- And I start the service "delayed_job"
34
- And I run the command "bundle exec rails runner 'TestModel.delay.notify_with_args(\"Test\")'" on the service "delayed_job"
35
- And I wait for 5 seconds
36
- Then I should receive a request
37
- And the request used the "Ruby Bugsnag Notifier" notifier
38
- And the request used payload v4 headers
39
- And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
22
+ Given I run the service "delayed_job" with the command "bundle exec rake delayed_job_tests:notify_with_args"
23
+ And I wait to receive a request
24
+ Then the request is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier"
40
25
  And the event "unhandled" is false
41
26
  And the event "severity" equals "warning"
42
27
  And the event "context" equals "TestModel.notify_with_args"
@@ -48,5 +33,4 @@ Scenario: A handled exception sends a report
48
33
  And the event "metaData.job.max_attempts" equals 1
49
34
  And the event "metaData.job.payload.display_name" equals "TestModel.notify_with_args"
50
35
  And the event "metaData.job.payload.method_name" equals "notify_with_args"
51
- And the payload field "events.0.metaData.job.payload.args" is an array with 1 element
52
36
  And the payload field "events.0.metaData.job.payload.args.0" equals "Test"
@@ -1,5 +1,5 @@
1
- ARG RUBY_VERSION
2
- FROM ruby:$RUBY_VERSION
1
+ ARG RUBY_TEST_VERSION
2
+ FROM ruby:$RUBY_TEST_VERSION
3
3
 
4
4
  WORKDIR /bugsnag
5
5
  COPY temp-bugsnag-lib ./
@@ -13,5 +13,3 @@ COPY app/ /usr/src/app
13
13
  RUN bundle exec rake rails:update:bin
14
14
  RUN bundle exec bin/rails generate delayed_job:active_record
15
15
  RUN bundle exec rake db:migrate
16
-
17
- CMD ["bundle", "exec", "rake", "jobs:work"]
@@ -13,7 +13,7 @@ gem 'therubyracer'
13
13
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
14
14
  gem 'rails', '~> 5.0.7'
15
15
  # Use sqlite3 as the database for Active Record
16
- gem 'sqlite3'
16
+ gem 'sqlite3', '~> 1.3.6'
17
17
  # Use Puma as the app server
18
18
  gem 'puma', '~> 3.0'
19
19
  # Use SCSS for stylesheets
@@ -4,3 +4,21 @@
4
4
  require_relative 'config/application'
5
5
 
6
6
  Rails.application.load_tasks
7
+
8
+ namespace :delayed_job_tests do
9
+ task :fail_with_args do
10
+ run_delayed_job_test('"TestModel.delay.fail_with_args(\"Test\")"')
11
+ end
12
+
13
+ task :notify_with_args do
14
+ run_delayed_job_test('"TestModel.delay.notify_with_args(\"Test\")"')
15
+ end
16
+ end
17
+
18
+ def run_delayed_job_test(command)
19
+ fork do
20
+ system("rake jobs:work")
21
+ end
22
+ system("rails runner #{command}")
23
+ Process.wait
24
+ end
@@ -1,4 +1,4 @@
1
- version: '3.4'
1
+ version: '3.6'
2
2
  services:
3
3
  # dep for job systems
4
4
  redis:
@@ -11,8 +11,7 @@ services:
11
11
  build:
12
12
  context: plain
13
13
  args:
14
- - RUBY_VERSION
15
- - APP_PATH
14
+ - RUBY_TEST_VERSION
16
15
  environment:
17
16
  - BUGSNAG_API_KEY
18
17
  - http_proxy
@@ -38,12 +37,16 @@ services:
38
37
  - BUGSNAG_TIMEOUT
39
38
  - CALLBACK_INITIATOR
40
39
  restart: "no"
40
+ networks:
41
+ default:
42
+ aliases:
43
+ - plain
41
44
 
42
45
  delayed_job:
43
46
  build:
44
47
  context: delayed_job
45
48
  args:
46
- RUBY_VERSION: 2.5
49
+ RUBY_TEST_VERSION: 2.5
47
50
  environment:
48
51
  - BUGSNAG_API_KEY
49
52
  - http_proxy
@@ -73,29 +76,25 @@ services:
73
76
  build:
74
77
  context: rack1
75
78
  args:
76
- - RUBY_VERSION
79
+ - RUBY_TEST_VERSION
77
80
  environment:
78
81
  - endpoint
79
- ports:
80
- - "3001:3000"
81
82
  restart: "no"
83
+
82
84
  rack2:
83
85
  build:
84
86
  context: rack2
85
87
  args:
86
- - RUBY_VERSION
88
+ - RUBY_TEST_VERSION
87
89
  environment:
88
90
  - endpoint
89
- ports:
90
- - "3002:3000"
91
91
  restart: "no"
92
92
 
93
93
  rails3:
94
94
  build:
95
95
  context: rails3
96
96
  args:
97
- - RUBY_VERSION
98
- - APP_PATH
97
+ - RUBY_TEST_VERSION
99
98
  environment:
100
99
  - BUGSNAG_API_KEY
101
100
  - http_proxy
@@ -122,17 +121,13 @@ services:
122
121
  - CALLBACK_INITIATOR
123
122
  - SQL_ONLY_BREADCRUMBS
124
123
  - USE_DEFAULT_AUTO_CAPTURE_SESSIONS
125
- ports:
126
- - target: 3000
127
- published: 61283
128
124
  restart: "no"
129
125
 
130
126
  rails4:
131
127
  build:
132
128
  context: rails4
133
129
  args:
134
- - RUBY_VERSION
135
- - APP_PATH
130
+ - RUBY_TEST_VERSION
136
131
  depends_on:
137
132
  - mongo
138
133
  environment:
@@ -161,17 +156,13 @@ services:
161
156
  - CALLBACK_INITIATOR
162
157
  - SQL_ONLY_BREADCRUMBS
163
158
  - USE_DEFAULT_AUTO_CAPTURE_SESSIONS
164
- ports:
165
- - target: 3000
166
- published: 61284
167
159
  restart: "no"
168
160
 
169
161
  rails5:
170
162
  build:
171
163
  context: rails5
172
164
  args:
173
- - RUBY_VERSION
174
- - APP_PATH
165
+ - RUBY_TEST_VERSION
175
166
  depends_on:
176
167
  - mongo
177
168
  environment:
@@ -200,17 +191,15 @@ services:
200
191
  - CALLBACK_INITIATOR
201
192
  - SQL_ONLY_BREADCRUMBS
202
193
  - USE_DEFAULT_AUTO_CAPTURE_SESSIONS
203
- ports:
204
- - target: 3000
205
- published: 61285
206
194
  restart: "no"
207
195
 
208
196
  rails6:
209
197
  build:
210
198
  context: rails6
211
199
  args:
212
- - RUBY_VERSION
213
- - APP_PATH
200
+ - RUBY_TEST_VERSION
201
+ depends_on:
202
+ - mongo
214
203
  environment:
215
204
  - BUGSNAG_API_KEY
216
205
  - http_proxy
@@ -237,17 +226,17 @@ services:
237
226
  - CALLBACK_INITIATOR
238
227
  - SQL_ONLY_BREADCRUMBS
239
228
  - USE_DEFAULT_AUTO_CAPTURE_SESSIONS
240
- ports:
241
- - target: 3000
242
- published: 61286
243
229
  restart: "no"
230
+ networks:
231
+ default:
232
+ aliases:
233
+ - rails6
244
234
 
245
235
  resque:
246
236
  build:
247
237
  context: resque
248
238
  args:
249
- - RUBY_VERSION
250
- - APP_PATH
239
+ - RUBY_TEST_VERSION
251
240
  depends_on:
252
241
  - redis
253
242
  environment:
@@ -258,8 +247,7 @@ services:
258
247
  build:
259
248
  context: sidekiq
260
249
  args:
261
- - RUBY_VERSION
262
- - APP_PATH
250
+ - RUBY_TEST_VERSION
263
251
  - SIDEKIQ_VERSION
264
252
  depends_on:
265
253
  - redis
@@ -292,20 +280,20 @@ services:
292
280
  build:
293
281
  context: sinatra1
294
282
  args:
295
- - RUBY_VERSION
283
+ - RUBY_TEST_VERSION
296
284
  environment:
297
285
  - endpoint
298
- ports:
299
- - "3006:3000"
300
286
  restart: "no"
301
287
 
302
288
  sinatra2:
303
289
  build:
304
290
  context: sinatra2
305
291
  args:
306
- - RUBY_VERSION
292
+ - RUBY_TEST_VERSION
307
293
  environment:
308
294
  - endpoint
309
- ports:
310
- - "3007:3000"
311
295
  restart: "no"
296
+
297
+ networks:
298
+ default:
299
+ name: ${NETWORK_NAME}