You may have noticed when your tests fail, GoConvey provides a link directly to the failing line in the file:

11. Opening files in your editor from the Web UI - 图1

To enable these links, you need to register a custom URL Scheme handler for your platform. The name of the custom URL Scheme is goconvey (clever, huh?).

OSX

In this example, I will be using MacVim. If you're using Sublime, you will want to change the path to your Sublime installation.

  • Find the application you want to handle the goconvey URL protocol handler: /Applications/MacVim.app
  • Edit the Info.plist file. There are two ways to do this:

    • Using your terminal:

      • Edit /Applications/MacVim.app/Contents/Info.plist
      • Find the section that has <key>CFBundleURLTypes</key>
      • Add a new <dict> entry that looks like this (lines 1198 - 1207):
        11. Opening files in your editor from the Web UI - 图2

If you don't have an <array> section, then create it.

  • Using the GUI

    • In Finder, navigation to the Applications folder and right click on your application and click "Show Package Contents":
      11. Opening files in your editor from the Web UI - 图3

    • Open up the Contents folder and double click on the Info.plist file.

    • Find the section labeled URL types:
      11. Opening files in your editor from the Web UI - 图4

    • Expand the section and create an entry (by clicking on the "plus" icon) that looks like this:
      11. Opening files in your editor from the Web UI - 图5

You want to select Editor as the Document Role, and the string entry inside the URL Schemes section must be goconvey.

  1. - After you edit this file, you must &#34;update&#34; your application: <code>touch /Applications/MacVim.app/</code>

If everything went well, you should click on the Line # link in GoConvey's web UI and get a prompt from your browser:

11. Opening files in your editor from the Web UI - 图6

Click "Launch Application" (and you'll probably want to check the "Remember…" checkbox as well.

Windows

Until someone comes up with a good tutorial, here are some resources:

Linux

To install a customer schema handler, at least in Ubuntu, you can use the script below. It will install a script that handles the links in GoConvey's web GUI and formats it to work with the browsers, at least Visual Studio Code and Sublime. It will also register a desktop handler for the goconvey:// schema.

It uses your default editor if the environment variable EDITOR is set.If you like to use a separate editor just for goconvey links, you can set GOCONVEY_EDITOR.Some editor need extra flags to handle filenames with line number. These flags can be set in GOCONVEY_EDITOR_FLAGS.If no editor environment variables are set it defaults to Visual Studio Code.

This script is tested on Ubuntu 16.04 with Unity.

Save the content below in a file and run it as root.

  1. #!/usr/bin/env bash
  2.  
  3. cat <<EOF-HANDLER > /usr/bin/goconvey-handler
  4. #!/usr/bin/env bash
  5. request="\${1#*://}" # Remove schema from url (goconvey://)
  6. request="\${request#*?url=}" # Remove open?url=
  7. request="\${request#*://}" # Remove file://
  8. request="\${request//%2F//}" # Replace %2F with /
  9. request="\${request/&line=/:}" # Replace &line= with :
  10. request="\${request/&column=/:}" # Replace &column= with :
  11. if [ -n "\${GOCONVEY_EDITOR}" ]; then
  12. \$GOCONVEY_EDITOR \$GOCONVEY_EDITOR_FLAGS "\$request" # Launch specified goconvey editor
  13. elif [ -n "\${EDITOR}" ]; then
  14. \$EDITOR \$GOCONVEY_EDITOR_FLAGS "\$request" # Launch default editor
  15. else
  16. code -g "\$request" # Launch code as editor
  17. fi
  18. EOF-HANDLER
  19.  
  20. cat <<EOF-DESKTOP > /usr/share/applications/goconvey-handler.desktop
  21. [Desktop Entry]
  22. Name=GoConvey URL Handler
  23. GenericName=Text Editor
  24. Comment=Handle URL Scheme goconvey://
  25. Exec=/usr/bin/goconvey-handler %u
  26. Terminal=false
  27. Type=Application
  28. MimeType=x-scheme-handler/goconvey;
  29. Icon=code
  30. Categories=TextEditor;Development;Utility;
  31. Name[en_US]=GoConvey URL handler
  32. EOF-DESKTOP
  33.  
  34. chmod +x /usr/bin/goconvey-handler
  35. update-desktop-database
  36. xdg-mime default /usr/share/applications/goconvey-handler.desktop x-scheme-handler/goconvey

Here are some resources: