technologic 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/technologic/version.rb +1 -1
- data/lib/technologic.rb +18 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f14b4b0320578616d82c30b4b0ba74d0bad673c89f0118b39cb4e027a38f13ca
|
4
|
+
data.tar.gz: 5018f02892cc96e544f702b5ea482525c8196145150bb04e1ae66607ca0712ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ebf8d64e386e393c0dd8f0f4b0595a4fbb5ee43bf2e524f7f45bacf2aeca5dff2d84855315e59d754c81cd857d0fcb1af54fec25e2882d28890e9031f5828ad
|
7
|
+
data.tar.gz: bc049451a81fa7911daf608f447bbe9bbdeb99f5c72647d5129e0da3a736de1329e6c511d1634bdc34bd72b7e797c9046236fec0f4ac8eaf2847e63ee31c2b6d
|
data/lib/technologic/version.rb
CHANGED
data/lib/technologic.rb
CHANGED
@@ -66,9 +66,24 @@ module Technologic
|
|
66
66
|
end
|
67
67
|
|
68
68
|
EXCEPTION_SEVERITIES.each do |severity|
|
69
|
-
define_method("#{severity}!") do |
|
70
|
-
|
71
|
-
|
69
|
+
define_method("#{severity}!") do |exception = StandardError, message = nil, **data, &block|
|
70
|
+
if exception.is_a?(Exception)
|
71
|
+
instrument(
|
72
|
+
severity,
|
73
|
+
exception.class.name.demodulize,
|
74
|
+
**{
|
75
|
+
message: exception.message,
|
76
|
+
additional_message: message,
|
77
|
+
}.compact,
|
78
|
+
**data,
|
79
|
+
&block
|
80
|
+
)
|
81
|
+
|
82
|
+
raise exception
|
83
|
+
else
|
84
|
+
instrument severity, exception.name.demodulize, message: message, **data, &block
|
85
|
+
raise exception, message
|
86
|
+
end
|
72
87
|
end
|
73
88
|
end
|
74
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: technologic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Garside
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.5.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.5.0
|
55
55
|
description: An opinionated philosophy on logging for Ruby on Rails applications.
|
56
56
|
email:
|
57
57
|
- garside@gmail.com
|