Skip to content

Commit

Permalink
tweak up the commands to source the rvm environment if it's available
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderpantsGnome committed Feb 20, 2010
1 parent df85d0c commit bdbf5e1
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Commands/Alternate File.tmCommand
Expand Up @@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env sh
<string>#!/usr/bin/env bash
. "$TM_BUNDLE_SUPPORT/lib/rvm_textmate"
cat &lt;&lt;'RUBYEOF' &gt; /tmp/textmate-command-$$.rb
require ENV['TM_BUNDLE_SUPPORT'] + "/lib/spec/mate/switch_command"
Expand Down
5 changes: 4 additions & 1 deletion Commands/Run Focussed Specification.tmCommand
Expand Up @@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
<string>#!/usr/bin/env sh
<string>#!/usr/bin/env bash
. "$TM_BUNDLE_SUPPORT/lib/rvm_textmate"
cat &lt;&lt;'RUBYEOF' &gt; /tmp/textmate-command-$$.rb
require ENV['TM_BUNDLE_SUPPORT'] + "/lib/spec/mate"
Expand Down
5 changes: 4 additions & 1 deletion Commands/Run Last Examples file.tmCommand
Expand Up @@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
<string>#!/usr/bin/env sh
<string>#!/usr/bin/env bash
. "$TM_BUNDLE_SUPPORT/lib/rvm_textmate"
cat &lt;&lt;'RUBYEOF' &gt; /tmp/textmate-command-$$.rb
require ENV['TM_BUNDLE_SUPPORT'] + "/lib/spec/mate"
Expand Down
5 changes: 4 additions & 1 deletion Commands/Run Specifications - Normal.tmCommand
Expand Up @@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
<string>#!/usr/bin/env sh
<string>#!/usr/bin/env bash
. "$TM_BUNDLE_SUPPORT/lib/rvm_textmate"
cat &lt;&lt;'RUBYEOF' &gt; /tmp/textmate-command-$$.rb
require ENV['TM_BUNDLE_SUPPORT'] + "/lib/spec/mate"
Expand Down
Expand Up @@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>saveModifiedFiles</string>
<key>command</key>
<string>#!/usr/bin/env sh
<string>#!/usr/bin/env bash
. "$TM_BUNDLE_SUPPORT/lib/rvm_textmate"
cat &lt;&lt;'RUBYEOF' &gt; /tmp/textmate-command-$$.rb
require ENV['TM_BUNDLE_SUPPORT'] + "/lib/spec/mate"
Expand Down
5 changes: 4 additions & 1 deletion Commands/Save spec and remember.tmCommand
Expand Up @@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
<string>#!/usr/bin/env sh
<string>#!/usr/bin/env bash
. "$TM_BUNDLE_SUPPORT/lib/rvm_textmate"
cat &lt;&lt;'RUBYEOF' &gt; /tmp/textmate-command-$$.rb
require ENV['TM_BUNDLE_SUPPORT'] + "/lib/spec/mate"
Expand Down
2 changes: 2 additions & 0 deletions Support/lib/rvm_textmate
@@ -0,0 +1,2 @@
[[ -f "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
[[ -f "$TM_PROJECT_DIRECTORY/.rvmrc" ]] && . "$TM_PROJECT_DIRECTORY/.rvmrc"

0 comments on commit bdbf5e1

Please sign in to comment.