tm_backtrace 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = tm_backtrace
2
2
 
3
- This provides you the backtrace for TextMate
3
+ This provides you the backtrace for TextMate.
4
4
 
5
5
  == Install
6
6
 
@@ -10,6 +10,10 @@ This provides you the backtrace for TextMate
10
10
 
11
11
  require 'tm_backtrace'
12
12
 
13
+ == Tips
14
+
15
+ iTerm can launch URL with Cmd-click.
16
+
13
17
  == Copyright
14
18
 
15
19
  Copyright (c) 2010 jugyo. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/example.rb ADDED
@@ -0,0 +1,8 @@
1
+ require './lib/tm_backtrace'
2
+
3
+ def a; raise 'error'; end
4
+ def b; a; end
5
+ def c; b; end
6
+ def d; c; end
7
+
8
+ d
data/lib/tm_backtrace.rb CHANGED
@@ -3,11 +3,11 @@ class Exception
3
3
  def backtrace
4
4
  b = _backtrace
5
5
  return unless b
6
+
6
7
  b.map do |t|
7
- file, line, _ = t.split(':')
8
- " \e[90mtxmt://open/?url=file://\e[32m" +
9
- File.expand_path(file) +
10
- "\e[90m&line=\e[0m#{line} \e[31m#{_}\e[0m"
8
+ file, line, message = t.split(':')
9
+ file = File.expand_path(file).sub(File.expand_path('~'), '~')
10
+ " \e[90mtxmt://open/?url=file://\e[34m#{ file }\e[90m&line=\e[0m#{ line } \e[31m#{ message }\e[0m"
11
11
  end
12
12
  end
13
13
  end
data/screenshot.png ADDED
Binary file
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - jugyo
@@ -33,7 +33,9 @@ files:
33
33
  - README.rdoc
34
34
  - Rakefile
35
35
  - VERSION
36
+ - example.rb
36
37
  - lib/tm_backtrace.rb
38
+ - screenshot.png
37
39
  has_rdoc: true
38
40
  homepage: http://github.com/jugyo/tm_backtrace
39
41
  licenses: []