[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
Markus Roberts
Markus at reality.com
Wed Jul 14 10:37:05 UTC 2010
The following commit has been merged in the upstream branch:
commit 5bab997c39e72c87cd688f7f21b1a6f446fb30f5
Author: Markus Roberts <Markus at reality.com>
Date: Fri Jul 9 15:58:04 2010 -0700
maint:rename resource_type to define in internal dsl
That's it. Now its got the same name internal or external.
diff --git a/lib/puppet/dsl/resource_type_api.rb b/lib/puppet/dsl/resource_type_api.rb
index 014d1a3..ba48968 100644
--- a/lib/puppet/dsl/resource_type_api.rb
+++ b/lib/puppet/dsl/resource_type_api.rb
@@ -1,7 +1,7 @@
require 'puppet/resource/type'
module Puppet::DSL::ResourceTypeAPI
- def resource_type(name, *args, &block)
+ def define(name, *args, &block)
result = mk_resource_type(:definition, name, Hash.new, block)
result.set_arguments(munge_type_arguments(args))
result
diff --git a/spec/unit/dsl/resource_type_api_spec.rb b/spec/unit/dsl/resource_type_api_spec.rb
index 8d63bf2..e9b52ee 100755
--- a/spec/unit/dsl/resource_type_api_spec.rb
+++ b/spec/unit/dsl/resource_type_api_spec.rb
@@ -14,7 +14,7 @@ describe Puppet::DSL::ResourceTypeAPI do
end
[:definition, :node, :hostclass].each do |type|
- method = type == :definition ? "resource_type" : type
+ method = type == :definition ? "define" : type
it "should be able to create a #{type}" do
newtype = Puppet::Resource::Type.new(:hostclass, "foo")
Puppet::Resource::Type.expects(:new).with { |t, n, args| t == type }.returns newtype
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list