[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Pieter van de Bruggen pieter at puppetlabs.com
Tue May 10 08:08:03 UTC 2011


The following commit has been merged in the experimental branch:
commit c25fb94725c9abfb36e67938356f97823f8b605e
Author: Pieter van de Bruggen <pieter at puppetlabs.com>
Date:   Wed Mar 23 16:28:28 2011 -0700

    (#6770) Rename Puppet::Interface::interface method.
    
    Puppet::Interface::interface is now Puppet::Interface::define, also aliased to
    Puppet::Interface::[] for convenience.
    
    Paired-With: Nick Lewis

diff --git a/README.markdown b/README.markdown
index 656a3fb..5f720db 100644
--- a/README.markdown
+++ b/README.markdown
@@ -84,7 +84,7 @@ Or use IRB to do the same thing:
     $ irb
     >> require 'puppet/interface'
     => true
-    >> interface = Puppet::Interface.interface(:facts).new
+    >> interface = Puppet::Interface[:facts, '1.0.0']
     => #<Puppet::Interface::Facts:0x1024a1390 @format=:yaml>
     >> facts = interface.find("myhost"); nil
 
@@ -96,7 +96,7 @@ Like most parts of Puppet, these are easy to extend.  Just drop a new action int
 
     $ cat lib/puppet/interface/catalog/select.rb 
     # Select and show a list of resources of a given type.
-    Puppet::Interface.interface(:catalog) do
+    Puppet::Interface.define(:catalog, '1.0.0') do
       action :select do
         invoke do |host,type|
           catalog = Puppet::Resource::Catalog.indirection.find(host)
diff --git a/lib/puppet/application/configurer.rb b/lib/puppet/application/configurer.rb
index 92c8d69..5c9af37 100644
--- a/lib/puppet/application/configurer.rb
+++ b/lib/puppet/application/configurer.rb
@@ -17,7 +17,7 @@ class Puppet::Application::Configurer < Puppet::Application
   end
 
   def run_command
-    report = Puppet::Interface.interface(:configurer, '0.0.1').synchronize(Puppet[:certname])
-    Puppet::Interface.interface(:report, '0.0.1').submit(report)
+    report = Puppet::Interface[:configurer, '0.0.1'].synchronize(Puppet[:certname])
+    Puppet::Interface[:report, '0.0.1'].submit(report)
   end
 end
diff --git a/lib/puppet/application/interface.rb b/lib/puppet/application/interface.rb
index 3771ece..f447dc3 100644
--- a/lib/puppet/application/interface.rb
+++ b/lib/puppet/application/interface.rb
@@ -81,7 +81,7 @@ class Puppet::Application::Interface < Puppet::Application
   end
 
   def actions(indirection)
-    return [] unless interface = Puppet::Interface.interface(indirection, '0.0.1')
+    return [] unless interface = Puppet::Interface[indirection, '0.0.1']
     interface.load_actions
     return interface.actions.sort { |a,b| a.to_s <=> b.to_s }
   end
diff --git a/lib/puppet/application/interface_base.rb b/lib/puppet/application/interface_base.rb
index 7d8885b..c1c0204 100644
--- a/lib/puppet/application/interface_base.rb
+++ b/lib/puppet/application/interface_base.rb
@@ -75,7 +75,7 @@ class Puppet::Application::InterfaceBase < Puppet::Application
     unless Puppet::Interface.interface?(@type, '0.0.1')
       raise "Could not find version #{1} of interface '#{@type}'"
     end
-    @interface = Puppet::Interface.interface(@type, '0.0.1')
+    @interface = Puppet::Interface[@type, '0.0.1']
     @format ||= @interface.default_format
 
     # We copy all of the app options to the interface.
diff --git a/lib/puppet/interface.rb b/lib/puppet/interface.rb
index 7f208f5..64f1bfe 100644
--- a/lib/puppet/interface.rb
+++ b/lib/puppet/interface.rb
@@ -10,35 +10,39 @@ class Puppet::Interface
 
   include Puppet::Util
 
-  # This is just so we can search for actions.  We only use its
-  # list of directories to search.
-  # Can't we utilize an external autoloader, or simply use the $LOAD_PATH? -pvb
-  def self.autoloader
-    @autoloader ||= Puppet::Util::Autoload.new(:application, "puppet/interface")
-  end
+  class << self
+    # This is just so we can search for actions.  We only use its
+    # list of directories to search.
+    # Can't we utilize an external autoloader, or simply use the $LOAD_PATH? -pvb
+    def autoloader
+      @autoloader ||= Puppet::Util::Autoload.new(:application, "puppet/interface")
+    end
 
-  def self.interfaces
-    Puppet::Interface::InterfaceCollection.interfaces
-  end
+    def interfaces
+      Puppet::Interface::InterfaceCollection.interfaces
+    end
 
-  def self.interface?(name, version)
-    Puppet::Interface::InterfaceCollection.interface?(name, version)
-  end
+    def interface?(name, version)
+      Puppet::Interface::InterfaceCollection.interface?(name, version)
+    end
 
-  def self.register(instance)
-    Puppet::Interface::InterfaceCollection.register(instance)
-  end
+    def register(instance)
+      Puppet::Interface::InterfaceCollection.register(instance)
+    end
 
-  def self.interface(name, version, &blk)
-    if interface?(name, version)
-      interface = Puppet::Interface::InterfaceCollection[name, version]
-      interface.instance_eval(&blk) if blk
-    else
-      interface = self.new(name, :version => version, &blk)
-      Puppet::Interface::InterfaceCollection.register(interface)
-      interface.load_actions
+    def define(name, version, &blk)
+      if interface?(name, version)
+        interface = Puppet::Interface::InterfaceCollection[name, version]
+        interface.instance_eval(&blk) if blk
+      else
+        interface = self.new(name, :version => version, &blk)
+        Puppet::Interface::InterfaceCollection.register(interface)
+        interface.load_actions
+      end
+      return interface
     end
-    return interface
+
+    alias :[] :define
   end
 
   attr_accessor :default_format
diff --git a/lib/puppet/interface/v0.0.1/catalog.rb b/lib/puppet/interface/v0.0.1/catalog.rb
index 6472062..7d61528 100644
--- a/lib/puppet/interface/v0.0.1/catalog.rb
+++ b/lib/puppet/interface/v0.0.1/catalog.rb
@@ -1,6 +1,6 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:catalog, '0.0.1') do
+Puppet::Interface::Indirector.define(:catalog, '0.0.1') do
   action(:apply) do
     invoke do |catalog|
       report = Puppet::Transaction::Report.new("apply")
@@ -28,7 +28,7 @@ Puppet::Interface::Indirector.interface(:catalog, '0.0.1') do
       facts_to_upload = {:facts_format => :b64_zlib_yaml, :facts => CGI.escape(facts.render(:b64_zlib_yaml))}
       catalog = nil
       retrieval_duration = thinmark do
-        catalog = Puppet::Interface.interface(:catalog, '0.0.1').find(certname, facts_to_upload)
+        catalog = Puppet::Interface[:catalog, '0.0.1'].find(certname, facts_to_upload)
       end
       catalog = catalog.to_ral
       catalog.finalize
diff --git a/lib/puppet/interface/v0.0.1/catalog/select.rb b/lib/puppet/interface/v0.0.1/catalog/select.rb
index bc65069..35f1a1e 100644
--- a/lib/puppet/interface/v0.0.1/catalog/select.rb
+++ b/lib/puppet/interface/v0.0.1/catalog/select.rb
@@ -1,5 +1,5 @@
 # Select and show a list of resources of a given type.
-Puppet::Interface.interface(:catalog, '0.0.1') do
+Puppet::Interface.define(:catalog, '0.0.1') do
   action :select do
     invoke do |host,type|
       catalog = Puppet::Resource::Catalog.indirection.find(host)
diff --git a/lib/puppet/interface/v0.0.1/certificate.rb b/lib/puppet/interface/v0.0.1/certificate.rb
index aee123a..52019fd 100644
--- a/lib/puppet/interface/v0.0.1/certificate.rb
+++ b/lib/puppet/interface/v0.0.1/certificate.rb
@@ -1,4 +1,4 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:certificate, '0.0.1') do
+Puppet::Interface::Indirector.define(:certificate, '0.0.1') do
 end
diff --git a/lib/puppet/interface/v0.0.1/certificate_request.rb b/lib/puppet/interface/v0.0.1/certificate_request.rb
index 169d6e5..e5ed1b5 100644
--- a/lib/puppet/interface/v0.0.1/certificate_request.rb
+++ b/lib/puppet/interface/v0.0.1/certificate_request.rb
@@ -1,4 +1,4 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:certificate_request, '0.0.1') do
+Puppet::Interface::Indirector.define(:certificate_request, '0.0.1') do
 end
diff --git a/lib/puppet/interface/v0.0.1/certificate_revocation_list.rb b/lib/puppet/interface/v0.0.1/certificate_revocation_list.rb
index 7f4f517..f6d8a3d 100644
--- a/lib/puppet/interface/v0.0.1/certificate_revocation_list.rb
+++ b/lib/puppet/interface/v0.0.1/certificate_revocation_list.rb
@@ -1,4 +1,4 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:certificate_revocation_list, '0.0.1') do
+Puppet::Interface::Indirector.define(:certificate_revocation_list, '0.0.1') do
 end
diff --git a/lib/puppet/interface/v0.0.1/config.rb b/lib/puppet/interface/v0.0.1/config.rb
index 2437712..b33e19b 100644
--- a/lib/puppet/interface/v0.0.1/config.rb
+++ b/lib/puppet/interface/v0.0.1/config.rb
@@ -1,6 +1,6 @@
 require 'puppet/interface'
 
-Puppet::Interface.interface(:config, '0.0.1') do
+Puppet::Interface.define(:config, '0.0.1') do
   action(:print) do
     invoke do |*args|
       Puppet.settings[:configprint] = args.join(",")
diff --git a/lib/puppet/interface/v0.0.1/configurer.rb b/lib/puppet/interface/v0.0.1/configurer.rb
index 0ab71c4..38536b6 100644
--- a/lib/puppet/interface/v0.0.1/configurer.rb
+++ b/lib/puppet/interface/v0.0.1/configurer.rb
@@ -1,11 +1,11 @@
 require 'puppet/interface'
 
-Puppet::Interface.interface(:configurer, '0.0.1') do
+Puppet::Interface.define(:configurer, '0.0.1') do
   action(:synchronize) do
     invoke do |certname|
-      facts = Puppet::Interface.interface(:facts, '0.0.1').find(certname)
-      catalog = Puppet::Interface.interface(:catalog, '0.0.1').download(certname, facts)
-      report = Puppet::Interface.interface(:catalog, '0.0.1').apply(catalog)
+      facts = Puppet::Interface[:facts, '0.0.1'].find(certname)
+      catalog = Puppet::Interface[:catalog, '0.0.1'].download(certname, facts)
+      report = Puppet::Interface[:catalog, '0.0.1'].apply(catalog)
       report
     end
   end
diff --git a/lib/puppet/interface/v0.0.1/facts.rb b/lib/puppet/interface/v0.0.1/facts.rb
index e987d07..c4bbad8 100644
--- a/lib/puppet/interface/v0.0.1/facts.rb
+++ b/lib/puppet/interface/v0.0.1/facts.rb
@@ -1,7 +1,7 @@
 require 'puppet/interface/indirector'
 require 'puppet/node/facts'
 
-Puppet::Interface::Indirector.interface(:facts, '0.0.1') do
+Puppet::Interface::Indirector.define(:facts, '0.0.1') do
   set_default_format :yaml
 
   # Upload our facts to the server
diff --git a/lib/puppet/interface/v0.0.1/file.rb b/lib/puppet/interface/v0.0.1/file.rb
index 2f27e43..91904e8 100644
--- a/lib/puppet/interface/v0.0.1/file.rb
+++ b/lib/puppet/interface/v0.0.1/file.rb
@@ -1,5 +1,5 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:file, '0.0.1') do
+Puppet::Interface::Indirector.define(:file, '0.0.1') do
   set_indirection_name :file_bucket_file
 end
diff --git a/lib/puppet/interface/v0.0.1/key.rb b/lib/puppet/interface/v0.0.1/key.rb
index ddd3a6e..fbc9b67 100644
--- a/lib/puppet/interface/v0.0.1/key.rb
+++ b/lib/puppet/interface/v0.0.1/key.rb
@@ -1,4 +1,4 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:key, '0.0.1') do
+Puppet::Interface::Indirector.define(:key, '0.0.1') do
 end
diff --git a/lib/puppet/interface/v0.0.1/node.rb b/lib/puppet/interface/v0.0.1/node.rb
index 8984268..4ecec14 100644
--- a/lib/puppet/interface/v0.0.1/node.rb
+++ b/lib/puppet/interface/v0.0.1/node.rb
@@ -1,5 +1,5 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:node, '0.0.1') do
+Puppet::Interface::Indirector.define(:node, '0.0.1') do
   set_default_format :yaml
 end
diff --git a/lib/puppet/interface/v0.0.1/report.rb b/lib/puppet/interface/v0.0.1/report.rb
index 3f4e173..bacb46e 100644
--- a/lib/puppet/interface/v0.0.1/report.rb
+++ b/lib/puppet/interface/v0.0.1/report.rb
@@ -1,6 +1,6 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:report, '0.0.1') do
+Puppet::Interface::Indirector.define(:report, '0.0.1') do
   action(:submit) do
     invoke do |report|
       begin
diff --git a/lib/puppet/interface/v0.0.1/resource.rb b/lib/puppet/interface/v0.0.1/resource.rb
index 61c90cc..1a6f3b6 100644
--- a/lib/puppet/interface/v0.0.1/resource.rb
+++ b/lib/puppet/interface/v0.0.1/resource.rb
@@ -1,4 +1,4 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:resource, '0.0.1') do
+Puppet::Interface::Indirector.define(:resource, '0.0.1') do
 end
diff --git a/lib/puppet/interface/v0.0.1/resource_type.rb b/lib/puppet/interface/v0.0.1/resource_type.rb
index 9cc4bef..6f5547c 100644
--- a/lib/puppet/interface/v0.0.1/resource_type.rb
+++ b/lib/puppet/interface/v0.0.1/resource_type.rb
@@ -1,4 +1,4 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:resource_type, '0.0.1') do
+Puppet::Interface::Indirector.define(:resource_type, '0.0.1') do
 end
diff --git a/lib/puppet/interface/v0.0.1/status.rb b/lib/puppet/interface/v0.0.1/status.rb
index d8cded8..7f4b56a 100644
--- a/lib/puppet/interface/v0.0.1/status.rb
+++ b/lib/puppet/interface/v0.0.1/status.rb
@@ -1,4 +1,4 @@
 require 'puppet/interface/indirector'
 
-Puppet::Interface::Indirector.interface(:status, '0.0.1') do
+Puppet::Interface::Indirector.define(:status, '0.0.1') do
 end
diff --git a/spec/unit/application/interface_base_spec.rb b/spec/unit/application/interface_base_spec.rb
index 3a6966d..7a247c0 100644
--- a/spec/unit/application/interface_base_spec.rb
+++ b/spec/unit/application/interface_base_spec.rb
@@ -4,7 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 require 'puppet/application/interface_base'
 require 'puppet/application/interface_base'
 
-base_interface = Puppet::Interface.interface(:basetest, '0.0.1')
+base_interface = Puppet::Interface[:basetest, '0.0.1']
 class Puppet::Application::InterfaceBase::Basetest < Puppet::Application::InterfaceBase
 end
 
diff --git a/spec/unit/interface/catalog_spec.rb b/spec/unit/interface/catalog_spec.rb
index 1d33fed..c615181 100644
--- a/spec/unit/interface/catalog_spec.rb
+++ b/spec/unit/interface/catalog_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:catalog, '0.0.1') do
+describe Puppet::Interface.define(:catalog, '0.0.1') do
 end
diff --git a/spec/unit/interface/certificate_request_spec.rb b/spec/unit/interface/certificate_request_spec.rb
index 994a19a..0143ebc 100644
--- a/spec/unit/interface/certificate_request_spec.rb
+++ b/spec/unit/interface/certificate_request_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:certificate_request, '0.0.1') do
+describe Puppet::Interface.define(:certificate_request, '0.0.1') do
 end
diff --git a/spec/unit/interface/certificate_revocation_list_spec.rb b/spec/unit/interface/certificate_revocation_list_spec.rb
index 024770e..9655dd3 100644
--- a/spec/unit/interface/certificate_revocation_list_spec.rb
+++ b/spec/unit/interface/certificate_revocation_list_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:certificate_revocation_list, '0.0.1') do
+describe Puppet::Interface.define(:certificate_revocation_list, '0.0.1') do
 end
diff --git a/spec/unit/interface/certificate_spec.rb b/spec/unit/interface/certificate_spec.rb
index 45d33fe..e5c63e4 100644
--- a/spec/unit/interface/certificate_spec.rb
+++ b/spec/unit/interface/certificate_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:certificate, '0.0.1') do
+describe Puppet::Interface.define(:certificate, '0.0.1') do
 end
diff --git a/spec/unit/interface/config_spec.rb b/spec/unit/interface/config_spec.rb
index 20a92bf..a2ec7b5 100644
--- a/spec/unit/interface/config_spec.rb
+++ b/spec/unit/interface/config_spec.rb
@@ -2,7 +2,7 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:config, '0.0.1') do
+describe Puppet::Interface.define(:config, '0.0.1') do
   it "should use Settings#print_config_options when asked to print" do
     Puppet.settings.stubs(:puts)
     Puppet.settings.expects(:print_config_options)
diff --git a/spec/unit/interface/configurer_spec.rb b/spec/unit/interface/configurer_spec.rb
index 589e6be..e97e63b 100644
--- a/spec/unit/interface/configurer_spec.rb
+++ b/spec/unit/interface/configurer_spec.rb
@@ -4,7 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 require 'puppet/indirector/catalog/rest'
 require 'tempfile'
 
-describe Puppet::Interface.interface(:configurer, '0.0.1') do
+describe Puppet::Interface.define(:configurer, '0.0.1') do
   describe "#synchronize" do
     it "should retrieve and apply a catalog and return a report" do
       dirname = Dir.mktmpdir("puppetdir")
diff --git a/spec/unit/interface/facts_spec.rb b/spec/unit/interface/facts_spec.rb
index 4782ecb..5f0214f 100644
--- a/spec/unit/interface/facts_spec.rb
+++ b/spec/unit/interface/facts_spec.rb
@@ -2,7 +2,7 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:facts, '0.0.1') do
+describe Puppet::Interface.define(:facts, '0.0.1') do
   it "should define an 'upload' fact" do
     subject.should be_action(:upload)
   end
diff --git a/spec/unit/interface/file_spec.rb b/spec/unit/interface/file_spec.rb
index 4b776fb..bd6e31c 100644
--- a/spec/unit/interface/file_spec.rb
+++ b/spec/unit/interface/file_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:file, '0.0.1') do
+describe Puppet::Interface.define(:file, '0.0.1') do
 end
diff --git a/spec/unit/interface/key_spec.rb b/spec/unit/interface/key_spec.rb
index 8c950ba..5194978 100644
--- a/spec/unit/interface/key_spec.rb
+++ b/spec/unit/interface/key_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:key, '0.0.1') do
+describe Puppet::Interface.define(:key, '0.0.1') do
 end
diff --git a/spec/unit/interface/node_spec.rb b/spec/unit/interface/node_spec.rb
index 1040818..91914c3 100644
--- a/spec/unit/interface/node_spec.rb
+++ b/spec/unit/interface/node_spec.rb
@@ -2,7 +2,7 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:node, '0.0.1') do
+describe Puppet::Interface.define(:node, '0.0.1') do
   it "should set its default format to :yaml" do
     subject.default_format.should == :yaml
   end
diff --git a/spec/unit/interface/report_spec.rb b/spec/unit/interface/report_spec.rb
index 0a7acfa..23855db 100644
--- a/spec/unit/interface/report_spec.rb
+++ b/spec/unit/interface/report_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:report, '0.0.1') do
+describe Puppet::Interface.define(:report, '0.0.1') do
 end
diff --git a/spec/unit/interface/resource_spec.rb b/spec/unit/interface/resource_spec.rb
index afaed67..408be25 100644
--- a/spec/unit/interface/resource_spec.rb
+++ b/spec/unit/interface/resource_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:resource, '0.0.1') do
+describe Puppet::Interface.define(:resource, '0.0.1') do
 end
diff --git a/spec/unit/interface/resource_type_spec.rb b/spec/unit/interface/resource_type_spec.rb
index f689acc..860be28 100644
--- a/spec/unit/interface/resource_type_spec.rb
+++ b/spec/unit/interface/resource_type_spec.rb
@@ -2,5 +2,5 @@
 
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
-describe Puppet::Interface.interface(:resource_type, '0.0.1') do
+describe Puppet::Interface.define(:resource_type, '0.0.1') do
 end
diff --git a/spec/unit/interface_spec.rb b/spec/unit/interface_spec.rb
index eaeb4c4..520060c 100755
--- a/spec/unit/interface_spec.rb
+++ b/spec/unit/interface_spec.rb
@@ -17,17 +17,17 @@ describe Puppet::Interface do
 
   describe "#interface" do
     it "should register the interface" do
-      interface = Puppet::Interface.interface(:interface_test_register, '0.0.1')
-      interface.should == Puppet::Interface.interface(:interface_test_register, '0.0.1')
+      interface = Puppet::Interface[:interface_test_register, '0.0.1']
+      interface.should == Puppet::Interface[:interface_test_register, '0.0.1']
     end
 
     it "should load actions" do
       Puppet::Interface.any_instance.expects(:load_actions)
-      Puppet::Interface.interface(:interface_test_load_actions, '0.0.1')
+      Puppet::Interface[:interface_test_load_actions, '0.0.1']
     end
 
     it "should require a version number" do
-      proc { Puppet::Interface.interface(:no_version) }.should raise_error(ArgumentError)
+      proc { Puppet::Interface[:no_version] }.should raise_error(ArgumentError)
     end
   end
 
@@ -76,7 +76,7 @@ describe Puppet::Interface do
 
   it "should try to require interfaces that are not known" do
     Puppet::Interface::InterfaceCollection.expects(:require).with "puppet/interface/v0.0.1/foo"
-    Puppet::Interface.interface(:foo, '0.0.1')
+    Puppet::Interface[:foo, '0.0.1']
   end
 
   it "should be able to load all actions in all search paths"

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list