exception_notification 4.5.0 → 5.0.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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +16 -0
  3. data/CONTRIBUTING.md +23 -51
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +346 -0
  6. data/README.md +149 -59
  7. data/Rakefile +14 -7
  8. data/docs/notifiers/slack.md +0 -7
  9. data/exception_notification.gemspec +28 -31
  10. data/gemfiles/pinned_dependencies.gemfile +8 -0
  11. data/gemfiles/rails7_1.gemfile +5 -0
  12. data/gemfiles/rails7_2.gemfile +5 -0
  13. data/gemfiles/rails8_0.gemfile +5 -0
  14. data/lib/exception_notification/rack.rb +4 -4
  15. data/lib/exception_notification/rails/runner_tie.rb +31 -0
  16. data/lib/exception_notification/rails.rb +16 -0
  17. data/lib/exception_notification/rake.rb +56 -0
  18. data/lib/exception_notification/resque.rb +2 -2
  19. data/lib/exception_notification/sidekiq.rb +8 -23
  20. data/lib/exception_notification/version.rb +1 -1
  21. data/lib/exception_notification.rb +3 -3
  22. data/lib/exception_notifier/datadog_notifier.rb +26 -26
  23. data/lib/exception_notifier/email_notifier.rb +34 -30
  24. data/lib/exception_notifier/google_chat_notifier.rb +9 -9
  25. data/lib/exception_notifier/hipchat_notifier.rb +12 -12
  26. data/lib/exception_notifier/irc_notifier.rb +6 -6
  27. data/lib/exception_notifier/mattermost_notifier.rb +13 -13
  28. data/lib/exception_notifier/modules/error_grouping.rb +5 -5
  29. data/lib/exception_notifier/modules/formatter.rb +12 -12
  30. data/lib/exception_notifier/notifier.rb +3 -3
  31. data/lib/exception_notifier/slack_notifier.rb +18 -15
  32. data/lib/exception_notifier/sns_notifier.rb +9 -9
  33. data/lib/exception_notifier/teams_notifier.rb +66 -59
  34. data/lib/exception_notifier/views/exception_notifier/_data.html.erb +1 -1
  35. data/lib/exception_notifier/views/exception_notifier/_data.text.erb +1 -1
  36. data/lib/exception_notifier/views/exception_notifier/_session.html.erb +1 -1
  37. data/lib/exception_notifier/views/exception_notifier/_session.text.erb +1 -1
  38. data/lib/exception_notifier/webhook_notifier.rb +3 -3
  39. data/lib/exception_notifier.rb +27 -26
  40. data/lib/generators/exception_notification/install_generator.rb +8 -8
  41. data/lib/generators/exception_notification/templates/exception_notification.rb.erb +28 -27
  42. data/test/exception_notification/rack_test.rb +14 -14
  43. data/test/exception_notification/rake_test.rb +38 -0
  44. data/test/exception_notification/resque_test.rb +14 -14
  45. data/test/exception_notifier/datadog_notifier_test.rb +47 -46
  46. data/test/exception_notifier/email_notifier_test.rb +89 -104
  47. data/test/exception_notifier/google_chat_notifier_test.rb +77 -77
  48. data/test/exception_notifier/hipchat_notifier_test.rb +76 -80
  49. data/test/exception_notifier/irc_notifier_test.rb +26 -26
  50. data/test/exception_notifier/mattermost_notifier_test.rb +77 -77
  51. data/test/exception_notifier/modules/error_grouping_test.rb +39 -39
  52. data/test/exception_notifier/modules/formatter_test.rb +51 -49
  53. data/test/exception_notifier/sidekiq_test.rb +21 -10
  54. data/test/exception_notifier/slack_notifier_test.rb +66 -67
  55. data/test/exception_notifier/sns_notifier_test.rb +73 -70
  56. data/test/exception_notifier/teams_notifier_test.rb +33 -33
  57. data/test/exception_notifier/webhook_notifier_test.rb +34 -34
  58. data/test/exception_notifier_test.rb +51 -41
  59. data/test/test_helper.rb +8 -11
  60. metadata +58 -99
  61. data/Appraisals +0 -9
  62. data/examples/sample_app.rb +0 -56
  63. data/examples/sinatra/Gemfile +0 -10
  64. data/examples/sinatra/Gemfile.lock +0 -95
  65. data/examples/sinatra/Procfile +0 -2
  66. data/examples/sinatra/README.md +0 -11
  67. data/examples/sinatra/config.ru +0 -5
  68. data/examples/sinatra/sinatra_app.rb +0 -40
  69. data/gemfiles/rails5_2.gemfile +0 -7
  70. data/gemfiles/rails6_0.gemfile +0 -7
  71. data/gemfiles/rails6_1.gemfile +0 -7
  72. data/gemfiles/rails7_0.gemfile +0 -7
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gem 'exception_notification', path: '../../'
6
-
7
- gem 'foreman'
8
- gem 'mailcatcher'
9
- gem 'sinatra', '~> 1.3.5'
10
- gem 'thin', '~> 1.5.1'
@@ -1,95 +0,0 @@
1
- PATH
2
- remote: ../../
3
- specs:
4
- exception_notification (3.0.1)
5
- actionmailer (>= 3.0.4)
6
- activesupport (>= 3.0.4)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- actionmailer (3.2.13)
12
- actionpack (= 3.2.13)
13
- mail (~> 2.5.3)
14
- actionpack (3.2.13)
15
- activemodel (= 3.2.13)
16
- activesupport (= 3.2.13)
17
- builder (~> 3.0.0)
18
- erubis (~> 2.7.0)
19
- journey (~> 1.0.4)
20
- rack (~> 1.4.5)
21
- rack-cache (~> 1.2)
22
- rack-test (~> 0.6.1)
23
- sprockets (~> 2.2.1)
24
- activemodel (3.2.13)
25
- activesupport (= 3.2.13)
26
- builder (~> 3.0.0)
27
- activesupport (3.2.13)
28
- i18n (= 0.6.1)
29
- multi_json (~> 1.0)
30
- builder (3.0.4)
31
- daemons (1.1.9)
32
- erubis (2.7.0)
33
- eventmachine (1.0.3)
34
- foreman (0.61.0)
35
- thor (>= 0.13.6)
36
- haml (4.0.2)
37
- tilt
38
- hike (1.2.1)
39
- i18n (0.6.1)
40
- journey (1.0.4)
41
- mail (2.5.3)
42
- i18n (>= 0.4.0)
43
- mime-types (~> 1.16)
44
- treetop (~> 1.4.8)
45
- mailcatcher (0.5.11)
46
- activesupport (~> 3.0)
47
- eventmachine (~> 1.0.0)
48
- haml (>= 3.1, < 5)
49
- mail (~> 2.3)
50
- sinatra (~> 1.2)
51
- skinny (~> 0.2.3)
52
- sqlite3 (~> 1.3)
53
- thin (~> 1.5.0)
54
- mime-types (1.22)
55
- multi_json (1.7.2)
56
- polyglot (0.3.3)
57
- rack (1.4.5)
58
- rack-cache (1.2)
59
- rack (>= 0.4)
60
- rack-protection (1.5.0)
61
- rack
62
- rack-test (0.6.2)
63
- rack (>= 1.0)
64
- sinatra (1.3.6)
65
- rack (~> 1.4)
66
- rack-protection (~> 1.3)
67
- tilt (~> 1.3, >= 1.3.3)
68
- skinny (0.2.3)
69
- eventmachine (~> 1.0.0)
70
- thin (~> 1.5.0)
71
- sprockets (2.2.2)
72
- hike (~> 1.2)
73
- multi_json (~> 1.0)
74
- rack (~> 1.0)
75
- tilt (~> 1.1, != 1.3.0)
76
- sqlite3 (1.3.7)
77
- thin (1.5.1)
78
- daemons (>= 1.0.9)
79
- eventmachine (>= 0.12.6)
80
- rack (>= 1.0.0)
81
- thor (0.18.1)
82
- tilt (1.3.6)
83
- treetop (1.4.12)
84
- polyglot
85
- polyglot (>= 0.3.1)
86
-
87
- PLATFORMS
88
- ruby
89
-
90
- DEPENDENCIES
91
- exception_notification!
92
- foreman
93
- mailcatcher
94
- sinatra (~> 1.3.5)
95
- thin (~> 1.5.1)
@@ -1,2 +0,0 @@
1
- web: bundle exec thin start --port 3000
2
- mail: bundle exec mailcatcher --foreground --smtp-port 1025 --http-port 1080
@@ -1,11 +0,0 @@
1
- # Using Exception Notification with Sinatra
2
-
3
- ## Quick start
4
-
5
- git clone git@github.com:smartinez87/exception_notification.git
6
- cd exception_notification/examples/sinatra
7
- bundle install
8
- bundle exec foreman start
9
-
10
-
11
- The last command starts two services, a smtp server and the sinatra app itself. Thus, visit [http://localhost:1080/](http://localhost:1080/) to check the emails sent and, in a separated tab, visit [http://localhost:3000](http://localhost:3000) and cause some errors. For more info, use the [source](https://github.com/smartinez87/exception_notification/blob/master/examples/sinatra/sinatra_app.rb) Luke.
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require ::File.expand_path('../sinatra_app', __FILE__)
4
-
5
- run SinatraApp
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rubygems'
4
- require 'bundler/setup'
5
- require 'sinatra/base'
6
- require 'exception_notification'
7
-
8
- class SinatraApp < Sinatra::Base
9
- use Rack::Config do |env|
10
- # This is highly recommended. It will prevent the ExceptionNotification email from including your users' passwords
11
- env['action_dispatch.parameter_filter'] = [:password]
12
- end
13
-
14
- use ExceptionNotification::Rack,
15
- email: {
16
- email_prefix: '[Example] ',
17
- sender_address: %("notifier" <notifier@example.com>),
18
- exception_recipients: %w[exceptions@example.com],
19
- smtp_settings: {
20
- address: 'localhost',
21
- port: 1025
22
- }
23
- }
24
-
25
- get '/' do
26
- raise StandardError, "ERROR: #{params[:error]}" unless params[:error].blank?
27
-
28
- 'Everything is fine! Now, lets break things clicking <a href="/?error=ops"> here </a>.' \
29
- 'Dont forget to see the emails at <a href="http://localhost:1080">mailcatcher</a> !'
30
- end
31
-
32
- get '/background_notification' do
33
- begin
34
- 1 / 0
35
- rescue StandardError => e
36
- ExceptionNotifier.notify_exception(e, data: { msg: 'Cannot divide by zero!' })
37
- end
38
- 'Check email at <a href="http://localhost:1080">mailcatcher</a>.'
39
- end
40
- end
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 5.2.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 6.0.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 6.1.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 7.0.0"
6
-
7
- gemspec path: "../"