blob: 04c48a3e261fe12e70f288fa90816f6ab69c7a3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
require 'pathname'
Puppet::Type.newtype(:vcsrepo) do
desc "A local version control repository"
ensurable
newparam(:path) do
desc "Absolute path to repository"
isnamevar
validate do |value|
path = Pathname.new(value)
unless path.absolute?
raise ArgumentError, "Path must be absolute: #{path}"
end
end
end
newparam(:source) do
desc "The source URL for the repository"
validate do |value|
URI.parse(value)
end
end
newparam(:fstype) do
desc "Filesystem type (for providers that support it, eg subversion)"
end
newproperty(:revision) do
desc "The revision of the repository"
newvalue(/^\S+$/)
end
end
|