amazing_tap 0.1.1 → 0.1.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/CHANGELOG.md +4 -0
- data/README.md +1 -0
- data/lib/amazing_tap/version.rb +1 -1
- data/lib/amazing_tap.rb +11 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '019dd9259e1444c65ca33a93706e9d7657e7282b834be82c770d6a8d68931b70'
|
|
4
|
+
data.tar.gz: 58d6ef4119ea94a0d37a1fe1e8a7d0036974ec75a4c72d0cb37e9959f1a00c76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e55b7a83f6b4bd0c292d7377d578724588baef68ce9411d21937aa529c00ea5f5faf3d46a361cf83c744909c391947a5339966d167f94afa1c82c9ef25310b9
|
|
7
|
+
data.tar.gz: ec061ac3c413bba46df4dd619b77f27bfecdaeca20267ba1d9407d9c82bad5be5f591ba9081ba1e841d89ea4f84bd050a126a3b2aa321e1f9095dbbfef7813e8
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.1.2] - 2026-08-08
|
|
6
|
+
|
|
7
|
+
- `AmazingTap.show_type` global toggle for the class in headers; per-call `type:` still overrides
|
|
8
|
+
|
|
5
9
|
## [0.1.1] - 2026-08-08
|
|
6
10
|
|
|
7
11
|
- README overhaul: typed hash intro example with real output, per-option outputs in Usage, link to colorized terminal screenshot
|
data/README.md
CHANGED
|
@@ -121,6 +121,7 @@ big_list.tapp
|
|
|
121
121
|
|
|
122
122
|
```ruby
|
|
123
123
|
AmazingTap.closing_threshold = 40 # lines before the closing "/label" appears; default 24
|
|
124
|
+
AmazingTap.show_type = false # drop the class from headers globally; per-call type: overrides
|
|
124
125
|
```
|
|
125
126
|
|
|
126
127
|
Output is colorized whenever amazing_print would colorize (tty, or `AmazingPrint.force_colors!`).
|
data/lib/amazing_tap/version.rb
CHANGED
data/lib/amazing_tap.rb
CHANGED
|
@@ -20,6 +20,16 @@ module AmazingTap
|
|
|
20
20
|
@closing_threshold ||= DEFAULT_CLOSING_THRESHOLD
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
# Global default for appending the receiver's class to the header.
|
|
24
|
+
# Per-call type: overrides it either way.
|
|
25
|
+
#
|
|
26
|
+
# @return [Boolean] defaults to true
|
|
27
|
+
attr_writer :show_type
|
|
28
|
+
|
|
29
|
+
def show_type
|
|
30
|
+
@show_type.nil? ? true : @show_type
|
|
31
|
+
end
|
|
32
|
+
|
|
23
33
|
# Extracts the receiver expression preceding .tapp/.tapap on the call-site
|
|
24
34
|
# line, e.g. "user" for `user.tapp` or "account.owner" for
|
|
25
35
|
# `account.owner.tapp`. Inference is textual: literals, parenthesized
|
|
@@ -85,7 +95,7 @@ module AmazingTap
|
|
|
85
95
|
# the first N frames (Integer) after the output
|
|
86
96
|
# @return [self]
|
|
87
97
|
# @raise [ArgumentError] when label is neither nil nor a Symbol
|
|
88
|
-
def tapp(label = nil, type:
|
|
98
|
+
def tapp(label = nil, type: AmazingTap.show_type, backtrace: false)
|
|
89
99
|
raise ArgumentError, "label must be a Symbol" unless label.nil? || label.is_a?(Symbol)
|
|
90
100
|
|
|
91
101
|
label ||= AmazingTap.infer_label(caller_locations(1, 1).first)
|