tracee 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tracee/version.rb +1 -1
  3. data/lib/tracee.rb +21 -10
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e01ac60432d6a7e0c1e8e60ca5ea28cc7c8eb5c
4
- data.tar.gz: abe51a729ac5f0f0ab91e976fc2319680fe5c7e0
3
+ metadata.gz: e2f91a6aa21495957f1a44cdfaa193ff8245408d
4
+ data.tar.gz: 7106c43291029ab1ee9dc5aea7769cd373026e0b
5
5
  SHA512:
6
- metadata.gz: a7bdada9de96d915843ca46678a3c4bba91d57ee26b9110d6208ba217b08082fd1f9422b8a5b1e69cf8723de0344df373532bf165ce6a04c0552376fe76d0c48
7
- data.tar.gz: 5a18b28f473f4df0938c23e28b7006390677bd64b4715faf4a7bf3c9781de924eaf04c53f1d2956e8e879120fe388f1cfcf9aaf8a336863b3a3ce184529c4d65
6
+ metadata.gz: ab74facc10b25ccf817782512c185a1d9154c2a013037233379c254fc3e4348e4d5deb21df8f29282eac7519d6f700892bee1552035adb5f6d2bae85c010a065
7
+ data.tar.gz: 6681289066e84565aa331c57d3a580271cd528817c76af11987b1814ab6b8bd94d36d85d962376443e11fa634408e2a9e130c741905dc88b660eef20a095fd81
@@ -1,3 +1,3 @@
1
1
  module Tracee
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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 for all loaded ruby files to be cached into.
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:#{ # ruby -e oneliner
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
- class ::Exception
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
+ 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.1
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-01 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler