diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-10-30 04:07:52 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-10-30 04:07:52 +0000 |
commit | ba76eb2da506aee52b5bbbce842fa5ac361540a0 (patch) | |
tree | 10016d5b84c55993c5e9391142733a78981de453 /lib | |
parent | e605a5c181ef8cd2ec57384c7816bf1f7980aedb (diff) | |
download | puppet-ba76eb2da506aee52b5bbbce842fa5ac361540a0.tar.gz puppet-ba76eb2da506aee52b5bbbce842fa5ac361540a0.tar.xz puppet-ba76eb2da506aee52b5bbbce842fa5ac361540a0.zip |
Cleaning up tests resulting from the changes to the parser
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@737 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type.rb | 13 | ||||
-rwxr-xr-x | lib/puppet/type/cron.rb | 2 | ||||
-rw-r--r-- | lib/puppet/type/pfile.rb | 6 |
3 files changed, 12 insertions, 9 deletions
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index 9d728c07c..0735d3945 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -669,14 +669,17 @@ class Type < Puppet::Element # now pass through and create the new object elsif implicit - Puppet.warning "Ignoring implicit %s" % name + Puppet.notice "Ignoring implicit %s" % name return retobj else - # merge the new data - retobj.merge(hash) + # We will probably want to support merging of some kind in + # the future, but for now, just throw an error. + raise Puppet::Error, "%s %s is already being managed" % + [self.name, name] + #retobj.merge(hash) - return retobj + #return retobj end end @@ -916,7 +919,7 @@ class Type < Puppet::Element if defined? @parent @path = [@parent.path, self.name].flatten.to_s else - @path = self.name + @path = self.name.to_s end end diff --git a/lib/puppet/type/cron.rb b/lib/puppet/type/cron.rb index f237ecd7d..88ea83b4d 100755 --- a/lib/puppet/type/cron.rb +++ b/lib/puppet/type/cron.rb @@ -310,7 +310,7 @@ module Puppet raise Puppet::DevError, "No command for %s" % name end # if the cron already exists with that name... - if cron = Puppet::Type::Cron[hash[:command]] + if cron = Puppet::Type::Cron[name] # do nothing... elsif tmp = @instances[user].reject { |obj| ! obj.is_a?(Cron) diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 2c2e8ab4f..fd9831447 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -175,12 +175,12 @@ module Puppet def path if defined? @parent if @parent.is_a?(self.class) - return [@parent.path, File.basename(self.name)].flatten + return [@parent.path, File.basename(self.name)].flatten.to_s else - return [@parent.path, self.name].flatten + return [@parent.path, self.name].flatten.to_s end else - return [self.name] + return [self.name].to_s end end |