exception_notification_server 0.0.2 → 0.0.3
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 +4 -4
- data/VERSION +1 -1
- data/app/controllers/exception_notification_server/notifications_controller.rb +0 -1
- data/app/models/exception_notification_server/notification.rb +6 -6
- data/app/views/exception_notification_server/notifications/show.html.haml +8 -8
- data/exception_notification_server.gemspec +2 -2
- data/lib/exception_notification_server/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 632ebc13bca4d09b9fe0199c9b7f50d21465b8b6
|
4
|
+
data.tar.gz: 69357b6764c65305e13fab961bf329a21e5b6a82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4e3ddf5b8038f20c008893531c55b66e875c973065789c3011d4243987488570beb884a00324743848339fa76ffb975fc69f44ed776901683f7ce0ae44dabc5
|
7
|
+
data.tar.gz: 3fd6f2caa91c894a92cfd4075fcad7b585e39f04262a35e7994082ca97143fd3f63fe83705dd85ebe3d1bf38721c25efe1fed85ed0ea2dc32d08ddd359f60716
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
@@ -91,7 +91,6 @@ module ExceptionNotificationServer
|
|
91
91
|
def update_notification(notification, notification_params = notification_params_update, recursive = true)
|
92
92
|
notification.send("update#{'_recursive_all' if recursive}", notification_params)
|
93
93
|
notification.remove_data if recursive && notification_params[:status] == :fixed
|
94
|
-
notification.recover_data if recursive && notification_params[:status] == :new && notification.status == 'fixed'
|
95
94
|
end
|
96
95
|
|
97
96
|
def notifications_actions(&block)
|
@@ -58,16 +58,16 @@ module ExceptionNotificationServer
|
|
58
58
|
update_recursive(data: nil, request: nil, session: nil, environment: nil)
|
59
59
|
end
|
60
60
|
|
61
|
-
# We recover information from base notification. Better solution is just use base info but i wanna divide notifications.
|
62
|
-
def recover_data
|
63
|
-
base_notification = Notification.find(base_id)
|
64
|
-
update_recursive(data: base_notification.data, request: base_notification.request, session: base_notification.session, environment: base_notification.environment)
|
65
|
-
end
|
66
|
-
|
67
61
|
def destroy_recursive
|
68
62
|
Notification.where(arel_table[:id].eq(base_id).or(arel_table[:parent_id].eq(base_id))).delete_all if base_id.present?
|
69
63
|
end
|
70
64
|
|
65
|
+
[:data, :request, :session, :environment].each do |name|
|
66
|
+
define_method "get_#{name}" do
|
67
|
+
send(name) || parent.try(name)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
71
|
protected
|
72
72
|
|
73
73
|
def graph_data(from)
|
@@ -55,22 +55,22 @@
|
|
55
55
|
.backtrace
|
56
56
|
%h3 Backtrace
|
57
57
|
= pretty_json @notification.backtrace
|
58
|
-
- if @notification.
|
58
|
+
- if @notification.get_data.present?
|
59
59
|
.data
|
60
60
|
%h3 Data
|
61
|
-
= pretty_json @notification.
|
62
|
-
- if @notification.
|
61
|
+
= pretty_json @notification.get_data
|
62
|
+
- if @notification.get_request.present?
|
63
63
|
.request
|
64
64
|
%h3 Request
|
65
|
-
= pretty_json @notification.
|
66
|
-
- if @notification.
|
65
|
+
= pretty_json @notification.get_request
|
66
|
+
- if @notification.get_session.present?
|
67
67
|
.session
|
68
68
|
%h3 Session
|
69
|
-
= pretty_json @notification.
|
70
|
-
- if @notification.
|
69
|
+
= pretty_json @notification.get_session
|
70
|
+
- if @notification.get_environment.present?
|
71
71
|
.environment
|
72
72
|
%h3 Environment
|
73
|
-
= pretty_json @notification.
|
73
|
+
= pretty_json @notification.get_environment
|
74
74
|
- if @notification.similar.to_a.present?
|
75
75
|
%br
|
76
76
|
= render partial: 'exception_notification_server/notifications/notifications', object: @notification.similar, as: :notifications, locals: {count: false, last_time: false, env: true}
|
@@ -2,11 +2,11 @@
|
|
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.3 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.3'
|
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']
|