diff options
| author | Luke Kanies <luke@madstop.com> | 2005-07-31 03:36:59 +0000 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2005-07-31 03:36:59 +0000 |
| commit | 5fa0c20e767852a6f97a0334ed3f6d443825faad (patch) | |
| tree | ca026a2bc26f414c1c8d65aea7a0442ddf5faad1 /lib/puppet | |
| parent | edc28424d658396af622ae31ab7e3d23471e229e (diff) | |
| download | puppet-5fa0c20e767852a6f97a0334ed3f6d443825faad.tar.gz puppet-5fa0c20e767852a6f97a0334ed3f6d443825faad.tar.xz puppet-5fa0c20e767852a6f97a0334ed3f6d443825faad.zip | |
all tests pass again
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@481 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
| -rwxr-xr-x | lib/puppet/filebucket.rb | 6 | ||||
| -rw-r--r-- | lib/puppet/metric.rb | 6 | ||||
| -rw-r--r-- | lib/puppet/type/pfile.rb | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/lib/puppet/filebucket.rb b/lib/puppet/filebucket.rb index 8a613359c..e67b58668 100755 --- a/lib/puppet/filebucket.rb +++ b/lib/puppet/filebucket.rb @@ -60,7 +60,11 @@ module FileBucket @bucket = hash[:Path] hash.delete(:Path) else - @bucket = "/var/puppet/filebucket" + if defined? Puppet + @bucket = File.join(Puppet[:puppetroot], "bucket") + else + @bucket = File.expand_path("~/.filebucket") + end end # XXX this should really be done using Puppet::Type instances... diff --git a/lib/puppet/metric.rb b/lib/puppet/metric.rb index 4b606b87d..9a4fb46da 100644 --- a/lib/puppet/metric.rb +++ b/lib/puppet/metric.rb @@ -140,8 +140,8 @@ module Puppet unless FileTest.exist?(dir) tmp = dir.sub(/^\//,'') path = [File::SEPARATOR] - tmp.split(File::SEPARATOR).each { |dir| - path.push dir + tmp.split(File::SEPARATOR).each { |d| + path.push d unless FileTest.exist?(File.join(path)) Dir.mkdir(File.join(path)) end @@ -149,7 +149,7 @@ module Puppet end unless FileTest.directory?(dir) - raise "%s must be a directory" % dir + raise Puppet::Error.new("%s must be a directory" % dir) end path = self.path diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index dad42c019..3b8469458 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -754,7 +754,8 @@ module Puppet *file* is supported as a protocol)." @paramdoc[:filebucket] = "A repository for backing up files, including - over the network. Currently non-functional." + over the network. Argument must the name of an existing + filebucket." @name = :file @namevar = :path |
