bugsnag 6.8.0 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +1 -0
  3. data/.travis.yml +12 -7
  4. data/CHANGELOG.md +12 -0
  5. data/README.md +1 -1
  6. data/VERSION +1 -1
  7. data/features/.gitignore +1 -0
  8. data/features/delayed_job.feature +53 -0
  9. data/features/fixtures/delayed_job/Dockerfile +10 -5
  10. data/features/fixtures/delayed_job/app/.gitignore +21 -0
  11. data/features/fixtures/delayed_job/app/Gemfile +57 -0
  12. data/features/fixtures/delayed_job/app/README.md +24 -0
  13. data/features/fixtures/delayed_job/app/Rakefile +6 -0
  14. data/features/fixtures/delayed_job/app/app/assets/config/manifest.js +3 -0
  15. data/features/fixtures/delayed_job/app/app/assets/images/.keep +0 -0
  16. data/features/fixtures/delayed_job/app/app/assets/javascripts/application.js +16 -0
  17. data/features/fixtures/delayed_job/app/app/assets/javascripts/cable.js +13 -0
  18. data/features/fixtures/delayed_job/app/app/assets/javascripts/channels/.keep +0 -0
  19. data/features/fixtures/delayed_job/app/app/assets/stylesheets/application.css +15 -0
  20. data/features/fixtures/delayed_job/app/app/channels/application_cable/channel.rb +4 -0
  21. data/features/fixtures/delayed_job/app/app/channels/application_cable/connection.rb +4 -0
  22. data/features/fixtures/delayed_job/app/app/controllers/application_controller.rb +3 -0
  23. data/features/fixtures/delayed_job/app/app/controllers/concerns/.keep +0 -0
  24. data/features/fixtures/delayed_job/app/app/helpers/application_helper.rb +2 -0
  25. data/features/fixtures/delayed_job/app/app/jobs/application_job.rb +2 -0
  26. data/features/fixtures/delayed_job/app/app/mailers/application_mailer.rb +4 -0
  27. data/features/fixtures/delayed_job/app/app/models/application_record.rb +3 -0
  28. data/features/fixtures/delayed_job/app/app/models/concerns/.keep +0 -0
  29. data/features/fixtures/delayed_job/app/app/models/test_model.rb +10 -0
  30. data/features/fixtures/delayed_job/app/app/views/layouts/application.html.erb +14 -0
  31. data/features/fixtures/delayed_job/app/app/views/layouts/mailer.html.erb +13 -0
  32. data/features/fixtures/delayed_job/app/app/views/layouts/mailer.text.erb +1 -0
  33. data/features/fixtures/delayed_job/app/config.ru +5 -0
  34. data/features/fixtures/delayed_job/app/config/application.rb +15 -0
  35. data/features/fixtures/delayed_job/app/config/boot.rb +3 -0
  36. data/features/fixtures/delayed_job/app/config/cable.yml +9 -0
  37. data/features/fixtures/delayed_job/app/config/database.yml +25 -0
  38. data/features/fixtures/delayed_job/app/config/environment.rb +5 -0
  39. data/features/fixtures/delayed_job/app/config/environments/development.rb +54 -0
  40. data/features/fixtures/delayed_job/app/config/environments/production.rb +86 -0
  41. data/features/fixtures/delayed_job/app/config/environments/test.rb +42 -0
  42. data/features/fixtures/delayed_job/app/config/initializers/application_controller_renderer.rb +8 -0
  43. data/features/fixtures/delayed_job/app/config/initializers/assets.rb +11 -0
  44. data/features/fixtures/delayed_job/app/config/initializers/backtrace_silencers.rb +7 -0
  45. data/features/fixtures/delayed_job/app/config/initializers/bugsnag.rb +14 -0
  46. data/features/fixtures/delayed_job/app/config/initializers/cookies_serializer.rb +5 -0
  47. data/features/fixtures/delayed_job/app/config/initializers/delayed_job.rb +3 -0
  48. data/features/fixtures/delayed_job/app/config/initializers/filter_parameter_logging.rb +4 -0
  49. data/features/fixtures/delayed_job/app/config/initializers/inflections.rb +16 -0
  50. data/features/fixtures/delayed_job/app/config/initializers/mime_types.rb +4 -0
  51. data/features/fixtures/delayed_job/app/config/initializers/new_framework_defaults.rb +26 -0
  52. data/features/fixtures/delayed_job/app/config/initializers/session_store.rb +3 -0
  53. data/features/fixtures/delayed_job/app/config/initializers/wrap_parameters.rb +14 -0
  54. data/features/fixtures/delayed_job/app/config/locales/en.yml +23 -0
  55. data/features/fixtures/delayed_job/app/config/puma.rb +47 -0
  56. data/features/fixtures/delayed_job/app/config/routes.rb +3 -0
  57. data/features/fixtures/delayed_job/app/config/secrets.yml +22 -0
  58. data/features/fixtures/delayed_job/app/config/spring.rb +6 -0
  59. data/features/fixtures/delayed_job/app/db/migrate/20181024232549_create_delayed_jobs.rb +22 -0
  60. data/features/fixtures/delayed_job/app/db/migrate/20181024232817_create_test_models.rb +8 -0
  61. data/features/fixtures/delayed_job/app/db/schema.rb +30 -0
  62. data/features/fixtures/delayed_job/app/db/seeds.rb +7 -0
  63. data/features/fixtures/delayed_job/app/lib/assets/.keep +0 -0
  64. data/features/fixtures/delayed_job/app/lib/tasks/.keep +0 -0
  65. data/features/fixtures/delayed_job/app/log/.keep +0 -0
  66. data/features/fixtures/delayed_job/app/public/404.html +67 -0
  67. data/features/fixtures/delayed_job/app/public/422.html +67 -0
  68. data/features/fixtures/delayed_job/app/public/500.html +66 -0
  69. data/features/fixtures/delayed_job/app/public/apple-touch-icon-precomposed.png +0 -0
  70. data/features/fixtures/delayed_job/app/public/apple-touch-icon.png +0 -0
  71. data/features/fixtures/delayed_job/app/public/favicon.ico +0 -0
  72. data/features/fixtures/delayed_job/app/public/robots.txt +5 -0
  73. data/features/fixtures/delayed_job/app/test/controllers/.keep +0 -0
  74. data/features/fixtures/delayed_job/app/test/fixtures/.keep +0 -0
  75. data/features/fixtures/delayed_job/app/test/fixtures/files/.keep +0 -0
  76. data/features/fixtures/delayed_job/app/test/fixtures/test_models.yml +11 -0
  77. data/features/fixtures/delayed_job/app/test/helpers/.keep +0 -0
  78. data/features/fixtures/delayed_job/app/test/integration/.keep +0 -0
  79. data/features/fixtures/delayed_job/app/test/mailers/.keep +0 -0
  80. data/features/fixtures/delayed_job/app/test/models/.keep +0 -0
  81. data/features/fixtures/delayed_job/app/test/models/test_model_test.rb +7 -0
  82. data/features/fixtures/delayed_job/app/test/test_helper.rb +10 -0
  83. data/features/fixtures/delayed_job/app/tmp/.keep +0 -0
  84. data/features/fixtures/docker-compose.yml +24 -4
  85. data/features/sidekiq.feature +3 -1
  86. data/features/steps/ruby_notifier_steps.rb +0 -33
  87. data/features/support/env.rb +18 -0
  88. data/lib/bugsnag.rb +1 -0
  89. data/lib/bugsnag/integrations/delayed_job.rb +21 -78
  90. data/lib/bugsnag/integrations/sidekiq.rb +34 -19
  91. data/lib/bugsnag/middleware/delayed_job.rb +73 -0
  92. data/spec/integrations/sidekiq_spec.rb +51 -16
  93. metadata +80 -6
  94. data/features/fixtures/delayed_job/.dockerignore +0 -1
  95. data/features/fixtures/delayed_job/Gemfile +0 -4
  96. data/spec/integrations/delayed_job_spec.rb +0 -118
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8882dc5d19d25ae75a753fa792ea78b11a560d4a243476da2c83d1d4a305398
4
- data.tar.gz: 2ea9b4a31d64680adb7da9bc9d263bdae884bd73809104afb9f95e191b8f745f
3
+ metadata.gz: 605acdc244d830e20748ce790d64b0f74b1fea4c33f7ba65df14d51e632ed035
4
+ data.tar.gz: eda01aab79404d506323aca686fdcaa808a285162c15e860e27d4ba61ca845b2
5
5
  SHA512:
6
- metadata.gz: 7eafa6a7c6fad28e286a108b0886459197a7d835a705adb27982d50c66a68c45309b18ca068a4ee7d8c7c61e9df1e80de7f77c5cd548793a5349faf6a155e7dd
7
- data.tar.gz: 65d479960f64808cc316a3a95c143cdb8e349e0a7b2ec2b91bd3ad2a9a4f772731e00eb0074b5802f15138e365d3cc99ef640f73c6566ba8e7c0dce32d259f41
6
+ metadata.gz: 0ab2e74a4cd3d7add6be58a22c2eefc366d6ee97791bf8a81c4cba32e847dd4bf6397704322264861d64c745a1c0b52aab2adc4964814ccc33e943d153776066
7
+ data.tar.gz: 2941712b666e84a6c93dcbaa5ddb38d433d57138af6f06eac7ba6500e3d5a6cce989e1560a9780b6a222cf41b2b5d7c30777381060458ed5632ed95b7a5e5c6c
@@ -244,6 +244,7 @@ Lint/RescueException:
244
244
  - 'lib/bugsnag/integrations/rake.rb'
245
245
  - 'lib/bugsnag/integrations/shoryuken.rb'
246
246
  - 'lib/bugsnag/integrations/sidekiq.rb'
247
+ - 'lib/bugsnag/integrations/delayed_job.rb'
247
248
 
248
249
  # Offense count: 6
249
250
  # Cop supports --auto-correct.
@@ -26,12 +26,12 @@ jobs:
26
26
  - BUNDLE_VERSION=1.12.0
27
27
  - GEMSETS=test
28
28
  - stage: test
29
- rvm: 2.0.0
29
+ rvm: 2.0
30
30
  env:
31
31
  - BUNDLE_VERSION=1.12.0
32
32
  - GEMSETS=test
33
33
  - stage: test
34
- rvm: 2.1.
34
+ rvm: 2.1
35
35
  env:
36
36
  - BUNDLE_VERSION=1.12.0
37
37
  - GEMSETS=test
@@ -39,22 +39,27 @@ jobs:
39
39
  env:
40
40
  - BUNDLE_VERSION=1.12.0
41
41
  - GEMSETS="test sidekiq"
42
- rvm: 2.2.4
42
+ rvm: 2.2
43
43
  - stage: test
44
44
  env:
45
45
  - BUNDLE_VERSION=1.12.0
46
- - GEMSETS="test sidekiq coverage"
47
- rvm: 2.3.0
46
+ - GEMSETS="test sidekiq"
47
+ rvm: 2.3
48
48
  - stage: test
49
49
  env:
50
50
  - BUNDLE_VERSION=1.12.0
51
51
  - GEMSETS="test sidekiq"
52
- rvm: 2.4.1
52
+ rvm: 2.4
53
+ - stage: test
54
+ env:
55
+ - BUNDLE_VERSION=1.12.0
56
+ - GEMSETS="test sidekiq coverage"
57
+ rvm: 2.5
53
58
  - stage: test
54
59
  env:
55
60
  - BUNDLE_VERSION=1.12.0
56
61
  - GEMSETS="test rubocop"
57
- rvm: 2.4.1
62
+ rvm: 2.5
58
63
  script: bundle exec ./bin/rubocop lib/
59
64
  # - stage: test
60
65
  # addons:
@@ -1,6 +1,18 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 6.9.0 (12 Nov 2018)
5
+
6
+ ### Enhancements
7
+
8
+ * Ensure the correct error handler is used in newer versions of Sidekiq
9
+ | [#434](https://github.com/bugsnag/bugsnag-ruby/pull/434)
10
+
11
+ * Rewrite Delayed::Job integration to fix potential issues and add more
12
+ collected data
13
+ | [#492](https://github.com/bugsnag/bugsnag-ruby/pull/492)
14
+ | [Simon Maynard](https://github.com/snmaynard)
15
+
4
16
  ## 6.8.0 (11 Jul 2018)
5
17
 
6
18
  This release includes general performance improvements to payload trimming and
data/README.md CHANGED
@@ -7,7 +7,7 @@ The Bugsnag exception reporter for Ruby gives you instant notification of except
7
7
  ## Features
8
8
 
9
9
  * Automatically report unhandled exceptions and crashes
10
- * Report handled exceptions
10
+ * Report handled exceptions
11
11
  * Attach user information to determine how many people are affected by a crash
12
12
  * Send customized diagnostic data
13
13
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.8.0
1
+ 6.9.0
@@ -0,0 +1 @@
1
+ temp-bugsnag-lib
@@ -0,0 +1,53 @@
1
+ Feature: Bugsnag detects errors in Delayed job workers
2
+
3
+ Background:
4
+ Given I set environment variable "BUGSNAG_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
5
+ And I set environment variable "MAZE_API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa"
6
+ And I configure the bugsnag endpoint
7
+
8
+ Scenario: An unhandled RuntimeError sends a report with arguments
9
+ Given I set environment variable "RUBY_VERSION" to "2.5"
10
+ And I start the service "delayed_job"
11
+ And I run the command "bundle exec rails runner 'TestModel.delay.fail_with_args(\"Test\")'" on the service "delayed_job"
12
+ And I wait for 5 seconds
13
+ Then I should receive a request
14
+ And the request used the Ruby notifier
15
+ And the request used payload v4 headers
16
+ And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
17
+ And the event "unhandled" is true
18
+ And the event "severity" is "error"
19
+ And the event "context" is "TestModel.fail_with_args"
20
+ And the event "severityReason.type" is "unhandledExceptionMiddleware"
21
+ And the event "severityReason.attributes.framework" is "DelayedJob"
22
+ And the exception "errorClass" equals "RuntimeError"
23
+ And the event "metaData.job.class" equals "Delayed::Backend::ActiveRecord::Job"
24
+ And the event "metaData.job.id" is not null
25
+ And the event "metaData.job.attempt" equals 1
26
+ And the event "metaData.job.max_attempts" equals 1
27
+ And the event "metaData.job.payload.display_name" equals "TestModel.fail_with_args"
28
+ And the event "metaData.job.payload.method_name" equals "fail_with_args"
29
+ And the payload field "events.0.metaData.job.payload.args" is an array with 1 element
30
+ And the payload field "events.0.metaData.job.payload.args.0" equals "Test"
31
+
32
+ Scenario: A handled exception sends a report
33
+ Given I set environment variable "RUBY_VERSION" to "2.5"
34
+ And I start the service "delayed_job"
35
+ And I run the command "bundle exec rails runner 'TestModel.delay.notify_with_args(\"Test\")'" on the service "delayed_job"
36
+ And I wait for 5 seconds
37
+ Then I should receive a request
38
+ And the request used the Ruby notifier
39
+ And the request used payload v4 headers
40
+ And the request contained the api key "a35a2a72bd230ac0aa0f52715bbdc6aa"
41
+ And the event "unhandled" is false
42
+ And the event "severity" is "warning"
43
+ And the event "context" is "TestModel.notify_with_args"
44
+ And the event "severityReason.type" is "handledException"
45
+ And the exception "errorClass" equals "RuntimeError"
46
+ And the event "metaData.job.class" equals "Delayed::Backend::ActiveRecord::Job"
47
+ And the event "metaData.job.id" is not null
48
+ And the event "metaData.job.attempt" equals 1
49
+ And the event "metaData.job.max_attempts" equals 1
50
+ And the event "metaData.job.payload.display_name" equals "TestModel.notify_with_args"
51
+ And the event "metaData.job.payload.method_name" equals "notify_with_args"
52
+ And the payload field "events.0.metaData.job.payload.args" is an array with 1 element
53
+ And the payload field "events.0.metaData.job.payload.args.0" equals "Test"
@@ -1,12 +1,17 @@
1
1
  ARG ruby_version
2
2
  FROM ruby:$ruby_version
3
3
 
4
- RUN mkdir -p /usr/src/app
5
- WORKDIR /usr/src/app
4
+ WORKDIR /bugsnag
5
+ COPY temp-bugsnag-lib ./
6
6
 
7
- COPY Gemfile /usr/src/app/
7
+ WORKDIR /usr/src/app
8
+ COPY app/Gemfile /usr/src/app/
8
9
  RUN bundle install
9
10
 
10
- COPY . /usr/src/app
11
+ COPY app/ /usr/src/app
12
+
13
+ RUN bundle exec rake rails:update:bin
14
+ RUN bundle exec bin/rails generate delayed_job:active_record
15
+ RUN bundle exec rake db:migrate
11
16
 
12
- CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]
17
+ CMD ["bundle", "exec", "rake", "jobs:work"]
@@ -0,0 +1,21 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*
16
+ /tmp/*
17
+ !/log/.keep
18
+ !/tmp/.keep
19
+
20
+ # Ignore Byebug command history file.
21
+ .byebug_history
@@ -0,0 +1,57 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
8
+ gem 'bugsnag', path: '/bugsnag'
9
+ gem 'delayed_job'
10
+ gem 'delayed_job_active_record'
11
+ gem 'therubyracer'
12
+
13
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
14
+ gem 'rails', '~> 5.0.7'
15
+ # Use sqlite3 as the database for Active Record
16
+ gem 'sqlite3'
17
+ # Use Puma as the app server
18
+ gem 'puma', '~> 3.0'
19
+ # Use SCSS for stylesheets
20
+ gem 'sass-rails', '~> 5.0'
21
+ # Use Uglifier as compressor for JavaScript assets
22
+ gem 'uglifier', '>= 1.3.0'
23
+ # Use CoffeeScript for .coffee assets and views
24
+ gem 'coffee-rails', '~> 4.2'
25
+ # See https://github.com/rails/execjs#readme for more supported runtimes
26
+ # gem 'therubyracer', platforms: :ruby
27
+
28
+ # Use jquery as the JavaScript library
29
+ gem 'jquery-rails'
30
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
31
+ gem 'turbolinks', '~> 5'
32
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
33
+ gem 'jbuilder', '~> 2.5'
34
+ # Use Redis adapter to run Action Cable in production
35
+ # gem 'redis', '~> 3.0'
36
+ # Use ActiveModel has_secure_password
37
+ # gem 'bcrypt', '~> 3.1.7'
38
+
39
+ # Use Capistrano for deployment
40
+ # gem 'capistrano-rails', group: :development
41
+
42
+ group :development, :test do
43
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
44
+ gem 'byebug', platform: :mri
45
+ end
46
+
47
+ group :development do
48
+ # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
49
+ gem 'web-console', '>= 3.3.0'
50
+ gem 'listen', '~> 3.0.5'
51
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
52
+ gem 'spring'
53
+ gem 'spring-watcher-listen', '~> 2.0.0'
54
+ end
55
+
56
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
57
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
@@ -0,0 +1,24 @@
1
+ # README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require turbolinks
16
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the rails generate channel command.
3
+ //
4
+ //= require action_cable
5
+ //= require_self
6
+ //= require_tree ./channels
7
+
8
+ (function() {
9
+ this.App || (this.App = {});
10
+
11
+ App.cable = ActionCable.createConsumer();
12
+
13
+ }).call(this);
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,10 @@
1
+ class TestModel < ApplicationRecord
2
+
3
+ def self.fail_with_args(a)
4
+ raise "uh oh"
5
+ end
6
+
7
+ def self.notify_with_args(a)
8
+ Bugsnag.notify(RuntimeError.new("Handled exception"))
9
+ end
10
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>App</title>
5
+ <%= csrf_meta_tags %>
6
+
7
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9
+ </head>
10
+
11
+ <body>
12
+ <%= yield %>
13
+ </body>
14
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1,5 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application