tracee 1.0.1 → 1.0.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 +4 -4
- data/lib/tracee/version.rb +1 -1
- data/lib/tracee.rb +21 -10
- 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: e2f91a6aa21495957f1a44cdfaa193ff8245408d
|
4
|
+
data.tar.gz: 7106c43291029ab1ee9dc5aea7769cd373026e0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab74facc10b25ccf817782512c185a1d9154c2a013037233379c254fc3e4348e4d5deb21df8f29282eac7519d6f700892bee1552035adb5f6d2bae85c010a065
|
7
|
+
data.tar.gz: 6681289066e84565aa331c57d3a580271cd528817c76af11987b1814ab6b8bd94d36d85d962376443e11fa634408e2a9e130c741905dc88b660eef20a095fd81
|
data/lib/tracee/version.rb
CHANGED
data/lib/tracee.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# When you working with IRB/Pry/Ripl it should be defined in according rc-file
|
1
|
+
# When you working with IRB/Pry/Ripl it should be defined in the according rc-file so that all loaded ruby files could be cached into it.
|
2
2
|
unless defined? SCRIPT_LINES__
|
3
3
|
SCRIPT_LINES__ = {}
|
4
4
|
end
|
@@ -10,9 +10,6 @@ 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
|
-
|
16
13
|
require 'colorize'
|
17
14
|
|
18
15
|
require 'tracee/version'
|
@@ -38,23 +35,37 @@ module Tracee
|
|
38
35
|
IGNORE_RE = \
|
39
36
|
%r{/irb(/|\.rb$)#{ # irb internals
|
40
37
|
}|lib/active_support/dependencies.rb$#{ # everywhere-proxy
|
41
|
-
}|^-e
|
38
|
+
}|^-e$#{ # ruby -e oneliner
|
42
39
|
}|^(script|bin)/#{ # other common entry points
|
43
40
|
}|/gems/bundler-\d|ruby-\d.\d.\d(@[^/]+)?/bin/#{ # bundle console
|
44
|
-
}|lib/rails/commands(/|\.rb$)#{ # rails console
|
41
|
+
}|bin/rails$|lib/rails/commands(/|\.rb$)#{ # rails console
|
42
|
+
}|lib/spring/#{ # spring middleware
|
43
|
+
}|/rubygems/core_ext/kernel_require.rb#{ # `require' override
|
45
44
|
}}
|
46
45
|
|
47
46
|
|
48
|
-
|
49
|
-
#
|
50
|
-
#
|
51
|
-
|
47
|
+
if defined? ::BetterErrors::ExceptionExtension
|
48
|
+
# BetterErrors has been loaded
|
49
|
+
# Insert our extension in between BetterErrors::ExceptionExtension and Exception
|
50
|
+
module ::BetterErrors::ExceptionExtension
|
51
|
+
include Tracee::Extensions::Exception
|
52
|
+
end
|
53
|
+
::Exception.send :class_attribute, :trace_decorator
|
54
|
+
else
|
55
|
+
# BetterErrors has not yet been loaded or will not be loaded at all
|
56
|
+
# Just insert our extension before Exception
|
57
|
+
class ::Exception
|
58
|
+
prepend Tracee::Extensions::Exception
|
59
|
+
class_attribute :trace_decorator
|
60
|
+
end
|
52
61
|
end
|
53
62
|
|
63
|
+
|
54
64
|
module ::ActiveSupport::TaggedLogging::Formatter
|
55
65
|
include Tracee::Extensions::ActiveSupport::TaggedLogging::Formatter
|
56
66
|
end
|
57
67
|
|
68
|
+
|
58
69
|
# Use `Tracee.decorate_stack_everywhere` only within a console, because it significantly slowdown rails middleware.
|
59
70
|
# So better put it into .irbrc or similar.
|
60
71
|
class << self
|
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.2
|
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-02-
|
11
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|