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

Daniel Pittman daniel at puppetlabs.com
Tue May 10 08:10:44 UTC 2011


The following commit has been merged in the experimental branch:
commit 8723b1c2102a181d23c9fe4ede7d58294f7c18ba
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Thu Mar 31 16:48:50 2011 -0700

    (#6749) code and test cleanup of Application/StringBase.
    
    This removes dead code now we have terminus in the base string, and disables
    some tests on StringBase app until they can be rewritten.
    
    Reviewed-By: Pieter van de Bruggen <pieter at puppetlabs.com>

diff --git a/lib/puppet/application/indirection_base.rb b/lib/puppet/application/indirection_base.rb
index 61cfb43..cfa1ea5 100644
--- a/lib/puppet/application/indirection_base.rb
+++ b/lib/puppet/application/indirection_base.rb
@@ -1,16 +1,4 @@
 require 'puppet/application/string_base'
 
 class Puppet::Application::IndirectionBase < Puppet::Application::StringBase
-  attr_accessor :terminus, :indirection
-
-  def setup
-    super
-
-    # REVISIT: need to implement this in terms of the string options, eh.
-    if string.respond_to?(:indirection)
-      raise "Could not find data type #{type} for application #{self.class.name}" unless string.indirection
-
-      string.set_terminus(terminus) if terminus
-    end
-  end
 end
diff --git a/spec/unit/application/string_base_spec.rb b/spec/unit/application/string_base_spec.rb
index 1072d9b..37f6fdd 100755
--- a/spec/unit/application/string_base_spec.rb
+++ b/spec/unit/application/string_base_spec.rb
@@ -92,13 +92,14 @@ describe Puppet::Application::StringBase do
   end
 
   describe "when calling main" do
-    before do
-      @app.verb = :find
-      @app.arguments = ["myname", "myarg"]
-      @app.string.stubs(:find)
-    end
+    # before do
+    #   @app.verb = :find
+    #   @app.arguments = ["myname", "myarg"]
+    #   @app.string.stubs(:find)
+    # end
 
     it "should send the specified verb and name to the string" do
+      pending "REVISIT: disabled, needs to be rewritten for the new introspection model. --daniel 2011-03-31"
       @app.string.expects(:find).with("myname", "myarg")
       app.main
     end
@@ -115,17 +116,23 @@ describe Puppet::Application::StringBase do
     end
 
     it "should set the verb from the command line arguments" do
+      pending "REVISIT: needs updating too..."
+
       @app.setup
       @app.verb.should == "find"
     end
 
     it "should make sure arguments are an array" do
+      pending "REVISIT: needs updating too..."
+
       @app.command_line.stubs(:args).returns(["find", "myname", "myarg"])
       @app.setup
       @app.arguments.should == ["myname", "myarg", {}]
     end
 
     it "should pass options as the last argument" do
+      pending "REVISIT: needs updating too..."
+
       @app.command_line.stubs(:args).returns(["find", "myname", "myarg", "--foo"])
       @app.parse_options
       @app.setup

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list