Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed file:// links in test results #4

Open
wants to merge 1 commit into from

1 participant

@mysmallidea

This commit fixes the "txmt://" backtrace links in the test results window.

Previously, the links would be created like:

# txmt://open?line=5&url=file://app/models/thing.rb

Now, they use the full path, like:

# txmt://open?line=5&url=file:///Users/my_username/Sites/project_name/app/models/thing.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  Support/RubyMate/run_script.rb
View
3  Support/RubyMate/run_script.rb
@@ -35,6 +35,9 @@
if line =~ /^(\s+)(\S.*?):(\d+)(?::in\s*`(.*?)')?/
indent, file, line, method = $1, $2, $3, $4
url, display_name = '', 'untitled document';
+ unless file =~ /^\//
+ file = File.join(ENV['TM_PROJECT_DIRECTORY'], file)
+ end
unless file == "-"
indent += " " if file.sub!(/^\[/, "")
url = '&url=file://' + e_url(file)
Something went wrong with that request. Please try again.