honeybadger 5.15.3 → 5.15.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69b84047612b956b73078affe506c2d6e0002b7960b915be89c996add8c845a3
4
- data.tar.gz: ff6a0f6cd8cbf4854e7362999ab5e4734c9a959d483ced78f66c4fd1c444e1b4
3
+ metadata.gz: e02a98a2c03861bc6a34a783ed06bd0715986ebc533528ca2f96fab6baa12efb
4
+ data.tar.gz: 56b993ee11bca44d5035e75bedebeafab92c526e43dacbeae5a9a365c0b271ef
5
5
  SHA512:
6
- metadata.gz: 70aa645ac2e7deb9b94f055e41e0e9407eb9972089f9ecc33d5d58b2bb43c289d6255e67e005a51e83fe7e7a59ffdb45ec1010c200bfd5d3e731c9109d4b9928
7
- data.tar.gz: 0b1715ede2a528ccdb0e1344b31909139b860580911ff8580a54bf1ad4cc94e5a7b9168e2076ac9b371a2053a7e0cf09edc6adab50fb72e63a7173ef5dba046e
6
+ metadata.gz: 540df7f2914728534af986a1cab887e8867b48c106297ad3f0ae26d73eeeb402d239cc2f28aa1dd337224f020218ebaf5533f40cc2ebd8955734b025ae888e17
7
+ data.tar.gz: '068b34fc9de350eedcb916897cebe1afbb8ca60ecb7368f25ae9f548427a9ded5d77dc2cf23e311e13886125e49de263ff1f818f8c939deb53c62d89217fe4eb'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ## [5.15.4](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.3...v5.15.4) (2024-07-29)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * add back key for cache notification payloads ([#600](https://github.com/honeybadger-io/honeybadger-ruby/issues/600)) ([9779dd4](https://github.com/honeybadger-io/honeybadger-ruby/commit/9779dd4664a057bdb65a9144612f29c569ac4da5))
10
+
4
11
  ## [5.15.3](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.2...v5.15.3) (2024-07-25)
5
12
 
6
13
 
@@ -41,13 +41,33 @@ module Honeybadger
41
41
 
42
42
  class ActionControllerCacheSubscriber < NotificationSubscriber
43
43
  def format_payload(payload)
44
- payload.except(:key)
44
+ payload[:key] = ::ActiveSupport::Cache.expand_cache_key(payload[:key]) if payload[:key]
45
+ payload
45
46
  end
46
47
  end
47
48
 
48
49
  class ActiveSupportCacheSubscriber < NotificationSubscriber
49
50
  def format_payload(payload)
50
- payload.except(:key)
51
+ payload[:key] = ::ActiveSupport::Cache.expand_cache_key(payload[:key]) if payload[:key]
52
+ payload
53
+ end
54
+ end
55
+
56
+ class ActiveSupportCacheMultiSubscriber < NotificationSubscriber
57
+ def format_payload(payload)
58
+ payload[:key] = expand_cache_keys_from_payload(payload[:key])
59
+ payload[:hits] = expand_cache_keys_from_payload(payload[:hits])
60
+ payload
61
+ end
62
+
63
+ def expand_cache_keys_from_payload(data)
64
+ return unless data
65
+
66
+ data = data.keys if data.is_a?(Hash)
67
+
68
+ Array(data).map do |k|
69
+ ::ActiveSupport::Cache.expand_cache_key(k)
70
+ end
51
71
  end
52
72
  end
53
73
 
@@ -77,7 +77,8 @@ module Honeybadger
77
77
  if config.load_plugin_insights?(:rails)
78
78
  ::ActiveSupport::Notifications.subscribe(/(process_action|send_file|redirect_to|halted_callback|unpermitted_parameters)\.action_controller/, Honeybadger::ActionControllerSubscriber.new)
79
79
  ::ActiveSupport::Notifications.subscribe(/(write_fragment|read_fragment|expire_fragment|exist_fragment\?)\.action_controller/, Honeybadger::ActionControllerCacheSubscriber.new)
80
- ::ActiveSupport::Notifications.subscribe(/cache_(read|read_multi|generate|fetch_hit|write|write_multi|increment|decrement|delete|delete_multi|cleanup|prune|exist\?)\.active_support/, Honeybadger::ActiveSupportCacheSubscriber.new)
80
+ ::ActiveSupport::Notifications.subscribe(/cache_(read|generate|fetch_hit|write|increment|decrement|delete|cleanup|prune|exist\?)\.active_support/, Honeybadger::ActiveSupportCacheSubscriber.new)
81
+ ::ActiveSupport::Notifications.subscribe(/cache_(read_multi|write_multi|delete_multi\?)\.active_support/, Honeybadger::ActiveSupportCacheMultiSubscriber.new)
81
82
  ::ActiveSupport::Notifications.subscribe(/^render_(template|partial|collection)\.action_view/, Honeybadger::ActionViewSubscriber.new)
82
83
  ::ActiveSupport::Notifications.subscribe("sql.active_record", Honeybadger::ActiveRecordSubscriber.new)
83
84
  ::ActiveSupport::Notifications.subscribe("process.action_mailer", Honeybadger::ActionMailerSubscriber.new)
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = '5.15.3'.freeze
3
+ VERSION = '5.15.4'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.15.3
4
+ version: 5.15.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeybadger Industries LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-25 00:00:00.000000000 Z
11
+ date: 2024-07-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email: