Class: Taeval::GitCheckout::RepoFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/taeval/git_checkout/repo_factory.rb

Class Method Summary collapse

Class Method Details

.create(config, output, reporter) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/taeval/git_checkout/repo_factory.rb', line 10

def self.create(config, output, reporter)
  case config[:host].to_sym
  when :github
    Taeval::GitCheckout::GithubRepo.new(config, output, reporter)
  when :gitlab
    Taeval::GitCheckout::GitlabRepo.new(config, output, reporter)
  when :bitbucket
    Taeval::GitCheckout::BitbucketRepo.new(config, output, reporter)
  else
    reporter.add(repo: config[:id], runner: :git_checkout, msg: "#{config[:host]} is not supported")
  end
end