pretty_trace 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -3
- data/lib/pretty_trace/handler.rb +1 -1
- data/lib/pretty_trace/structured_backtrace.rb +5 -3
- data/lib/pretty_trace/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f98056959f80ff0c230362e740ef66abcb94559de3307ce38a921057823bc13e
|
4
|
+
data.tar.gz: 1e88718ebbb557c228c290b7ef5ab92e44d2b05dd9bd26c8dafc9427e45843ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28a3bbd855e010202ae65fd9aa148c4bc8057bbf7b7eaad35684b058559c9b3fa110383b2d54b24d73302ce467f5d03d8154c7358766c08136a3339c5012f907
|
7
|
+
data.tar.gz: 5275e4e0107589968d4e90fb9209e5f25bd8003d78df2852192a55892785177317f9f1a9defed665008e5dd6b3c71850dddcf18461337dfe1a581b880920a1fa
|
data/README.md
CHANGED
@@ -5,7 +5,6 @@ Pretty Trace - Pretty Errors and Backtrace
|
|
5
5
|
[![Build Status](https://travis-ci.com/DannyBen/pretty_trace.svg?branch=master)](https://travis-ci.com/DannyBen/pretty_trace)
|
6
6
|
[![BCH compliance](https://bettercodehub.com/edge/badge/DannyBen/pretty_trace?branch=master)](https://bettercodehub.com/results/DannyBen/pretty_trace)
|
7
7
|
[![Maintainability](https://api.codeclimate.com/v1/badges/c9db6ec58ec7ac1484aa/maintainability)](https://codeclimate.com/github/DannyBen/pretty_trace/maintainability)
|
8
|
-
[![Test Coverage](https://api.codeclimate.com/v1/badges/c9db6ec58ec7ac1484aa/test_coverage)](https://codeclimate.com/github/DannyBen/pretty_trace/test_coverage)
|
9
8
|
|
10
9
|
---
|
11
10
|
|
@@ -14,6 +13,7 @@ in your ruby script, and errors will become clearer and more readable.
|
|
14
13
|
|
15
14
|
---
|
16
15
|
|
16
|
+
|
17
17
|
Install
|
18
18
|
--------------------------------------------------
|
19
19
|
|
@@ -34,6 +34,7 @@ gem 'pretty_trace', require: 'pretty_trace/enable'
|
|
34
34
|
gem 'pretty_trace', require: 'pretty_trace/enable-trim'
|
35
35
|
```
|
36
36
|
|
37
|
+
|
37
38
|
Example
|
38
39
|
--------------------------------------------------
|
39
40
|
|
@@ -116,10 +117,20 @@ to see the full trace paths), you can set the environment variable
|
|
116
117
|
$ PRETTY_TRACE=off ruby myscript.rb
|
117
118
|
```
|
118
119
|
|
119
|
-
If you wish to temporarily disable trimming, you can set the
|
120
|
-
variable `PRETTY_TRACE=full` before running your script:
|
120
|
+
If you wish to temporarily disable trimming and filtering, you can set the
|
121
|
+
environment variable `PRETTY_TRACE=full` before running your script:
|
121
122
|
|
122
123
|
```
|
123
124
|
$ PRETTY_TRACE=full ruby myscript.rb
|
124
125
|
```
|
125
126
|
|
127
|
+
|
128
|
+
Contributing / Support
|
129
|
+
--------------------------------------------------
|
130
|
+
|
131
|
+
If you experience any issue, have a question or a suggestion, or if you wish
|
132
|
+
to contribute, feel free to [open an issue][issues].
|
133
|
+
|
134
|
+
---
|
135
|
+
|
136
|
+
[issues]: https://github.com/DannyBen/pretty_trace/issues
|
data/lib/pretty_trace/handler.rb
CHANGED
@@ -13,8 +13,10 @@ module PrettyTrace
|
|
13
13
|
|
14
14
|
result = backtrace.dup
|
15
15
|
|
16
|
-
|
17
|
-
|
16
|
+
unless ENV['PRETTY_TRACE'] == 'full'
|
17
|
+
filter.each do |expression|
|
18
|
+
result.reject! { |trace| trace =~ expression }
|
19
|
+
end
|
18
20
|
end
|
19
21
|
|
20
22
|
result.map! { |line| BacktraceItem.new line }
|
@@ -35,7 +37,7 @@ module PrettyTrace
|
|
35
37
|
formatted_backtrace.join "\n"
|
36
38
|
end
|
37
39
|
|
38
|
-
|
40
|
+
private
|
39
41
|
|
40
42
|
def should_trim?(backtrace)
|
41
43
|
options[:trim] and ENV['PRETTY_TRACE'] != 'full' and backtrace.size > 3
|
data/lib/pretty_trace/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pretty_trace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Display clean and colorful error messages and backtrace
|
14
14
|
email: db@dannyben.com
|
@@ -45,8 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
|
-
|
49
|
-
rubygems_version: 2.7.6
|
48
|
+
rubygems_version: 3.0.3
|
50
49
|
signing_key:
|
51
50
|
specification_version: 4
|
52
51
|
summary: Pretty backtrace and error messages
|