Class: Avm::EacGithubBase0::ApplicationScms::Base

Inherits:
Git::ApplicationScms::Base
  • Object
show all
Defined in:
lib/avm/eac_github_base0/application_scms/base.rb

Constant Summary collapse

REPOSITORY_URL_SUFFIX =
'.git'

Instance Method Summary collapse

Instance Method Details

#git_https_urlAddressable::URI

Returns:

  • (Addressable::URI)


13
14
15
16
17
# File 'lib/avm/eac_github_base0/application_scms/base.rb', line 13

def git_https_url
  r = web_url.dup
  r.path = "#{r.path}#{REPOSITORY_URL_SUFFIX}"
  r
end

#git_ssh_urlAddressable::URI

Returns:

  • (Addressable::URI)


20
21
22
23
24
25
26
27
# File 'lib/avm/eac_github_base0/application_scms/base.rb', line 20

def git_ssh_url
  ::Addressable::URI.new(
    scheme: 'ssh',
    user: application.scm_ssh_username,
    host: web_url.host,
    path: "#{application.scm_repos_path}#{REPOSITORY_URL_SUFFIX}"
  )
end

#to_s_type_specificString

Returns:

  • (String)


30
31
32
# File 'lib/avm/eac_github_base0/application_scms/base.rb', line 30

def to_s_type_specific
  web_url.to_s
end

#web_urlAddressable::URI

Returns:

  • (Addressable::URI)


35
36
37
# File 'lib/avm/eac_github_base0/application_scms/base.rb', line 35

def web_url
  application.scm_url.to_uri + application.scm_repos_path.to_s
end