dbg-rb 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 +6 -6
- data/lib/dbg-rb.rb +1 -1
- data/lib/dbg_rb/version.rb +1 -1
- metadata +3 -3
- /data/{ruby-dbg.gemspec → dbg-rb.gemspec} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b774aaf99ca885d4c07e6aa084ec6a6457f7c792644e44a4553cd9dd8648243
|
4
|
+
data.tar.gz: f3bc9623770172d9559edb3858558451cd9cedad079555bdb724f386570a959c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b52978b310b562b2c74894765e89482ab4104add1826a16d289c91b0198ff6c1dd6493e77d05464ef8a0893e24988308962cc49bbb6cf984ff189e02ca74b677
|
7
|
+
data.tar.gz: 750b1dab1c2d2a4a32e2f8c82e83b10dc4e218da68e2d30ef292046a7f68d79650461b201ab99bb149f6df9792d824703d874ea7f984472ca68f3bf905741948
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ p '!!!!!!!!!!!!!!!'
|
|
12
12
|
|
13
13
|
too many times already.
|
14
14
|
|
15
|
-
`dbg
|
15
|
+
`dbg` is a minimal, [Rust inspired](https://doc.rust-lang.org/std/macro.dbg.html), *puts debugging* command for Ruby. It provides caller context and formatting helpful in everyday debugging tasks.
|
16
16
|
|
17
17
|
## Installation
|
18
18
|
|
@@ -23,7 +23,7 @@ gem "dbg-rb"
|
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
26
|
-
Gem adds global `dbg
|
26
|
+
Gem adds a global `dbg` method that you can use for puts debugging:
|
27
27
|
|
28
28
|
```ruby
|
29
29
|
require "dbg-rb"
|
@@ -41,7 +41,7 @@ You can use symbols to output local variable names together with their values:
|
|
41
41
|
a = 1
|
42
42
|
b = 2
|
43
43
|
|
44
|
-
dbg
|
44
|
+
dbg(:a, :b)
|
45
45
|
# [models/user.rb:22] a = 1
|
46
46
|
# [models/user.rb:22] b = 2
|
47
47
|
```
|
@@ -50,7 +50,7 @@ Hash values are pretty printed:
|
|
50
50
|
|
51
51
|
```ruby
|
52
52
|
user = User.last.as_json
|
53
|
-
dbg
|
53
|
+
dbg(:user)
|
54
54
|
# [web/users_controller.rb:10 user = {
|
55
55
|
# "id": 160111,
|
56
56
|
# "team_id": 1,
|
@@ -76,12 +76,12 @@ DbgRb.color_code = 35
|
|
76
76
|
|
77
77
|
```ruby
|
78
78
|
user = User.last.as_json.slice("id", "slack_id")
|
79
|
-
dbg
|
79
|
+
dbg("User last", :user)
|
80
80
|
```
|
81
81
|
|
82
82
|
![Dbg color](https://github.com/pawurb/dbg-rb/raw/main/dbg_base3.png)
|
83
83
|
|
84
|
-
If it does not stand out enough, you can enable `dbg
|
84
|
+
If it does not stand out enough, you can enable `dbg` highlighting:
|
85
85
|
|
86
86
|
`config/initializers/dbg_rb.rb`
|
87
87
|
```ruby
|
data/lib/dbg-rb.rb
CHANGED
data/lib/dbg_rb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbg-rb
|
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
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binding_of_caller
|
@@ -80,12 +80,12 @@ files:
|
|
80
80
|
- LICENSE.txt
|
81
81
|
- README.md
|
82
82
|
- Rakefile
|
83
|
+
- dbg-rb.gemspec
|
83
84
|
- dbg_base3.png
|
84
85
|
- dbg_color.png
|
85
86
|
- dbg_emoji2.png
|
86
87
|
- lib/dbg-rb.rb
|
87
88
|
- lib/dbg_rb/version.rb
|
88
|
-
- ruby-dbg.gemspec
|
89
89
|
- spec/smoke_spec.rb
|
90
90
|
- spec/spec_helper.rb
|
91
91
|
homepage: http://github.com/pawurb/dbg-rb
|
File without changes
|