dbg-rb 0.2.4 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06ece8262bca3c3a9d03add835a5fe4eeaffa8e361b1e5326d0b4a065cfa6a0c
4
- data.tar.gz: 9f7dec1e66d87d71926eea65bb077083b4daafde9055c4f9e611ac6ba710b93a
3
+ metadata.gz: b59e26796df37f516bbf9e49abf36ef3e6381251efb147a8cfebc2dc3b25e859
4
+ data.tar.gz: fb966c5473b1a5799fbb7c6d74823aa62821e054f8af7dfa4f6e05f39efe30fa
5
5
  SHA512:
6
- metadata.gz: 4afe7542dbad65fc2564b33d7f5db219546eaa40cd7e365a14f0f80904e587566f63bb488d6f619da5e9104480147e4db51cf8eec29c35201e0b2fe17b2292c3
7
- data.tar.gz: 611c0e692fd8c1300f46c073eda4ed09155d0221d9068fc70dcd8ecd0b2669f13f39ce1df9fb0125ce7255e9c395046b631ea1b6d32d066d4ab2e7d548db6255
6
+ metadata.gz: d282afefaa8acb843fea7bd553ba3d31e323f58693ea14c96e8f14cc3c5fbf190f520d30b19521ac28636c8f02387f24dd8e15850c996a3d5a4dd7ba5ce69592
7
+ data.tar.gz: 815a02500042f53cb9d8e170efd5efef323d68a994258c7b3df59de62c371958b48019ba2a83c6a73b491a8b22b1669cf70058228fdc63ac382934bc41704349
data/README.md CHANGED
@@ -65,7 +65,7 @@ You can color the output:
65
65
  ```ruby
66
66
  require "dbg-rb"
67
67
 
68
- DbgRb.color_code = 35
68
+ DbgRb.color_code = 33
69
69
  # 31 red
70
70
  # 32 green
71
71
  # 33 yellow
@@ -74,6 +74,12 @@ DbgRb.color_code = 35
74
74
  # 36 light blue
75
75
  ```
76
76
 
77
+ It's yellow by default. You can disable colors by running:
78
+
79
+ ```ruby
80
+ DbgRb.color_code= nil
81
+ ```
82
+
77
83
  ```ruby
78
84
  user = User.last.as_json.slice("id", "slack_id")
79
85
  dbg("User last", :user)
data/lib/dbg-rb.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "binding_of_caller"
4
+ require "json"
4
5
 
5
6
  module DbgRb
6
7
  def self.color_code=(val)
@@ -100,4 +101,6 @@ def dbg!(*msgs)
100
101
  DbgRb.dbg!(*msgs)
101
102
  end
102
103
 
104
+ DbgRb.color_code = 33 # yellow
105
+
103
106
  alias dbg dbg!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DbgRb
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.6"
5
5
  end
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
4
+ version: 0.2.6
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-18 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: binding_of_caller