summaryrefslogtreecommitdiff
path: root/lib/puppet/provider/vcsrepo/dummy.rb
blob: 27bfbbed7a8c408e8fbece59e1673e34e06af0a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require File.join(File.dirname(__FILE__), '..', 'vcsrepo')

Puppet::Type.type(:vcsrepo).provide(:dummy, :parent => Puppet::Provider::Vcsrepo) do
  desc "Dummy default provider"

  defaultfor :feature => :posix

  def working_copy_exists?
    providers = @resource.class.providers.map{|x| x.to_s}.sort.reject{|x| x == "dummy"}.join(", ") rescue "none"
    raise("vcsrepo resource must have a provider, available: #{providers}")
  end
end