Module: RailsAiBridge::Registry::GitRunner

Included in:
DefaultGitRunner
Defined in:
lib/rails_ai_bridge/registry/skill_source_resolver.rb

Overview

Interface for git operations, allowing test injection.

Implementations should provide methods to clone and pull git repositories.

See Also:

Instance Method Summary collapse

Instance Method Details

#checkout_ref(_path, _ref) ⇒ void

This method returns an undefined value.

Checks out a specific git ref inside a local repository directory.

Parameters:

  • _path (String)

    path to the local repository

  • _ref (String)

    branch, tag, or commit SHA to check out

Raises:

  • (StandardError)

    if git checkout fails



39
40
41
# File 'lib/rails_ai_bridge/registry/skill_source_resolver.rb', line 39

def checkout_ref(_path, _ref)
  raise NotImplementedError
end

#clone_repo(_url, _dest) ⇒ void

This method returns an undefined value.

Clones a remote repository to a local directory path.

Parameters:

  • _url (String)

    git repository URL

  • _dest (String)

    destination directory path

Raises:

  • (StandardError)

    if git clone fails



20
21
22
# File 'lib/rails_ai_bridge/registry/skill_source_resolver.rb', line 20

def clone_repo(_url, _dest)
  raise NotImplementedError
end

#pull_repo(_path) ⇒ void

This method returns an undefined value.

Pulls latest changes inside a local repository directory.

Parameters:

  • _path (String)

    path to the local repository

Raises:

  • (StandardError)

    if git pull fails



29
30
31
# File 'lib/rails_ai_bridge/registry/skill_source_resolver.rb', line 29

def pull_repo(_path)
  raise NotImplementedError
end