exception_notification_server 0.0.4 → 0.0.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f18f7c744afb1e81f6c3c60a43eb269be34145bf
|
4
|
+
data.tar.gz: c3445a39e93d37fb457a7214717ec883c846e476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 491e6f38531f0248871a1ebf5d6b66076ca17d4757ca3d859899538ed8d1334aa249455a5738ff1ccff22d531b1bc637f7d781fbcda60455bed2cb54d0bb2f77
|
7
|
+
data.tar.gz: 47bf66be3e68d22d33aa44599a908c856a245fce4268ac7042cc66add62125fe74987a4804399799faa5b2bedddae7ed5444b9a0c884a3c0e95e0c27e34ecbeb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
@@ -83,7 +83,7 @@ module ExceptionNotificationServer
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def gen_exception_hash
|
86
|
-
Digest::SHA1.hexdigest("#{application}#{exception_class}#{exception_message}#{backtrace.to_s.gsub(rails_root, '')}")
|
86
|
+
Digest::SHA1.hexdigest("#{application}#{exception_class}#{exception_message.gsub(/#<([a-zA-z]*):([0-9abcdefx]*)>/, '#<\1>')}#{backtrace.to_s.gsub(rails_root, '')}")
|
87
87
|
end
|
88
88
|
|
89
89
|
def base_id
|
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: exception_notification_server 0.0.
|
5
|
+
# stub: exception_notification_server 0.0.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = 'exception_notification_server'
|
9
|
-
s.version = '0.0.
|
9
|
+
s.version = '0.0.5'
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ['lib']
|
13
13
|
s.authors = ['Anatoliy Varanitsa']
|
14
|
-
s.date = '2015-10-
|
14
|
+
s.date = '2015-10-21'
|
15
15
|
s.description = 'Gem that receive errors from exception_notification gem and show it grouped on pages'
|
16
16
|
s.email = 'Prizrack13@mail.ru'
|
17
17
|
s.extra_rdoc_files = [
|
@@ -1,4 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
namespace :exception_notification_server do
|
2
|
+
desc 'Regenerate notification HASH'
|
3
|
+
task regenerate_hash: :environment do
|
4
|
+
notifications = ExceptionNotificationServer::Notification.order(:id).all
|
5
|
+
exception_hashes = {}
|
6
|
+
notifications.each do|notification|
|
7
|
+
exception_hash = notification.send(:gen_exception_hash)
|
8
|
+
exception_hashes[exception_hash] ||= []
|
9
|
+
exception_hashes[exception_hash] << notification.id
|
10
|
+
end
|
11
|
+
base_notifications = ExceptionNotificationServer::Notification.where(id: exception_hashes.values.map(&:first))
|
12
|
+
exception_hashes.each do |exception_hash, ids|
|
13
|
+
base_notification = base_notifications.find { |notification| notification.id == ids.first }
|
14
|
+
ExceptionNotificationServer::Notification.where(id: ids).update_all(exception_hash: exception_hash, parent_id: base_notification.id, status: base_notification.status)
|
15
|
+
base_notification.remove_data if base_notification.status == 'fixed'
|
16
|
+
end
|
17
|
+
base_notifications.update_all(parent_id: nil)
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_notification_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anatoliy Varanitsa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|