cutter 0.8.5 → 0.8.6
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.
- data/lib/cutter/colored_outputs.rb +4 -0
- data/lib/cutter/inspection.rb +8 -1
- data/lib/cutter/version.rb +1 -1
- metadata +5 -5
@@ -43,6 +43,10 @@ module Cutter
|
|
43
43
|
:class_name => :light_green,
|
44
44
|
:method => :red,
|
45
45
|
:method_name => :yellow,
|
46
|
+
|
47
|
+
# :source => :white,
|
48
|
+
# :source_path => :white,
|
49
|
+
# :source_number => :white,
|
46
50
|
# :lv => :blue,
|
47
51
|
# :lv_names => :magenta,
|
48
52
|
# :lv_values => :light_red,
|
data/lib/cutter/inspection.rb
CHANGED
@@ -43,8 +43,15 @@ class Object
|
|
43
43
|
# Basic info
|
44
44
|
method_name = eval('__method__', _binding)
|
45
45
|
class_name = eval('self.class', _binding)
|
46
|
-
|
46
|
+
|
47
|
+
if (meth = method(method_name.to_sym)).respond_to? :source_location
|
48
|
+
source_path, source_number = meth.source_location
|
49
|
+
end
|
50
|
+
|
47
51
|
puts "\n%s `%s' %s" % ['method:'.to_colorized_string(:method), method_name.to_colorized_string(:method_name), ('(maximal tracing)' if max)]
|
52
|
+
|
53
|
+
puts " %s %s:%s" % ['source:'.to_colorized_string(:source), source_path.dup.to_colorized_string(:source_path), source_number.to_s.to_colorized_string(:source_number)] if source_path && source_number
|
54
|
+
|
48
55
|
puts " %s %s" % ['called from class:'.to_colorized_string(:called_from), class_name.to_colorized_string(:class_name)]
|
49
56
|
|
50
57
|
# Local Variables
|
data/lib/cutter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cutter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
description:
|
62
|
+
description: Ruby tracing gem
|
63
63
|
email: s.pankevich@gmail.com
|
64
64
|
executables: []
|
65
65
|
extensions: []
|
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
segments:
|
91
91
|
- 0
|
92
|
-
hash:
|
92
|
+
hash: 68698447
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
@@ -101,5 +101,5 @@ rubyforge_project:
|
|
101
101
|
rubygems_version: 1.8.19
|
102
102
|
signing_key:
|
103
103
|
specification_version: 3
|
104
|
-
summary:
|
104
|
+
summary: Ruby tracing gem
|
105
105
|
test_files: []
|