rails-informant 0.4.1 → 0.4.2

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: 241dedb8b97e9cc3b60ad1275e6bfd61393fd07b253599c3f3b7cad7829dc2dc
4
- data.tar.gz: 6b2f6737c9464c416c154ceceecf94c4226419d3f3a84c4a8987216bbeb7cd86
3
+ metadata.gz: 206cb69356bdf4d40de95e2435428cf0413f85ed56f7cdbed4912431fb2ddd6e
4
+ data.tar.gz: c2c7b3844c83ae2e92d389a9f8d914dfc3b4ff6ea599f741a6e31cdf10866254
5
5
  SHA512:
6
- metadata.gz: 80ba0bbe5494c3af170c392bd869c5dd2e9d573223fa4c10ddaab315c5dd8961b12d1958245f242e9670b5b1ab4fb4dba7b0ad04177cd7d992b0840d8b2ba8de
7
- data.tar.gz: a408c05da27d4c37d1f557bc8f9fc52bb81202909fdcf4abb37862d7b14ac86c3c17f558546c6df77767507f45da894eb5ae6da317d1116dba93ab816b44c343
6
+ metadata.gz: 19e1887a018a41d07163385fc1a7868ea21f33ea9599de3c6f8aaae309c2939f93c386fc7a21582e109ff15c8df5f21702f1aed77bd2b92af5beb41bb26f73c6
7
+ data.tar.gz: 5bd2451b4a52590e2687c2009b6603a5e1a2df42451508ad0bc1e24f5cb86377020bbb6b79336c2aa1fe2213061c4235911046b9423aaf575fcd2c2db47ffe31
@@ -9,6 +9,7 @@ module RailsInformant
9
9
  module NotificationPolicy
10
10
  COOLDOWN = 1.hour
11
11
  MILESTONE_COUNTS = [ 10, 100, 1000 ].freeze
12
+ SILENT_STATUSES = %w[duplicate ignored].freeze
12
13
 
13
14
  PRIVATE_NETWORKS = [
14
15
  IPAddr.new("0.0.0.0/8"), # "This" network
@@ -30,6 +31,7 @@ module RailsInformant
30
31
  ].freeze
31
32
 
32
33
  def should_notify?(error_group)
34
+ return false if error_group.status.in?(SILENT_STATUSES)
33
35
  return true if error_group.total_occurrences == 1
34
36
  return true if error_group.total_occurrences.in?(MILESTONE_COUNTS)
35
37
  return true if error_group.last_notified_at.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-informant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel López Prat