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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6821009d02bc4f54d723c0ea41341744e0d488d88e42ca944fc0efb231095937
4
- data.tar.gz: 5d1acaa2975285161576e00a15f7f01720662afe83822011cc9013296c4b27b7
3
+ metadata.gz: '019dd9259e1444c65ca33a93706e9d7657e7282b834be82c770d6a8d68931b70'
4
+ data.tar.gz: 58d6ef4119ea94a0d37a1fe1e8a7d0036974ec75a4c72d0cb37e9959f1a00c76
5
5
  SHA512:
6
- metadata.gz: 034defdbe3412e659b349cf92014a415f1e4668e2a32c06864df6749320fd8b00e6b164b2438cb61a5d839f5e7de716cab732c69e4d6506d041ab7a255fc73f1
7
- data.tar.gz: a9bb676d9062c10690f9efa975d6926acde80a5439e98b876e418315e547218d24b1b69e26acf7c93f0b95ee3bf33ea4a6912570e140d0e21d6b04c7386f127a
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!`).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AmazingTap
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
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: true, backtrace: false)
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazing_tap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Portales Rosado