error_radar 1.0.4 → 1.0.6

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: b7f170a894e4a6b29a0c95c2fc96630ba5ed1412eb7ee67bee2b547007bcc5c1
4
- data.tar.gz: 89574f8768d969fbd5e73c56d50d6f502f700ead1e258bd475db9164c6d298df
3
+ metadata.gz: e61377f5cc7c807daf772fd90bb0aa7bdde3e5e5ee5f28d189a08330eb63e84f
4
+ data.tar.gz: 1f3f335da43317a3fe7b14c7cd1b0c7a5a24780ced25800f789d17efd62311f7
5
5
  SHA512:
6
- metadata.gz: beee5c8c764906d4bfcf82c3726b29a0c4e8c226174c68c166af5ff0ae622bce4167644b8d7b202e825b8c481084c1defb00b3088e9c9af55a9eaec4cfdca882
7
- data.tar.gz: f337f436c786420fd9c9f13aec3d838e26d8f85365c13d4d30e3718204d2fb7166a692aa3667611388266fe8372a14ebfbd3cf908bca7e2d5e50cc1f87d7fd63
6
+ metadata.gz: 868c323dfd34134eb09ba2d4a0a1733d01fa75741f9cbafc015c7be18f3d828110d81b0f11e6f8c190d1c6c6d6623e745a28fea4c93086bd4174f61ec9ee679f
7
+ data.tar.gz: 7e0c1638239b754944e73b12cf5d832d2873ae643bf363ebe375a36771273106acdbe7c66d1dd8a6797587fba68a0957fab871e040237fd8e6fe0bb7f688c392
@@ -10,13 +10,13 @@ module ErrorRadar
10
10
  SEVERITY_ORDER = { 'critical' => 0, 'error' => 1, 'warning' => 2, 'info' => 3 }.freeze
11
11
 
12
12
  def index
13
+ # group(:status).count in Rails 7 returns string enum name keys:
14
+ # {"open"=>100, "resolved"=>97070, ...}
13
15
  counts_by_status = ErrorLog.group(:status).count
14
- # statuses returns {"open"=>0, "in_progress"=>1, "resolved"=>2, "ignored"=>3}
15
- inv = ErrorLog.statuses.invert
16
- @open_count = counts_by_status[ErrorLog.statuses['open']] || 0
17
- @in_progress = counts_by_status[ErrorLog.statuses['in_progress']] || 0
18
- @resolved_count = counts_by_status[ErrorLog.statuses['resolved']] || 0
19
- @ignored_count = counts_by_status[ErrorLog.statuses['ignored']] || 0
16
+ @open_count = counts_by_status['open'] || 0
17
+ @in_progress = counts_by_status['in_progress'] || 0
18
+ @resolved_count = counts_by_status['resolved'] || 0
19
+ @ignored_count = counts_by_status['ignored'] || 0
20
20
  @total = counts_by_status.values.sum
21
21
  @unresolved = @open_count + @in_progress
22
22
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ErrorRadar
4
- VERSION = '1.0.4'
4
+ VERSION = '1.0.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: error_radar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - chienbn9x
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-02 00:00:00.000000000 Z
11
+ date: 2026-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails