dbg-rb 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/dbg-rb.gemspec +2 -1
- data/lib/dbg-rb.rb +6 -7
- data/lib/dbg_rb/version.rb +1 -1
- data/spec/smoke_spec.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2db3ba3ac88033948685e877c1b9245f77c4f0c3b3b061d786305ea1a2059113
|
4
|
+
data.tar.gz: 0412b7c4b793aabe451c622fbf293938a5e9dce9ad4ae06d4cda8604d4798df9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b655b3c9c88e2e973cf860f1bf8228e27075b115d6ce37e4a0903ae0a062194c15915dcb3cd851b4234dcfa119d669b57af25f563ed4f14c852b5361f67d03b
|
7
|
+
data.tar.gz: d71e5a0b42c1999ab7e981ba467fa7bd19851f26c8e3f5dcd22576db306f756b95edbe04562918b372e9a1e7bfcb96e6449fc08f79dbf5db969844b6240cb994
|
data/.github/workflows/ci.yml
CHANGED
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
strategy:
|
13
13
|
fail-fast: false
|
14
14
|
matrix:
|
15
|
-
ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7', '2.6']
|
15
|
+
ruby-version: ['3.4', '3.3', '3.2', '3.1', '3.0', '2.7', '2.6']
|
16
16
|
steps:
|
17
17
|
- uses: actions/checkout@v3
|
18
18
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
data/dbg-rb.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.version = DbgRb::VERSION
|
9
9
|
s.authors = ["pawurb"]
|
10
10
|
s.email = ["contact@pawelurbanek.com"]
|
11
|
-
s.summary = "Simple
|
11
|
+
s.summary = "Simple debugging helper"
|
12
12
|
s.description = "Rust-inspired, puts debugging helper, adding caller info and optional coloring."
|
13
13
|
s.homepage = "http://github.com/pawurb/dbg-rb"
|
14
14
|
s.files = `git ls-files`.split("\n").reject { |f| f.match?(/\.db$/) }
|
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.license = "MIT"
|
17
17
|
s.add_dependency "binding_of_caller"
|
18
18
|
s.add_dependency "json"
|
19
|
+
s.add_development_dependency "ostruct"
|
19
20
|
s.add_development_dependency "rake"
|
20
21
|
s.add_development_dependency "rspec"
|
21
22
|
s.add_development_dependency "rufo"
|
data/lib/dbg-rb.rb
CHANGED
@@ -29,15 +29,14 @@ module DbgRb
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def dbg!(*msgs)
|
32
|
-
loc = caller_locations.first(3).last
|
33
|
-
|
34
|
-
|
35
|
-
matching_loc[0][0..-5]
|
32
|
+
loc = caller_locations.first(3).last
|
33
|
+
file = if (path = loc.absolute_path)
|
34
|
+
path.split("/").last(2).join("/")
|
36
35
|
else
|
37
|
-
loc
|
36
|
+
loc.label
|
38
37
|
end
|
39
|
-
|
40
|
-
|
38
|
+
|
39
|
+
line = loc.lineno
|
41
40
|
src = "[#{file}:#{line}]"
|
42
41
|
|
43
42
|
msgs.each_with_index do |obj, i|
|
data/lib/dbg_rb/version.rb
CHANGED
data/spec/smoke_spec.rb
CHANGED
@@ -42,7 +42,7 @@ describe DbgRb do
|
|
42
42
|
expect { dbg!(nil) }.to output("[spec/smoke_spec.rb:42] nil\n").to_stdout
|
43
43
|
end
|
44
44
|
|
45
|
-
it "
|
45
|
+
it "highlight" do
|
46
46
|
DbgRb.highlight!
|
47
47
|
expect { dbg!("123") }.to output("!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n[spec/smoke_spec.rb:47] \"123\"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n").to_stdout
|
48
48
|
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
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binding_of_caller
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ostruct
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
135
|
- !ruby/object:Gem::Version
|
122
136
|
version: '0'
|
123
137
|
requirements: []
|
124
|
-
rubygems_version: 3.5.
|
138
|
+
rubygems_version: 3.5.16
|
125
139
|
signing_key:
|
126
140
|
specification_version: 4
|
127
|
-
summary: Simple
|
141
|
+
summary: Simple debugging helper
|
128
142
|
test_files: []
|