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
431
432
433
434
435
436
437
438
439
440
441
|
# File 'lib/puppet_fixtures.rb', line 431
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
|