effective_resources 2.34.6 → 2.35.1
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 672690dc74b4292a6fcbc0ccf9c797ac14628361cf32cf4e219fc261cb8620a5
|
|
4
|
+
data.tar.gz: 218e8bf94c8a9df8750d817769381f84b84d6c5219d870675b2dc3e7a17ca000
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 250d906a19438d42a5e7d66bf3b550f550068c8938f005c35fe2a08f331a5f5283c94f82bc364f1e8ffcc603c31cf8029aec896aa017ddd60da219ff957c2bf1
|
|
7
|
+
data.tar.gz: 42342cadca0ba06a51721cdd08d0f0534256ee7eefcb490d2596a32601047ce5fdc2e7e88a7cc561fc06f6effdf7d6d194411c92b9378c543b821713e3f2bde7
|
|
@@ -76,11 +76,7 @@ module Effective
|
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
def notify_exception(exception, resource, action)
|
|
79
|
-
|
|
80
|
-
ExceptionNotifier.notify_exception(exception, env: request.env, data: { resource: resource, action: action })
|
|
81
|
-
else
|
|
82
|
-
raise(exception)
|
|
83
|
-
end
|
|
79
|
+
EffectiveResources.send_error(exception, resource: resource, action: action)
|
|
84
80
|
end
|
|
85
81
|
|
|
86
82
|
def resource_flash(status, resource, action, e: nil)
|
|
@@ -98,7 +98,7 @@ module ActsAsJobStatus
|
|
|
98
98
|
|
|
99
99
|
if job_status == :error
|
|
100
100
|
EffectiveLogger.error(exception.message, associated: self) if defined?(EffectiveLogger)
|
|
101
|
-
|
|
101
|
+
EffectiveResources.send_error(exception, id: id, class_name: self.class.name)
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
if job_status == :error && !ENV['TESTING_ACTS_AS_JOB_STATUS']
|
|
@@ -101,11 +101,11 @@ module EffectiveGem
|
|
|
101
101
|
|
|
102
102
|
if associated.kind_of?(ActiveRecord::Base)
|
|
103
103
|
EffectiveLogger.error(e.message, associated: associated, details: { email: email }) if defined?(EffectiveLogger)
|
|
104
|
-
|
|
104
|
+
EffectiveResources.send_error(e, email: email, associated_id: associated.id, associated_type: associated.class.name)
|
|
105
105
|
else
|
|
106
106
|
args_to_s = args.to_s.gsub('<', '').gsub('>', '')
|
|
107
107
|
EffectiveLogger.error(e.message, details: { email: email, args: args_to_s }) if defined?(EffectiveLogger)
|
|
108
|
-
|
|
108
|
+
EffectiveResources.send_error(e, email: email, details: args_to_s)
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
raise(e) unless Rails.env.production? || Rails.env.staging?
|
data/lib/effective_resources.rb
CHANGED
|
@@ -235,6 +235,25 @@ module EffectiveResources
|
|
|
235
235
|
et(resource, attribute).pluralize.downcase
|
|
236
236
|
end
|
|
237
237
|
|
|
238
|
+
def self.send_error(exception, **tags)
|
|
239
|
+
if defined?(Tenant)
|
|
240
|
+
tags = { tenant: Tenant.current || 'none' }.merge(tags)
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
tags = tags.transform_values(&:to_s)
|
|
244
|
+
|
|
245
|
+
if defined?(ExceptionNotifier)
|
|
246
|
+
ExceptionNotifier.notify_exception(exception, data: tags)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if defined?(Appsignal)
|
|
250
|
+
Appsignal.send_error(exception) do
|
|
251
|
+
Appsignal.add_tags(tags)
|
|
252
|
+
Appsignal.add_custom_data(tags)
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
|
|
238
257
|
def self.cache_key(*keys)
|
|
239
258
|
if defined?(Tenant)
|
|
240
259
|
[Tenant.current] + Array(keys).flatten
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.35.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|