Class: ProxyTester::RemoteRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/proxy_tester/remote_repository.rb

Instance Method Summary collapse

Constructor Details

#initialize(repository) ⇒ RemoteRepository

Create Remote Repository



12
13
14
# File 'lib/proxy_tester/remote_repository.rb', line 12

def initialize(repository)
  @repository = parse(repository)
end

Instance Method Details

#baseString

source path of repository

Examples:

http://githost/repo.git => repo
user@host:/githost/repo.git => repo

Returns:

  • (String)

    base path to repository



24
25
26
# File 'lib/proxy_tester/remote_repository.rb', line 24

def base
  ::File.basename(repository.path, '.*')
end

#sourceString

source path of repository

Returns:

  • (String)

    path to repository



32
33
34
# File 'lib/proxy_tester/remote_repository.rb', line 32

def source
  repository.to_s
end