Class: GemContribute::HostAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_contribute/host_adapter.rb

Overview

Abstract host adapter. Concrete implementations (GitHubAdapter, future GitLabAdapter, future CodebergAdapter) conform to this interface so the TUI doesn’t have to special-case anything beyond looking up the right adapter for a project’s host.

Public-API methods (no auth needed):

issues(project, labels:)
community_profile(project)
file_contents(project, path)

Auth-required methods (raise AuthRequired without a cached token):

fork(project)
already_forked?(project)

See ADR-0001 for the JIT auth contract.

Instance Method Summary collapse

Instance Method Details

#already_forked?(_project) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


36
37
38
# File 'lib/gem_contribute/host_adapter.rb', line 36

def already_forked?(_project)
  raise NotImplementedError
end

#community_profile(_project) ⇒ Object

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/gem_contribute/host_adapter.rb', line 24

def community_profile(_project)
  raise NotImplementedError
end

#file_contents(_project, _path) ⇒ Object

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/gem_contribute/host_adapter.rb', line 28

def file_contents(_project, _path)
  raise NotImplementedError
end

#fork(_project) ⇒ Object

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/gem_contribute/host_adapter.rb', line 32

def fork(_project)
  raise NotImplementedError
end

#issues(_project, labels: nil) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/gem_contribute/host_adapter.rb', line 20

def issues(_project, labels: nil)
  raise NotImplementedError
end