[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5
Luke Kanies
luke at puppetlabs.com
Tue May 10 08:05:13 UTC 2011
The following commit has been merged in the experimental branch:
commit 7da0a26f1bd44ecfffe9f622ec9d560870506207
Author: Luke Kanies <luke at puppetlabs.com>
Date: Tue Feb 22 13:36:18 2011 -0800
Adding a string form to interfaces
Signed-off-by: Luke Kanies <luke at puppetlabs.com>
diff --git a/lib/puppet/interface.rb b/lib/puppet/interface.rb
index 901e83a..70356de 100644
--- a/lib/puppet/interface.rb
+++ b/lib/puppet/interface.rb
@@ -103,4 +103,8 @@ class Puppet::Interface
instance_eval(&block)
end
end
+
+ def to_s
+ name.to_s
+ end
end
diff --git a/spec/unit/interface_spec.rb b/spec/unit/interface_spec.rb
index 4fe797b..5d25623 100644
--- a/spec/unit/interface_spec.rb
+++ b/spec/unit/interface_spec.rb
@@ -32,6 +32,10 @@ describe Puppet::Interface do
end
end
+ it "should use its name converted to a string as its string form" do
+ Puppet::Interface.new(:me).to_s.should == "me"
+ end
+
it "should allow overriding of the default format" do
face = Puppet::Interface.new(:me)
face.set_default_format :foo
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list