def name
      dirs = File.expand_path(@uri.path).split(File::SEPARATOR)

      unless dirs.empty?
        if @scm == :sub_version
          if dirs[-1] == 'trunk'
            dirs.pop
          elsif (dirs[-2] == 'branches' || dirs[-2] == 'tags')
            dirs.pop
            dirs.pop
          end
        elsif @scm == :git
          dirs.last.chomp!('.git')
        end
      end

      return (dirs.last || @uri.host)
    end
def name
      dirs = File.expand_path(@uri.path).split(File::SEPARATOR)

      unless dirs.empty?
        if @scm == :sub_version
          if dirs[-1] == 'trunk'
            dirs.pop
          elsif (dirs[-2] == 'branches' || dirs[-2] == 'tags')
            dirs.pop
            dirs.pop
          end
        elsif @scm == :git
          dirs.last.chomp!('.git')
        end
      end

      return (dirs.last || @uri.host)
    end
Initializes the remote repository.

 @param [Hash] options
   Options for the remote repository.

 @option options [URI::Generic] :uri
   The URI of the remote repository.

 @option options [Symbol, String] :scm
   The SCM used for the remote repository.


 The name of the repository.

 @return [String]
   The remote repository name.

 @since 0.1.2