backtracer 0.4.0 → 0.4.1

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
data/bin/backtracer CHANGED
@@ -3,7 +3,7 @@
3
3
  if (ARGV.include? '-h') || (ARGV.include? '--help')
4
4
  dir = File.dirname(__FILE__) + '/../lib'
5
5
  puts 'options: '
6
- for file in Dir[dir + '/backtracer_*.rb']
6
+ for file in Dir[dir + '/backtracer_*.rb'].sort.reverse
7
7
  puts '--' + File.basename(file)[11..-4] # of backtracer_locals.rb, just locals
8
8
  end
9
9
  puts 'ex: $ backtracer filename.rb arg1 arg2'
data/lib/backtracer.rb CHANGED
@@ -5,7 +5,7 @@ require 'sane'
5
5
 
6
6
  at_exit {
7
7
  if $! && !$!.is_a?(SystemExit) # SystemExit's are just normal, not exceptional
8
- puts "==== ", $!.inspect + ' ' + $!.to_s
8
+ puts "\n " + $!.inspect + ' ' + $!.to_s
9
9
  bt2 = $!.backtrace
10
10
  backtrace_with_code = $!.backtrace.map{ |bt_line|
11
11
  if OS.windows? && bt_line[1..1] == ':'
@@ -21,7 +21,7 @@ at_exit {
21
21
  "#{bt_line}\n\t#{actual_line.strip if actual_line}"
22
22
  }
23
23
  puts backtrace_with_code
24
- puts "===="
24
+ # puts "===="
25
25
  else
26
26
  puts "(no exception found to backtrace)" if $VERBOSE
27
27
  end
@@ -0,0 +1,9 @@
1
+ require File.dirname(__FILE__) + '/backtracer' # everybody wants this, right?
2
+ require 'ruby-debug'
3
+ Debugger.start
4
+ puts 'hit ctrl + c to drop into a debugger'
5
+ trap "INT", "debugger"
6
+
7
+ if $0 == __FILE__
8
+ sleep # test
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backtracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -52,6 +52,7 @@ files:
52
52
  - examples/run_all_styles_of_backtracer.rb
53
53
  - examples/run_large_style_output.rb
54
54
  - lib/backtracer.rb
55
+ - lib/backtracer_ctrl_c_debugger.rb
55
56
  - lib/backtracer_locals.rb
56
57
  - lib/backtracer_ping.rb
57
58
  - lib/backtracer_simple.rb