tracer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -1
- data/Rakefile +2 -2
- data/lib/tracer.rb +10 -5
- data/tracer.gemspec +11 -12
- metadata +8 -40
- data/.gitignore +0 -8
- data/.travis.yml +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/tracer/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2f82acd68b0e8d7cd3f4f8f76edf568b7eba1cb93617c2b61bb1c309cabb13d
|
4
|
+
data.tar.gz: 99975c258b07d9aa9a2b615ef5edc4284d57881300f2bc1d556cc0394e4ce471
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7446a1e834acf1139d4a8e2bbe5123c58abb2977f110bf7179128607886cae256cf830948de0b754d354360464ad4c9e70fd52b6e18d8a451b4030921cde65fa
|
7
|
+
data.tar.gz: 9b0cbe82ba37dce014210083b8110dfa9f59cd795bb2e1d5058a2fea432f8ba7aa0f0453a4d5f046c60416fea7ef4463862cfdd8acebae901bfa69809d25fc6a
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/lib/tracer.rb
CHANGED
@@ -60,6 +60,7 @@
|
|
60
60
|
# by Keiju ISHITSUKA(keiju@ishitsuka.com)
|
61
61
|
#
|
62
62
|
class Tracer
|
63
|
+
VERSION = "0.1.1"
|
63
64
|
|
64
65
|
class << self
|
65
66
|
# display additional debug information (defaults to false)
|
@@ -142,11 +143,13 @@ class Tracer
|
|
142
143
|
stdout.print "Trace off\n" if Tracer.verbose?
|
143
144
|
end
|
144
145
|
|
145
|
-
def add_filter(p =
|
146
|
+
def add_filter(p = nil, &b) # :nodoc:
|
147
|
+
p ||= b
|
146
148
|
@filters.push p
|
147
149
|
end
|
148
150
|
|
149
|
-
def set_get_line_procs(file, p =
|
151
|
+
def set_get_line_procs(file, p = nil, &b) # :nodoc:
|
152
|
+
p ||= b
|
150
153
|
@get_line_procs[file] = p
|
151
154
|
end
|
152
155
|
|
@@ -239,7 +242,7 @@ class Tracer
|
|
239
242
|
end
|
240
243
|
|
241
244
|
##
|
242
|
-
# Register an event handler <code>p</code> which is called
|
245
|
+
# Register an event handler <code>p</code> which is called every time a line
|
243
246
|
# in +file_name+ is executed.
|
244
247
|
#
|
245
248
|
# Example:
|
@@ -248,7 +251,8 @@ class Tracer
|
|
248
251
|
# puts "line number executed is #{line}"
|
249
252
|
# })
|
250
253
|
|
251
|
-
def Tracer.set_get_line_procs(file_name, p =
|
254
|
+
def Tracer.set_get_line_procs(file_name, p = nil, &b)
|
255
|
+
p ||= b
|
252
256
|
Single.set_get_line_procs(file_name, p)
|
253
257
|
end
|
254
258
|
|
@@ -261,7 +265,8 @@ class Tracer
|
|
261
265
|
# "Kernel" == klass.to_s
|
262
266
|
# end
|
263
267
|
|
264
|
-
def Tracer.add_filter(p =
|
268
|
+
def Tracer.add_filter(p = nil, &b)
|
269
|
+
p ||= b
|
265
270
|
Single.add_filter(p)
|
266
271
|
end
|
267
272
|
end
|
data/tracer.gemspec
CHANGED
@@ -1,26 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
name = File.basename(__FILE__, ".gemspec")
|
4
|
+
version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
|
5
|
+
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
6
|
+
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
7
|
+
end rescue nil
|
6
8
|
end
|
7
9
|
|
8
10
|
Gem::Specification.new do |spec|
|
9
|
-
spec.name =
|
10
|
-
spec.version =
|
11
|
+
spec.name = name
|
12
|
+
spec.version = version
|
11
13
|
spec.authors = ["Keiju ISHITSUKA"]
|
12
14
|
spec.email = ["keiju@ruby-lang.org"]
|
13
15
|
|
14
16
|
spec.summary = %q{Outputs a source level execution trace of a Ruby program.}
|
15
17
|
spec.description = %q{Outputs a source level execution trace of a Ruby program.}
|
16
18
|
spec.homepage = "https://github.com/ruby/tracer"
|
17
|
-
spec.
|
19
|
+
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
18
20
|
|
19
|
-
spec.files = ["
|
21
|
+
spec.files = ["Gemfile", "LICENSE.txt", "README.md", "Rakefile", "lib/tracer.rb", "tracer.gemspec"]
|
20
22
|
spec.bindir = "exe"
|
21
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
24
|
spec.require_paths = ["lib"]
|
23
|
-
|
24
|
-
spec.add_development_dependency "bundler"
|
25
|
-
spec.add_development_dependency "rake"
|
26
25
|
end
|
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keiju ISHITSUKA
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
11
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
41
13
|
description: Outputs a source level execution trace of a Ruby program.
|
42
14
|
email:
|
43
15
|
- keiju@ruby-lang.org
|
@@ -45,22 +17,18 @@ executables: []
|
|
45
17
|
extensions: []
|
46
18
|
extra_rdoc_files: []
|
47
19
|
files:
|
48
|
-
- ".gitignore"
|
49
|
-
- ".travis.yml"
|
50
20
|
- Gemfile
|
51
21
|
- LICENSE.txt
|
52
22
|
- README.md
|
53
23
|
- Rakefile
|
54
|
-
- bin/console
|
55
|
-
- bin/setup
|
56
24
|
- lib/tracer.rb
|
57
|
-
- lib/tracer/version.rb
|
58
25
|
- tracer.gemspec
|
59
26
|
homepage: https://github.com/ruby/tracer
|
60
27
|
licenses:
|
28
|
+
- Ruby
|
61
29
|
- BSD-2-Clause
|
62
30
|
metadata: {}
|
63
|
-
post_install_message:
|
31
|
+
post_install_message:
|
64
32
|
rdoc_options: []
|
65
33
|
require_paths:
|
66
34
|
- lib
|
@@ -75,8 +43,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
43
|
- !ruby/object:Gem::Version
|
76
44
|
version: '0'
|
77
45
|
requirements: []
|
78
|
-
rubygems_version: 3.2.
|
79
|
-
signing_key:
|
46
|
+
rubygems_version: 3.2.2
|
47
|
+
signing_key:
|
80
48
|
specification_version: 4
|
81
49
|
summary: Outputs a source level execution trace of a Ruby program.
|
82
50
|
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "tracer"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED