tracee 1.0.0 → 1.0.1
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/lib/tracee/ext/exception.rb +8 -7
- data/lib/tracee/version.rb +1 -1
- data/lib/tracee.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e01ac60432d6a7e0c1e8e60ca5ea28cc7c8eb5c
|
4
|
+
data.tar.gz: abe51a729ac5f0f0ab91e976fc2319680fe5c7e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7bdada9de96d915843ca46678a3c4bba91d57ee26b9110d6208ba217b08082fd1f9422b8a5b1e69cf8723de0344df373532bf165ce6a04c0552376fe76d0c48
|
7
|
+
data.tar.gz: 5a18b28f473f4df0938c23e28b7006390677bd64b4715faf4a7bf3c9781de924eaf04c53f1d2956e8e879120fe388f1cfcf9aaf8a336863b3a3ce184529c4d65
|
data/lib/tracee/ext/exception.rb
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
module Tracee
|
2
2
|
module Extensions
|
3
3
|
module Exception
|
4
|
-
extend ActiveSupport::Concern
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
class_attribute :trace_decorator
|
5
|
+
def self.prepended(exc_class)
|
6
|
+
exc_class.send :class_attribute, :trace_decorator
|
9
7
|
end
|
10
8
|
|
11
9
|
## Gotcha:
|
12
10
|
# If you also set (e.g. in irbrc file)
|
13
11
|
#
|
12
|
+
# SCRIPT_LINES__['(irb)'] = []
|
14
13
|
# module Readline
|
15
14
|
# alias :orig_readline :readline
|
16
15
|
# def readline(*args)
|
@@ -25,7 +24,7 @@ module Tracee
|
|
25
24
|
##
|
26
25
|
if RUBY_VERSION > '2.1'
|
27
26
|
|
28
|
-
def
|
27
|
+
def set_backtrace(trace)
|
29
28
|
if decorator = self.class.trace_decorator
|
30
29
|
if trace.is_a? Thread::Backtrace
|
31
30
|
return trace
|
@@ -33,7 +32,8 @@ module Tracee
|
|
33
32
|
trace = decorator.(trace)
|
34
33
|
end
|
35
34
|
end
|
36
|
-
|
35
|
+
|
36
|
+
super(trace)
|
37
37
|
end
|
38
38
|
|
39
39
|
else
|
@@ -42,7 +42,8 @@ module Tracee
|
|
42
42
|
if decorator = self.class.trace_decorator
|
43
43
|
trace = decorator.(trace)
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
|
+
super(trace)
|
46
47
|
end
|
47
48
|
|
48
49
|
end
|
data/lib/tracee/version.rb
CHANGED
data/lib/tracee.rb
CHANGED
@@ -10,6 +10,9 @@ require 'active_support/core_ext/module/aliasing'
|
|
10
10
|
require 'active_support/core_ext/class/attribute'
|
11
11
|
require 'active_support/tagged_logging'
|
12
12
|
|
13
|
+
# Handle damned `prepend_features Exception` in a new version of BetterErrors.
|
14
|
+
begin require 'better_errors'; rescue LoadError; end
|
15
|
+
|
13
16
|
require 'colorize'
|
14
17
|
|
15
18
|
require 'tracee/version'
|
@@ -43,7 +46,9 @@ module Tracee
|
|
43
46
|
|
44
47
|
|
45
48
|
class ::Exception
|
46
|
-
|
49
|
+
# It must be prepended in order to work along with better_errors v2.
|
50
|
+
# Also, this way it takes less internal calls to work.
|
51
|
+
prepend Tracee::Extensions::Exception
|
47
52
|
end
|
48
53
|
|
49
54
|
module ::ActiveSupport::TaggedLogging::Formatter
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tracee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Baev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01
|
11
|
+
date: 2016-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|