Module: PuppetFixtures::Repository
- Defined in:
- lib/puppet_fixtures.rb
Defined Under Namespace
Classes: Base, Git, Mercurial
Class Method Summary
collapse
Class Method Details
.factory(scm:, remote:, target:, branch:, ref:) ⇒ Object
452
453
454
455
456
457
458
459
460
461
462
|
# File 'lib/puppet_fixtures.rb', line 452
def self.factory(scm:, remote:, target:, branch:, ref:)
cls = case scm
when 'git'
Repository::Git
when 'hg'
Repository::Mercurial
else
raise ArgumentError, "Unfortunately #{scm} is not supported yet"
end
cls.new(remote: remote, target: target, branch: branch, ref: ref)
end
|