 
     @openUrlInBrowser(@blobUrl())
 
-  openUrlInBrowser: (url) ->
-    child_process.exec "open #{url}", (error, stdout, stderr) ->
-      throw error if error?
-
-  blobUrl: ->
-    "#{@githubRepoUrl()}/blob/#{@branch()}/#{@filePath()}"
-
-  gitUrl: ->
-    git.getRepo().getConfigValue("remote.#{@remoteName()}.url")
-
-  githubRepoUrl: ->
-    url = @gitUrl()
-    if url.match /https:\/\/github.com\// # e.g., https://github.com/foo/bar.git
-      url.replace(/\.git$/, '')
-    else if url.match /git@github.com/    # e.g., git@github.com:foo/bar.git
-      url.
-        replace(/^git@github.com:/, 'https://github.com/').
-        replace(/\.git$/, '')
-
-  filePath: ->
-    git.relativize(@editSession.getBuffer().getPath())
-
-  remoteName: ->
-    refName = git.getRepo().getUpstreamBranch() # e.g., "refs/remotes/origin/master"
-    return null unless refName?
-
-    refName.match(/^refs\/remotes\/(.*)\/.*$/)[1]
-
-  branch: ->
-    git.getShortHead()
-
+  # Public
   isOpenable: ->
     @validationErrors().length == 0
 
+  # Public
   validationErrors: ->
     unless @remoteName()
       return ["No remote tracking branch exists for current branch (#{@branch()})"]

      return ["Remote URL is not hosted on GitHub.com (#{@gitUrl()})"]

    []


module.exports =
class GitHubFile

  # Public
  @fromSession: (editSession) ->
    new GitHubFile(editSession)

  # Internal
  constructor: (@editSession) ->

  # Public
  open: ->
    unless @isOpenable()
      console.warn error for error in @validationErrors()
