public
Description: TextMate bundle - Amplified Mate Productivity
Homepage: http://code.leadmediapartners.com/tools/rubyamp
Clone URL: git://github.com/timcharper/rubyamp.git
hack to work around TextMate's inability to easily specify which ruby to 
use without resorting to sh (resort to sh)
timcharper (author)
Mon Aug 18 14:34:48 -0700 2008
commit  65385d56413e248a99f2a5b52bfe2749b1a665e8
tree    d890778bd406d1a1134c3544d34f141181726c3b
parent  bd1b8145df0c7ce46f7d57b9d7a4390c57d4de9d
...
7
8
9
10
 
11
12
13
14
15
16
 
 
 
 
 
17
18
19
...
7
8
9
 
10
11
12
13
14
15
 
16
17
18
19
20
21
22
23
0
@@ -7,13 +7,17 @@
0
   <key>bundleUUID</key>
0
   <string>255629A2-F227-467B-91B3-21D145908E78</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require 'rubygems'
0
 require 'appscript'
0
 include Appscript
0
 term = app("Terminal")
0
 term.activate
0
-term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY']} &amp;&amp; script/server; exit"</string>
0
+term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY']} &amp;&amp; script/server; exit"
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>none</string>
0
   <key>name</key>
...
5
6
7
8
 
9
10
11
...
47
48
49
50
 
 
 
 
 
51
52
53
...
5
6
7
 
8
9
10
11
...
47
48
49
 
50
51
52
53
54
55
56
57
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_tm_helpers.rb"
0
 require "#{ENV['TM_SUPPORT_PATH']}/lib/ui.rb"
0
@@ -47,7 +47,11 @@ end
0
 
0
 $&gt; &lt;&lt; word[current_word.length..-1]
0
 
0
-exit_insert_text</string>
0
+exit_insert_text
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>document</string>
0
   <key>keyEquivalent</key>
...
5
6
7
8
 
9
10
11
...
86
87
88
89
 
 
 
 
 
90
91
92
...
5
6
7
 
8
9
10
11
...
86
87
88
 
89
90
91
92
93
94
95
96
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_tm_helpers.rb"
0
 input = $stdin.read
0
@@ -86,7 +86,11 @@ input.scan(/(&lt;[^&gt;]+&gt;)([^&lt;]*)/m).each do |tag, space|
0
   output &lt;&lt; space
0
 end
0
 
0
-puts output</string>
0
+puts output
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>none</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
...
20
21
22
23
 
 
 
 
 
24
25
26
...
5
6
7
 
8
9
10
11
...
20
21
22
 
23
24
25
26
27
28
29
30
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/ruby_amp.rb"
0
 
0
 project_directory = ENV['TM_PROJECT_DIRECTORY']
0
@@ -20,7 +20,11 @@ EOF
0
 
0
 RubyAMP::Launcher.open_debug_process_in_terminal(run_file)
0
 sleep 0.25
0
-RubyAMP::Launcher.open_controller_terminal</string>
0
+RubyAMP::Launcher.open_controller_terminal
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>selection</string>
0
   <key>name</key>
...
5
6
7
8
 
9
10
11
...
13
14
15
16
 
 
 
 
 
17
18
19
...
5
6
7
 
8
9
10
11
...
13
14
15
 
16
17
18
19
20
21
22
23
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_amp.rb"
0
 d = RubyAMP::RemoteDebugger.new
0
@@ -13,7 +13,11 @@ exit unless d.connected?
0
 
0
 what = RubyAMP::Inspect.get_selection
0
 RubyAMP::Inspect.copy_to_clipboard(d.evaluate(what, :current, :yaml))
0
-puts "Copied value of #{what} to clipboard"</string>
0
+puts "Copied value of #{what} to clipboard"
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>document</string>
0
   <key>keyEquivalent</key>
...
5
6
7
8
 
9
10
11
...
13
14
15
16
 
 
 
 
 
17
18
19
...
5
6
7
 
8
9
10
11
...
13
14
15
 
16
17
18
19
20
21
22
23
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_amp.rb"
0
 d = RubyAMP::RemoteDebugger.new
0
@@ -13,7 +13,11 @@ exit unless d.connected?
0
 
0
 what = RubyAMP::Inspect.get_selection
0
 RubyAMP::Inspect.copy_to_clipboard(d.evaluate(what, :current, :pp))
0
-puts "Copied value of #{what} to clipboard"</string>
0
+puts "Copied value of #{what} to clipboard"
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>document</string>
0
   <key>keyEquivalent</key>
...
5
6
7
8
 
9
10
11
...
13
14
15
16
 
 
 
 
 
17
18
19
...
5
6
7
 
8
9
10
11
...
13
14
15
 
16
17
18
19
20
21
22
23
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_amp.rb"
0
 d = RubyAMP::RemoteDebugger.new
0
@@ -13,7 +13,11 @@ exit unless d.connected?
0
 
0
 what = RubyAMP::Inspect.get_selection
0
 RubyAMP::Inspect.copy_to_clipboard(d.evaluate(what, :current, :string))
0
-puts "Copied value of #{what} to clipboard"</string>
0
+puts "Copied value of #{what} to clipboard"
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>document</string>
0
   <key>keyEquivalent</key>
...
5
6
7
8
 
9
10
11
...
14
15
16
17
 
 
 
 
 
18
19
20
...
5
6
7
 
8
9
10
11
...
14
15
16
 
17
18
19
20
21
22
23
24
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/ruby_amp.rb"
0
 RubyAMP::Launcher.open_controller_terminal
0
 
0
@@ -14,7 +14,11 @@ ARGV &lt;&lt; RubyAMP::RemoteDebugger.prepare_debug_wrapper("load #{ENV['TM_FILE
0
 
0
 require 'rubygems'
0
 require 'ruby-debug'
0
-load 'rdebug'</string>
0
+load 'rdebug'
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>line</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
...
23
24
25
26
 
 
 
 
 
27
28
29
...
5
6
7
 
8
9
10
11
...
23
24
25
 
26
27
28
29
30
31
32
33
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_amp.rb"
0
 
0
@@ -23,7 +23,11 @@ if count_deleted == count_breakpoints
0
   puts "Deleted all #{count_deleted} breakpoint(s)"
0
 else
0
   puts "Error deleting breakpoints."
0
-end</string>
0
+ end
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>line</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
...
14
15
16
17
 
 
 
 
 
18
19
20
...
5
6
7
 
8
9
10
11
...
14
15
16
 
17
18
19
20
21
22
23
24
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_amp.rb"
0
 d = RubyAMP::RemoteDebugger.new
0
@@ -14,7 +14,11 @@ exit unless d.connected?
0
 what = RubyAMP::Inspect.get_selection
0
 
0
 puts "#{what} = \n#{d.evaluate(what, :current, :pp)}"
0
-</string>
0
+
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>word</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
12
13
14
15
 
 
 
 
 
16
17
18
...
5
6
7
 
8
9
10
11
12
13
14
 
15
16
17
18
19
20
21
22
0
@@ -5,14 +5,18 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_amp.rb"
0
 d = RubyAMP::RemoteDebugger.new
0
 exit unless d.connected?
0
 
0
 d.command("quit")
0
-puts "Debugger Quit"</string>
0
+puts "Debugger Quit"
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>line</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
 
 
 
 
 
12
13
14
...
5
6
7
 
8
9
10
 
11
12
13
14
15
16
17
18
0
@@ -5,10 +5,14 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/rspec_debugger.rb"
0
 
0
-debug_rspec(:file)</string>
0
+debug_rspec(:file)
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>line</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
...
14
15
16
17
 
 
 
 
 
18
19
20
...
5
6
7
 
8
9
10
11
...
14
15
16
 
17
18
19
20
21
22
23
24
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/ruby_amp.rb"
0
 
0
 run_file = RubyAMP::RemoteDebugger.prepare_debug_wrapper &lt;&lt;-EOF
0
@@ -14,7 +14,11 @@ EOF
0
 RubyAMP::Launcher.open_debug_process_in_terminal(run_file)
0
 sleep 0.25
0
 RubyAMP::Launcher.open_controller_terminal
0
-</string>
0
+
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>selection</string>
0
   <key>name</key>
...
5
6
7
8
 
9
10
11
...
19
20
21
22
 
 
 
 
 
23
24
25
...
5
6
7
 
8
9
10
11
...
19
20
21
 
22
23
24
25
26
27
28
29
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_amp.rb"
0
 
0
@@ -19,7 +19,11 @@ if d.breakpoint.add(source, line)
0
   puts "Set breakpoint at #{source}:#{line}"
0
 else
0
   puts "Failed to set breakpoint."
0
-end</string>
0
+ end
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>line</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
...
28
29
30
31
 
 
 
 
 
32
33
34
...
5
6
7
 
8
9
10
11
...
28
29
30
 
31
32
33
34
35
36
37
38
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
   def short_path(path, paths_to_display = 2)
0
     path.split("/")[(-1 - paths_to_display)..(-1)] * "/"
0
@@ -28,7 +28,11 @@ b_index = TextMate::UI.menu(breakpoints.map{|b| "#{b.source}:#{b.line}"})
0
 exit_discard if b_index.nil?
0
 
0
 breakpoint = breakpoints[b_index]
0
-tm_open(breakpoint.source, :line =&gt; breakpoint.line)</string>
0
+tm_open(breakpoint.source, :line =&gt; breakpoint.line)
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>none</string>
0
   <key>keyEquivalent</key>
...
5
6
7
8
9
 
 
 
 
 
 
10
11
12
...
5
6
7
 
 
8
9
10
11
12
13
14
15
16
0
@@ -5,8 +5,12 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
-require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/go_to_external.rb"</string>
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
+ require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/go_to_external.rb"
0
+
0
+RUBYEOF
0
+
0
+ ${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>word</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
...
67
68
69
70
 
 
 
 
 
71
72
73
...
5
6
7
 
8
9
10
11
...
67
68
69
 
70
71
72
73
74
75
76
77
0
@@ -5,7 +5,7 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_tm_helpers.rb"
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/grep_helpers.rb"
0
@@ -67,7 +67,11 @@ end
0
 
0
 tm_open(selected_match, :line =&gt; line)
0
 
0
-exit_discard</string>
0
+exit_discard
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>word</string>
0
   <key>input</key>
...
7
8
9
10
 
11
12
13
...
32
33
34
35
 
 
 
 
 
36
37
38
...
7
8
9
 
10
11
12
13
...
32
33
34
 
35
36
37
38
39
40
41
42
0
@@ -7,7 +7,7 @@
0
   <key>bundleUUID</key>
0
   <string>5A9D4FC6-6CBE-11D9-A21B-000D93589AF6</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/grep_helpers.rb"
0
 
0
 grepper = GrepperMenu.new("Grep in Project")
0
@@ -32,7 +32,11 @@ grepper.run {
0
   grepper.query_highlight_regexp = Regexp.new(Regexp.escape(m))
0
   grepper.title = "Searching for Class/Module “#{ m }”"
0
 }
0
-</string>
0
+
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>word</string>
0
   <key>input</key>
...
7
8
9
10
 
11
12
13
...
33
34
35
36
 
 
 
 
 
37
38
39
...
7
8
9
 
10
11
12
13
...
33
34
35
 
36
37
38
39
40
41
42
43
0
@@ -7,7 +7,7 @@
0
   <key>bundleUUID</key>
0
   <string>5A9D4FC6-6CBE-11D9-A21B-000D93589AF6</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/grep_helpers.rb"
0
 
0
 grepper = GrepperMenu.new("Grep for Fixture")
0
@@ -33,7 +33,11 @@ grepper.run {
0
   
0
   grepper.query_highlight_regexp = Regexp.new(Regexp.escape(m))
0
   grepper.title = "Searching for fixture “#{ m }”"
0
-}</string>
0
+ }
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>word</string>
0
   <key>input</key>
...
7
8
9
10
 
11
12
13
...
26
27
28
29
 
 
 
 
 
30
31
32
...
7
8
9
 
10
11
12
13
...
26
27
28
 
29
30
31
32
33
34
35
36
0
@@ -7,7 +7,7 @@
0
   <key>bundleUUID</key>
0
   <string>5A9D4FC6-6CBE-11D9-A21B-000D93589AF6</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/grep_helpers.rb"
0
 
0
 grepper = GrepperMenu.new("Grep for Method")
0
@@ -26,7 +26,11 @@ grepper.run {
0
   grepper.query = /(^|;) *((def +(self\.|)#{m}\b)|(def_delegators[\( ][^,]+,.*\b#{m}\b)|(c?attr_(reader|writer|accessor).*\b#{m}\b)|((belongs_to|belongs_to_reciprocated|has_many|has_and_belongs_to_many)[\(: ]+#{m}\b)|(# #{m} +:)|(alias :{0,1}#{m}\b))/
0
   grepper.query_highlight_regexp = Regexp.new(Regexp.escape(m))
0
   grepper.title = "Searching for method “#{ m }”"
0
-}</string>
0
+}
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>word</string>
0
   <key>input</key>
...
7
8
9
10
 
11
12
13
...
19
20
21
22
 
 
 
 
 
23
24
25
...
7
8
9
 
10
11
12
13
...
19
20
21
 
22
23
24
25
26
27
28
29
0
@@ -7,7 +7,7 @@
0
   <key>bundleUUID</key>
0
   <string>5A9D4FC6-6CBE-11D9-A21B-000D93589AF6</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/grep_helpers.rb"
0
 
0
 grepper = GrepperHTML.new("Grep in Project", :include_files =&gt; (%w[rb erb rhtml rxml yml js css html].map{ |i| "*.#{i}"}))
0
@@ -19,7 +19,11 @@ grepper.run {
0
     TextMate::UI.request_string(:title =&gt; "Grep in Project", :prompt =&gt; "Find this:", :default =&gt; "/#{Regexp.escape(query)}/" )
0
   )
0
 }
0
-</string>
0
+
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>word</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
12
13
14
15
 
 
 
 
 
16
17
18
...
5
6
7
 
8
9
10
11
12
13
14
 
15
16
17
18
19
20
21
22
0
@@ -5,14 +5,18 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 
0
 require "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/ruby_amp.rb"
0
 d = RubyAMP::RemoteDebugger.new
0
 exit unless d.connected?
0
 
0
 puts d.command("interrupt")
0
-</string>
0
+
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>fallbackInput</key>
0
   <string>line</string>
0
   <key>input</key>
...
5
6
7
8
 
9
10
11
12
13
14
15
 
 
 
 
 
16
17
18
...
5
6
7
 
8
9
10
11
12
13
14
 
15
16
17
18
19
20
21
22
0
@@ -5,14 +5,18 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require 'rubygems'
0
 require 'appscript'
0
 include Appscript
0
 term = app("Terminal")
0
 term.activate
0
 term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY'].to_s.inspect}"
0
-</string>
0
+
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>none</string>
0
   <key>keyEquivalent</key>
...
5
6
7
8
 
9
10
11
12
13
14
15
 
 
 
 
 
16
17
18
...
5
6
7
 
8
9
10
11
12
13
14
 
15
16
17
18
19
20
21
22
0
@@ -5,14 +5,18 @@
0
   <key>beforeRunningCommand</key>
0
   <string>nop</string>
0
   <key>command</key>
0
- <string>#!/usr/bin/env ruby
0
+ <string>cat &lt;&lt;'RUBYEOF' &gt; /tmp/ruby-amp-$$.rb
0
 require 'rubygems'
0
 require 'appscript'
0
 include Appscript
0
 term = app("Terminal")
0
 term.activate
0
 term.do_script "cd #{ENV['TM_PROJECT_DIRECTORY'].to_s.inspect} &amp;&amp; ruby script/console"
0
-</string>
0
+
0
+
0
+RUBYEOF
0
+
0
+${TM_RUBY:-ruby} /tmp/ruby-amp-$$.rb; exit_status=$?; rm /tmp/ruby-amp-$$.rb; exit $exit_status</string>
0
   <key>input</key>
0
   <string>none</string>
0
   <key>name</key>