summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/provider/vcsrepo/bzr.rb1
-rw-r--r--lib/puppet/provider/vcsrepo/cvs.rb1
-rw-r--r--lib/puppet/provider/vcsrepo/dummy.rb12
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb1
-rw-r--r--lib/puppet/provider/vcsrepo/hg.rb1
-rw-r--r--lib/puppet/provider/vcsrepo/svn.rb1
-rw-r--r--lib/puppet/type/vcsrepo.rb1
7 files changed, 12 insertions, 6 deletions
diff --git a/lib/puppet/provider/vcsrepo/bzr.rb b/lib/puppet/provider/vcsrepo/bzr.rb
index f9d58e2..6169929 100644
--- a/lib/puppet/provider/vcsrepo/bzr.rb
+++ b/lib/puppet/provider/vcsrepo/bzr.rb
@@ -4,7 +4,6 @@ Puppet::Type.type(:vcsrepo).provide(:bzr, :parent => Puppet::Provider::Vcsrepo)
desc "Supports Bazaar repositories"
optional_commands :bzr => 'bzr'
- defaultfor :bzr => :exists
has_features :reference_tracking
def create
diff --git a/lib/puppet/provider/vcsrepo/cvs.rb b/lib/puppet/provider/vcsrepo/cvs.rb
index 5cdcfb8..6dc7882 100644
--- a/lib/puppet/provider/vcsrepo/cvs.rb
+++ b/lib/puppet/provider/vcsrepo/cvs.rb
@@ -4,7 +4,6 @@ Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo)
desc "Supports CVS repositories/workspaces"
optional_commands :cvs => 'cvs'
- defaultfor :cvs => :exists
has_features :gzip_compression, :reference_tracking, :modules
def create
diff --git a/lib/puppet/provider/vcsrepo/dummy.rb b/lib/puppet/provider/vcsrepo/dummy.rb
new file mode 100644
index 0000000..f7b4e54
--- /dev/null
+++ b/lib/puppet/provider/vcsrepo/dummy.rb
@@ -0,0 +1,12 @@
+require File.join(File.dirname(__FILE__), '..', 'vcsrepo')
+
+Puppet::Type.type(:vcsrepo).provide(:dummy, :parent => Puppet::Provider::Vcsrepo) do
+ desc "Dummy default provider"
+
+ defaultfor :vcsrepo => :dummy
+
+ 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
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index 95115c6..9254243 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -6,7 +6,6 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
##TODO modify the commands below so that the su - is included
optional_commands :git => 'git',
:su => 'su'
- defaultfor :git => :exists
has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user
def create
diff --git a/lib/puppet/provider/vcsrepo/hg.rb b/lib/puppet/provider/vcsrepo/hg.rb
index 0be5e08..67a2a82 100644
--- a/lib/puppet/provider/vcsrepo/hg.rb
+++ b/lib/puppet/provider/vcsrepo/hg.rb
@@ -4,7 +4,6 @@ Puppet::Type.type(:vcsrepo).provide(:hg, :parent => Puppet::Provider::Vcsrepo) d
desc "Supports Mercurial repositories"
optional_commands :hg => 'hg'
- defaultfor :hg => :exists
has_features :reference_tracking
def create
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb
index 85c5089..b2a8880 100644
--- a/lib/puppet/provider/vcsrepo/svn.rb
+++ b/lib/puppet/provider/vcsrepo/svn.rb
@@ -6,7 +6,6 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo)
optional_commands :svn => 'svn',
:svnadmin => 'svnadmin'
- defaultfor :svn => :exists
has_features :filesystem_types, :reference_tracking, :basic_auth
def create
diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb
index 1fd006b..4b53235 100644
--- a/lib/puppet/type/vcsrepo.rb
+++ b/lib/puppet/type/vcsrepo.rb
@@ -135,7 +135,6 @@ Puppet::Type.newtype(:vcsrepo) do
newparam :user do
desc "The user to run for repository operations"
- defaultto 'root'
end
newparam :excludes do