summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-29 00:07:05 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-29 00:07:05 +0000
commit1cc8ecb0640420d6eb7a66fcb0d282337a263b84 (patch)
tree2c7368ea0f54dcc8af97dc5fc13e610ee42e23b7 /lib
parentdd502db3a976ef6b5091d9cb514427a5de21ff8f (diff)
downloadpuppet-1cc8ecb0640420d6eb7a66fcb0d282337a263b84.tar.gz
puppet-1cc8ecb0640420d6eb7a66fcb0d282337a263b84.tar.xz
puppet-1cc8ecb0640420d6eb7a66fcb0d282337a263b84.zip
Fixing info around newtype options
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2108 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet.rb4
-rw-r--r--lib/puppet/metatype/manager.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet.rb b/lib/puppet.rb
index bcf240dfb..fd94424c0 100644
--- a/lib/puppet.rb
+++ b/lib/puppet.rb
@@ -377,8 +377,8 @@ module Puppet
end
# Create a new type. Just proxy to the Type class.
- def self.newtype(name, parent = nil, &block)
- Puppet::Type.newtype(name, parent, &block)
+ def self.newtype(name, options = {}, &block)
+ Puppet::Type.newtype(name, options, &block)
end
# Retrieve a type by name. Just proxy to the Type class.
diff --git a/lib/puppet/metatype/manager.rb b/lib/puppet/metatype/manager.rb
index ee396389b..172d3f6d4 100644
--- a/lib/puppet/metatype/manager.rb
+++ b/lib/puppet/metatype/manager.rb
@@ -57,7 +57,7 @@ module Manager
def newtype(name, options = {}, &block)
# Handle backward compatibility
unless options.is_a?(Hash)
- Puppet.warning "Puppet::Type.newtype now accepts a hash as the second argument"
+ Puppet.warning "Puppet::Type.newtype(%s) now expects a hash as the second argument, not %s" % [name, options.inspect]
options = {:parent => options}
end