[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:13:35 UTC 2011


The following commit has been merged in the experimental branch:
commit 4dd6a77481400b7eeac3377267d092d4c6d22da3
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Wed Apr 13 00:17:57 2011 -0700

    (#7056) Use 'face' rather than 'faces' in the production code.
    
    After some discussion we decided that most uses of the Puppet Face
    infrastructure were about single faces on their own, not about the collection,
    and so we were better referring to Puppet::Face[...] in code.
    
    This implements that by translating names and references in the Ruby code to
    the new, s-less, name.

diff --git a/lib/puppet/application/config.rb b/lib/puppet/application/config.rb
index 41a46c3..a94441e 100644
--- a/lib/puppet/application/config.rb
+++ b/lib/puppet/application/config.rb
@@ -1,4 +1,4 @@
-require 'puppet/application/faces_base'
+require 'puppet/application/face_base'
 
-class Puppet::Application::Config < Puppet::Application::FacesBase
+class Puppet::Application::Config < Puppet::Application::FaceBase
 end
diff --git a/lib/puppet/application/configurer.rb b/lib/puppet/application/configurer.rb
index 751e6b4..6e86cd2 100644
--- a/lib/puppet/application/configurer.rb
+++ b/lib/puppet/application/configurer.rb
@@ -1,5 +1,5 @@
 require 'puppet/application'
-require 'puppet/faces'
+require 'puppet/face'
 
 class Puppet::Application::Configurer < Puppet::Application
   should_parse_config
@@ -17,7 +17,7 @@ class Puppet::Application::Configurer < Puppet::Application
   end
 
   def run_command
-    report = Puppet::Faces[:configurer, '0.0.1'].synchronize(Puppet[:certname])
-    Puppet::Faces[:report, '0.0.1'].submit(report)
+    report = Puppet::Face[:configurer, '0.0.1'].synchronize(Puppet[:certname])
+    Puppet::Face[:report, '0.0.1'].submit(report)
   end
 end
diff --git a/lib/puppet/application/face_base.rb b/lib/puppet/application/face_base.rb
new file mode 100644
index 0000000..2a048a5
--- /dev/null
+++ b/lib/puppet/application/face_base.rb
@@ -0,0 +1,158 @@
+require 'puppet/application'
+require 'puppet/face'
+require 'optparse'
+
+class Puppet::Application::FaceBase < Puppet::Application
+  should_parse_config
+  run_mode :agent
+
+  option("--debug", "-d") do |arg|
+    Puppet::Util::Log.level = :debug
+  end
+
+  option("--verbose", "-v") do
+    Puppet::Util::Log.level = :info
+  end
+
+  option("--format FORMAT") do |arg|
+    @format = arg.to_sym
+  end
+
+  option("--mode RUNMODE", "-r") do |arg|
+    raise "Invalid run mode #{arg}; supported modes are user, agent, master" unless %w{user agent master}.include?(arg)
+    self.class.run_mode(arg.to_sym)
+    set_run_mode self.class.run_mode
+  end
+
+
+  attr_accessor :face, :action, :type, :arguments, :format
+  attr_writer :exit_code
+
+  # This allows you to set the exit code if you don't want to just exit
+  # immediately but you need to indicate a failure.
+  def exit_code
+    @exit_code || 0
+  end
+
+  # Override this if you need custom rendering.
+  def render(result)
+    render_method = Puppet::Network::FormatHandler.format(format).render_method
+    if render_method == "to_pson"
+      jj result
+      exit(0)
+    else
+      result.send(render_method)
+    end
+  end
+
+  def preinit
+    super
+    Signal.trap(:INT) do
+      $stderr.puts "Cancelling Face"
+      exit(0)
+    end
+  end
+
+  def parse_options
+    # We need to parse enough of the command line out early, to identify what
+    # the action is, so that we can obtain the full set of options to parse.
+
+    # REVISIT: These should be configurable versions, through a global
+    # '--version' option, but we don't implement that yet... --daniel 2011-03-29
+    @type   = self.class.name.to_s.sub(/.+:/, '').downcase.to_sym
+    @face   = Puppet::Face[@type, :current]
+    @format = @face.default_format
+
+    # Now, walk the command line and identify the action.  We skip over
+    # arguments based on introspecting the action and all, and find the first
+    # non-option word to use as the action.
+    action = nil
+    index  = -1
+    until @action or (index += 1) >= command_line.args.length do
+      item = command_line.args[index]
+      if item =~ /^-/ then
+        option = @face.options.find do |name|
+          item =~ /^-+#{name.to_s.gsub(/[-_]/, '[-_]')}(?:[ =].*)?$/
+        end
+        if option then
+          option = @face.get_option(option)
+          # If we have an inline argument, just carry on.  We don't need to
+          # care about optional vs mandatory in that case because we do a real
+          # parse later, and that will totally take care of raising the error
+          # when we get there. --daniel 2011-04-04
+          if option.takes_argument? and !item.index('=') then
+            index += 1 unless
+              (option.optional_argument? and command_line.args[index + 1] =~ /^-/)
+          end
+        elsif option = find_global_settings_argument(item) then
+          unless Puppet.settings.boolean? option.name then
+            # As far as I can tell, we treat non-bool options as always having
+            # a mandatory argument. --daniel 2011-04-05
+            index += 1          # ...so skip the argument.
+          end
+        else
+          raise OptionParser::InvalidOption.new(item.sub(/=.*$/, ''))
+        end
+      else
+        action = @face.get_action(item.to_sym)
+        if action.nil? then
+          raise OptionParser::InvalidArgument.new("#{@face} does not have an #{item} action")
+        end
+        @action = action
+      end
+    end
+
+    unless @action
+      raise OptionParser::MissingArgument.new("No action given on the command line")
+    end
+
+    # Now we can interact with the default option code to build behaviour
+    # around the full set of options we now know we support.
+    @action.options.each do |option|
+      option = @action.get_option(option) # make it the object.
+      self.class.option(*option.optparse) # ...and make the CLI parse it.
+    end
+
+    # ...and invoke our parent to parse all the command line options.
+    super
+  end
+
+  def find_global_settings_argument(item)
+    Puppet.settings.each do |name, object|
+      object.optparse_args.each do |arg|
+        next unless arg =~ /^-/
+        # sadly, we have to emulate some of optparse here...
+        pattern = /^#{arg.sub('[no-]', '').sub(/[ =].*$/, '')}(?:[ =].*)?$/
+        pattern.match item and return object
+      end
+    end
+    return nil                  # nothing found.
+  end
+
+  def setup
+    Puppet::Util::Log.newdestination :console
+
+    @arguments = command_line.args
+
+    # Note: because of our definition of where the action is set, we end up
+    # with it *always* being the first word of the remaining set of command
+    # line arguments.  So, strip that off when we construct the arguments to
+    # pass down to the face action. --daniel 2011-04-04
+    @arguments.delete_at(0)
+
+    # We copy all of the app options to the end of the call; This allows each
+    # action to read in the options.  This replaces the older model where we
+    # would invoke the action with options set as global state in the
+    # interface object.  --daniel 2011-03-28
+    @arguments << options
+  end
+
+
+  def main
+    # Call the method associated with the provided action (e.g., 'find').
+    if result = @face.send(@action.name, *arguments)
+      puts render(result)
+    end
+    exit(exit_code)
+  end
+end
diff --git a/lib/puppet/application/faces.rb b/lib/puppet/application/faces.rb
index a7b227e..3dd3f03 100644
--- a/lib/puppet/application/faces.rb
+++ b/lib/puppet/application/faces.rb
@@ -1,5 +1,5 @@
 require 'puppet/application'
-require 'puppet/faces'
+require 'puppet/face'
 
 class Puppet::Application::Faces < Puppet::Application
 
@@ -12,7 +12,7 @@ class Puppet::Application::Faces < Puppet::Application
 
   option("--help", "-h") do |arg|
     puts "Usage: puppet faces [actions|terminuses]
-Lists all available interfaces, and by default includes all available terminuses and actions.
+Lists all available faces, and by default includes all available terminuses and actions.
 "
   end
 
@@ -66,7 +66,7 @@ Lists all available interfaces, and by default includes all available terminuses
   end
 
   def faces
-    Puppet::Faces.faces
+    Puppet::Face.faces
   end
 
   def terminus_classes(indirection)
@@ -74,9 +74,9 @@ Lists all available interfaces, and by default includes all available terminuses
   end
 
   def actions(indirection)
-    return [] unless faces = Puppet::Faces[indirection, '0.0.1']
-    faces.load_actions
-    return faces.actions.sort { |a, b| a.to_s <=> b.to_s }
+    return [] unless face = Puppet::Face[indirection, '0.0.1']
+    face.load_actions
+    return face.actions.sort { |a, b| a.to_s <=> b.to_s }
   end
 
   def load_applications
diff --git a/lib/puppet/application/faces_base.rb b/lib/puppet/application/faces_base.rb
deleted file mode 100644
index f1b77f2..0000000
--- a/lib/puppet/application/faces_base.rb
+++ /dev/null
@@ -1,158 +0,0 @@
-require 'puppet/application'
-require 'puppet/faces'
-require 'optparse'
-
-class Puppet::Application::FacesBase < Puppet::Application
-  should_parse_config
-  run_mode :agent
-
-  option("--debug", "-d") do |arg|
-    Puppet::Util::Log.level = :debug
-  end
-
-  option("--verbose", "-v") do
-    Puppet::Util::Log.level = :info
-  end
-
-  option("--format FORMAT") do |arg|
-    @format = arg.to_sym
-  end
-
-  option("--mode RUNMODE", "-r") do |arg|
-    raise "Invalid run mode #{arg}; supported modes are user, agent, master" unless %w{user agent master}.include?(arg)
-    self.class.run_mode(arg.to_sym)
-    set_run_mode self.class.run_mode
-  end
-
-
-  attr_accessor :face, :action, :type, :arguments, :format
-  attr_writer :exit_code
-
-  # This allows you to set the exit code if you don't want to just exit
-  # immediately but you need to indicate a failure.
-  def exit_code
-    @exit_code || 0
-  end
-
-  # Override this if you need custom rendering.
-  def render(result)
-    render_method = Puppet::Network::FormatHandler.format(format).render_method
-    if render_method == "to_pson"
-      jj result
-      exit(0)
-    else
-      result.send(render_method)
-    end
-  end
-
-  def preinit
-    super
-    Signal.trap(:INT) do
-      $stderr.puts "Cancelling Face"
-      exit(0)
-    end
-  end
-
-  def parse_options
-    # We need to parse enough of the command line out early, to identify what
-    # the action is, so that we can obtain the full set of options to parse.
-
-    # REVISIT: These should be configurable versions, through a global
-    # '--version' option, but we don't implement that yet... --daniel 2011-03-29
-    @type   = self.class.name.to_s.sub(/.+:/, '').downcase.to_sym
-    @face   = Puppet::Faces[@type, :current]
-    @format = @face.default_format
-
-    # Now, walk the command line and identify the action.  We skip over
-    # arguments based on introspecting the action and all, and find the first
-    # non-option word to use as the action.
-    action = nil
-    index  = -1
-    until @action or (index += 1) >= command_line.args.length do
-      item = command_line.args[index]
-      if item =~ /^-/ then
-        option = @face.options.find do |name|
-          item =~ /^-+#{name.to_s.gsub(/[-_]/, '[-_]')}(?:[ =].*)?$/
-        end
-        if option then
-          option = @face.get_option(option)
-          # If we have an inline argument, just carry on.  We don't need to
-          # care about optional vs mandatory in that case because we do a real
-          # parse later, and that will totally take care of raising the error
-          # when we get there. --daniel 2011-04-04
-          if option.takes_argument? and !item.index('=') then
-            index += 1 unless
-              (option.optional_argument? and command_line.args[index + 1] =~ /^-/)
-          end
-        elsif option = find_global_settings_argument(item) then
-          unless Puppet.settings.boolean? option.name then
-            # As far as I can tell, we treat non-bool options as always having
-            # a mandatory argument. --daniel 2011-04-05
-            index += 1          # ...so skip the argument.
-          end
-        else
-          raise OptionParser::InvalidOption.new(item.sub(/=.*$/, ''))
-        end
-      else
-        action = @face.get_action(item.to_sym)
-        if action.nil? then
-          raise OptionParser::InvalidArgument.new("#{@face} does not have an #{item} action")
-        end
-        @action = action
-      end
-    end
-
-    unless @action
-      raise OptionParser::MissingArgument.new("No action given on the command line")
-    end
-
-    # Now we can interact with the default option code to build behaviour
-    # around the full set of options we now know we support.
-    @action.options.each do |option|
-      option = @action.get_option(option) # make it the object.
-      self.class.option(*option.optparse) # ...and make the CLI parse it.
-    end
-
-    # ...and invoke our parent to parse all the command line options.
-    super
-  end
-
-  def find_global_settings_argument(item)
-    Puppet.settings.each do |name, object|
-      object.optparse_args.each do |arg|
-        next unless arg =~ /^-/
-        # sadly, we have to emulate some of optparse here...
-        pattern = /^#{arg.sub('[no-]', '').sub(/[ =].*$/, '')}(?:[ =].*)?$/
-        pattern.match item and return object
-      end
-    end
-    return nil                  # nothing found.
-  end
-
-  def setup
-    Puppet::Util::Log.newdestination :console
-
-    @arguments = command_line.args
-
-    # Note: because of our definition of where the action is set, we end up
-    # with it *always* being the first word of the remaining set of command
-    # line arguments.  So, strip that off when we construct the arguments to
-    # pass down to the face action. --daniel 2011-04-04
-    @arguments.delete_at(0)
-
-    # We copy all of the app options to the end of the call; This allows each
-    # action to read in the options.  This replaces the older model where we
-    # would invoke the action with options set as global state in the
-    # interface object.  --daniel 2011-03-28
-    @arguments << options
-  end
-
-
-  def main
-    # Call the method associated with the provided action (e.g., 'find').
-    if result = @face.send(@action.name, *arguments)
-      puts render(result)
-    end
-    exit(exit_code)
-  end
-end
diff --git a/lib/puppet/application/help.rb b/lib/puppet/application/help.rb
index fd8818d..0d77676 100644
--- a/lib/puppet/application/help.rb
+++ b/lib/puppet/application/help.rb
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
-require 'puppet/application/faces_base'
+require 'puppet/application/face_base'
 
-class Puppet::Application::Help < Puppet::Application::FacesBase
+class Puppet::Application::Help < Puppet::Application::FaceBase
   # Meh.  Disable the default behaviour, which is to inspect the
   # string and return that – not so helpful. --daniel 2011-04-11
   def render(result) result end
diff --git a/lib/puppet/application/indirection_base.rb b/lib/puppet/application/indirection_base.rb
index 7455ebe..580a099 100644
--- a/lib/puppet/application/indirection_base.rb
+++ b/lib/puppet/application/indirection_base.rb
@@ -1,4 +1,4 @@
-require 'puppet/application/faces_base'
+require 'puppet/application/face_base'
 
-class Puppet::Application::IndirectionBase < Puppet::Application::FacesBase
+class Puppet::Application::IndirectionBase < Puppet::Application::FaceBase
 end
diff --git a/lib/puppet/face.rb b/lib/puppet/face.rb
new file mode 100644
index 0000000..f73b2fc
--- /dev/null
+++ b/lib/puppet/face.rb
@@ -0,0 +1,12 @@
+# The public name of this feature is 'face', but we have hidden all the
+# plumbing over in the 'interfaces' namespace to make clear the distinction
+# between the two.
+#
+# This file exists to ensure that the public name is usable without revealing
+# the details of the implementation; you really only need go look at anything
+# under Interfaces if you are looking to extend the implementation.
+#
+# It isn't hidden to gratuitously hide things, just to make it easier to
+# separate out the interests people will have.  --daniel 2011-04-07
+require 'puppet/interface'
+Puppet::Face = Puppet::Interface
diff --git a/lib/puppet/face/catalog.rb b/lib/puppet/face/catalog.rb
new file mode 100644
index 0000000..0dcde35
--- /dev/null
+++ b/lib/puppet/face/catalog.rb
@@ -0,0 +1,40 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:catalog, '0.0.1') do
+  action(:apply) do
+    when_invoked do |catalog, options|
+      report = Puppet::Transaction::Report.new("apply")
+      report.configuration_version = catalog.version
+
+      Puppet::Util::Log.newdestination(report)
+
+      begin
+        benchmark(:notice, "Finished catalog run") do
+          catalog.apply(:report => report)
+        end
+      rescue => detail
+        puts detail.backtrace if Puppet[:trace]
+        Puppet.err "Failed to apply catalog: #{detail}"
+      end
+
+      report.finalize_report
+      report
+    end
+  end
+
+  action(:download) do
+    when_invoked do |certname, facts, options|
+      Puppet::Resource::Catalog.indirection.terminus_class = :rest
+      facts_to_upload = {:facts_format => :b64_zlib_yaml, :facts => CGI.escape(facts.render(:b64_zlib_yaml))}
+      catalog = nil
+      retrieval_duration = thinmark do
+        catalog = Puppet::Face[:catalog, '0.0.1'].find(certname, facts_to_upload)
+      end
+      catalog = catalog.to_ral
+      catalog.finalize
+      catalog.retrieval_duration = retrieval_duration
+      catalog.write_class_file
+      catalog
+    end
+  end
+end
diff --git a/lib/puppet/face/catalog/select.rb b/lib/puppet/face/catalog/select.rb
new file mode 100644
index 0000000..ba27117
--- /dev/null
+++ b/lib/puppet/face/catalog/select.rb
@@ -0,0 +1,10 @@
+# Select and show a list of resources of a given type.
+Puppet::Face.define(:catalog, '0.0.1') do
+  action :select do
+    when_invoked do |host, type, options|
+      catalog = Puppet::Resource::Catalog.indirection.find(host)
+
+      catalog.resources.reject { |res| res.type != type }.each { |res| puts res }
+    end
+  end
+end
diff --git a/lib/puppet/face/certificate.rb b/lib/puppet/face/certificate.rb
new file mode 100644
index 0000000..77e80f0
--- /dev/null
+++ b/lib/puppet/face/certificate.rb
@@ -0,0 +1,46 @@
+require 'puppet/face/indirector'
+require 'puppet/ssl/host'
+
+Puppet::Face::Indirector.define(:certificate, '0.0.1') do
+  # REVISIT: This should use a pre-invoke hook to run the common code that
+  # needs to happen before we invoke any action; that would be much nicer than
+  # the "please repeat yourself" stuff found in here right now.
+  #
+  # option "--ca-location LOCATION" do
+  #   type [:whatever, :location, :symbols]
+  #   hook :before do |value|
+  #     Puppet::SSL::Host.ca_location = value
+  #   end
+  # end
+  #
+  # ...but should I pass the arguments as well?
+  # --daniel 2011-04-05
+  option "--ca-location LOCATION"
+
+  action :generate do
+    when_invoked do |name, options|
+      Puppet::SSL::Host.ca_location = options[:ca_location].to_sym
+      host = Puppet::SSL::Host.new(name)
+      host.generate_certificate_request
+      host.certificate_request.class.indirection.save(host.certificate_request)
+    end
+  end
+
+  action :list do
+    when_invoked do |options|
+      Puppet::SSL::Host.ca_location = options[:ca_location].to_sym
+      Puppet::SSL::Host.indirection.search("*", {
+        :for => :certificate_request,
+      }).map { |h| h.inspect }
+    end
+  end
+
+  action :sign do
+    when_invoked do |name, options|
+      Puppet::SSL::Host.ca_location = options[:ca_location].to_sym
+      host = Puppet::SSL::Host.new(name)
+      host.desired_state = 'signed'
+      Puppet::SSL::Host.indirection.save(host)
+    end
+  end
+end
diff --git a/lib/puppet/face/certificate_request.rb b/lib/puppet/face/certificate_request.rb
new file mode 100644
index 0000000..1feba25
--- /dev/null
+++ b/lib/puppet/face/certificate_request.rb
@@ -0,0 +1,4 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:certificate_request, '0.0.1') do
+end
diff --git a/lib/puppet/face/certificate_revocation_list.rb b/lib/puppet/face/certificate_revocation_list.rb
new file mode 100644
index 0000000..6a75aa5
--- /dev/null
+++ b/lib/puppet/face/certificate_revocation_list.rb
@@ -0,0 +1,4 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:certificate_revocation_list, '0.0.1') do
+end
diff --git a/lib/puppet/face/config.rb b/lib/puppet/face/config.rb
new file mode 100644
index 0000000..45cb6b1
--- /dev/null
+++ b/lib/puppet/face/config.rb
@@ -0,0 +1,12 @@
+require 'puppet/face'
+
+Puppet::Face.define(:config, '0.0.1') do
+  action(:print) do
+    when_invoked do |*args|
+      options = args.pop
+      Puppet.settings[:configprint] = args.join(",")
+      Puppet.settings.print_config_options
+      nil
+    end
+  end
+end
diff --git a/lib/puppet/face/configurer.rb b/lib/puppet/face/configurer.rb
new file mode 100644
index 0000000..74dfb85
--- /dev/null
+++ b/lib/puppet/face/configurer.rb
@@ -0,0 +1,12 @@
+require 'puppet/face'
+
+Puppet::Face.define(:configurer, '0.0.1') do
+  action(:synchronize) do
+    when_invoked do |certname, options|
+      facts = Puppet::Face[:facts, '0.0.1'].find(certname)
+      catalog = Puppet::Face[:catalog, '0.0.1'].download(certname, facts)
+      report = Puppet::Face[:catalog, '0.0.1'].apply(catalog)
+      report
+    end
+  end
+end
diff --git a/lib/puppet/face/facts.rb b/lib/puppet/face/facts.rb
new file mode 100644
index 0000000..8668b25
--- /dev/null
+++ b/lib/puppet/face/facts.rb
@@ -0,0 +1,18 @@
+require 'puppet/face/indirector'
+require 'puppet/node/facts'
+
+Puppet::Face::Indirector.define(:facts, '0.0.1') do
+  set_default_format :yaml
+
+  # Upload our facts to the server
+  action(:upload) do
+    when_invoked do |options|
+      Puppet::Node::Facts.indirection.terminus_class = :facter
+      facts = Puppet::Node::Facts.indirection.find(Puppet[:certname])
+      Puppet::Node::Facts.indirection.terminus_class = :rest
+      Puppet::Node::Facts.indirection.save(facts)
+      Puppet.notice "Uploaded facts for '#{Puppet[:certname]}'"
+      nil
+    end
+  end
+end
diff --git a/lib/puppet/face/file.rb b/lib/puppet/face/file.rb
new file mode 100644
index 0000000..1aa9462
--- /dev/null
+++ b/lib/puppet/face/file.rb
@@ -0,0 +1,5 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:file, '0.0.1') do
+  set_indirection_name :file_bucket_file
+end
diff --git a/lib/puppet/face/help.rb b/lib/puppet/face/help.rb
new file mode 100644
index 0000000..1c2da9e
--- /dev/null
+++ b/lib/puppet/face/help.rb
@@ -0,0 +1,104 @@
+require 'puppet/face'
+require 'puppet/util/command_line'
+require 'pathname'
+require 'erb'
+
+Puppet::Face.define(:help, '0.0.1') do
+  summary "Displays help about puppet subcommands"
+
+  action(:help) do
+    summary "Display help about faces and their actions."
+
+    option "--version VERSION" do
+      desc "Which version of the interface to show help for"
+    end
+
+    when_invoked do |*args|
+      # Check our invocation, because we want varargs and can't do defaults
+      # yet.  REVISIT: when we do option defaults, and positional options, we
+      # should rewrite this to use those. --daniel 2011-04-04
+      options = args.pop
+      if options.nil? or args.length > 2 then
+        raise ArgumentError, "help only takes two (optional) arguments, a face name, and an action"
+      end
+
+      version = :current
+      if options.has_key? :version then
+        if options[:version].to_s !~ /^current$/i then
+          version = options[:version]
+        else
+          if args.length == 0 then
+            raise ArgumentError, "version only makes sense when a face is given"
+          end
+        end
+      end
+
+      # Name those parameters...
+      facename, actionname = args
+
+      if facename then
+        if legacy_applications.include? facename then
+          actionname and raise ArgumentError, "Legacy subcommands don't take actions"
+          return Puppet::Application[facename].help
+        else
+          face = Puppet::Face[facename.to_sym, version]
+          actionname and action = face.get_action(actionname.to_sym)
+        end
+      end
+
+      case args.length
+      when 0 then
+        template = erb 'global.erb'
+      when 1 then
+        face or fail ArgumentError, "Unable to load face #{facename}"
+        template = erb 'face.erb'
+      when 2 then
+        face or fail ArgumentError, "Unable to load face #{facename}"
+        action or fail ArgumentError, "Unable to load action #{actionname} from #{face}"
+        template = erb 'action.erb'
+      else
+        fail ArgumentError, "Too many arguments to help action"
+      end
+
+      # Run the ERB template in our current binding, including all the local
+      # variables we established just above. --daniel 2011-04-11
+      return template.result(binding)
+    end
+  end
+
+  def erb(name)
+    template = (Pathname(__FILE__).dirname + "help" + name)
+    erb = ERB.new(template.read, nil, '%')
+    erb.filename = template.to_s
+    return erb
+  end
+
+  def legacy_applications
+    # The list of applications, less those that are duplicated as a face.
+    Puppet::Util::CommandLine.available_subcommands.reject do |appname|
+      Puppet::Face.face? appname.to_sym, :current or
+        # ...this is a nasty way to exclude non-applications. :(
+        %w{face_base indirection_base}.include? appname
+    end.sort
+  end
+
+  def horribly_extract_summary_from(appname)
+    begin
+      require "puppet/application/#{appname}"
+      help = Puppet::Application[appname].help.split("\n")
+      # Now we find the line with our summary, extract it, and return it.  This
+      # depends on the implementation coincidence of how our pages are
+      # formatted.  If we can't match the pattern we expect we return the empty
+      # string to ensure we don't blow up in the summary. --daniel 2011-04-11
+      while line = help.shift do
+        if md = /^puppet-#{appname}\([^\)]+\) -- (.*)$/.match(line) then
+          return md[1]
+        end
+      end
+    rescue Exception
+      # Damn, but I hate this: we just ignore errors here, no matter what
+      # class they are.  Meh.
+    end
+    return ''
+  end
+end
diff --git a/lib/puppet/faces/help/action.erb b/lib/puppet/face/help/action.erb
similarity index 100%
rename from lib/puppet/faces/help/action.erb
rename to lib/puppet/face/help/action.erb
diff --git a/lib/puppet/faces/help/face.erb b/lib/puppet/face/help/face.erb
similarity index 100%
rename from lib/puppet/faces/help/face.erb
rename to lib/puppet/face/help/face.erb
diff --git a/lib/puppet/face/help/global.erb b/lib/puppet/face/help/global.erb
new file mode 100644
index 0000000..f4c761b
--- /dev/null
+++ b/lib/puppet/face/help/global.erb
@@ -0,0 +1,20 @@
+puppet <subcommand> [options] <action> [options]
+
+Available subcommands, from Puppet Faces:
+% Puppet::Face.faces.sort.each do |name|
+%   face = Puppet::Face[name, :current]
+  <%= face.name.to_s.ljust(16) %>  <%= face.summary %>
+% end
+
+% unless legacy_applications.empty? then # great victory when this is true!
+Available applications, soon to be ported to Faces:
+%   legacy_applications.each do |appname|
+%     summary = horribly_extract_summary_from appname
+  <%= appname.to_s.ljust(16) %>  <%= summary %>
+%   end
+% end
+
+See 'puppet help <subcommand> <action>' for help on a specific subcommand action.
+See 'puppet help <subcommand>' for help on a specific subcommand.
+See 'puppet man  <subcommand>' for the full man page.
+Puppet v<%= Puppet::PUPPETVERSION %>
diff --git a/lib/puppet/face/indirector.rb b/lib/puppet/face/indirector.rb
new file mode 100644
index 0000000..f48611e
--- /dev/null
+++ b/lib/puppet/face/indirector.rb
@@ -0,0 +1,94 @@
+require 'puppet'
+require 'puppet/face'
+
+class Puppet::Face::Indirector < Puppet::Face
+  option "--terminus TERMINUS" do
+    desc "REVISIT: You can select a terminus, which has some bigger effect
+that we should describe in this file somehow."
+  end
+
+  def self.indirections
+    Puppet::Indirector::Indirection.instances.collect { |t| t.to_s }.sort
+  end
+
+  def self.terminus_classes(indirection)
+    Puppet::Indirector::Terminus.terminus_classes(indirection.to_sym).collect { |t| t.to_s }.sort
+  end
+
+  def call_indirection_method(method, *args)
+    options = args.last
+    options.has_key?(:terminus) and set_terminus(options[:terminus])
+
+    begin
+      result = indirection.__send__(method, *args)
+    rescue => detail
+      puts detail.backtrace if Puppet[:trace]
+      raise "Could not call '#{method}' on '#{indirection_name}': #{detail}"
+    end
+
+    indirection.reset_terminus_class
+    return result
+  end
+
+  action :destroy do
+    when_invoked { |*args| call_indirection_method(:destroy, *args) }
+  end
+
+  action :find do
+    when_invoked { |*args| call_indirection_method(:find, *args) }
+  end
+
+  action :save do
+    when_invoked { |*args| call_indirection_method(:save, *args) }
+  end
+
+  action :search do
+    when_invoked { |*args| call_indirection_method(:search, *args) }
+  end
+
+  # Print the configuration for the current terminus class
+  action :info do
+    when_invoked do |*args|
+      options = args.pop
+      options.has_key?(:terminus) and set_terminus(options[:terminus])
+
+      if t = indirection.terminus_class
+        puts "Run mode '#{Puppet.run_mode.name}': #{t}"
+      else
+        $stderr.puts "No default terminus class for run mode '#{Puppet.run_mode.name}'"
+      end
+
+      indirection.reset_terminus_class
+    end
+  end
+
+  attr_accessor :from
+
+  def indirection_name
+    @indirection_name || name.to_sym
+  end
+
+  # Here's your opportunity to override the indirection name.  By default it
+  # will be the same name as the face.
+  def set_indirection_name(name)
+    @indirection_name = name
+  end
+
+  # Return an indirection associated with a face, if one exists;
+  # One usually does.
+  def indirection
+    unless @indirection
+      @indirection = Puppet::Indirector::Indirection.instance(indirection_name)
+      @indirection or raise "Could not find terminus for #{indirection_name}"
+    end
+    @indirection
+  end
+
+  def set_terminus(from)
+    begin
+      indirection.terminus_class = from
+    rescue => detail
+      raise "Could not set '#{indirection.name}' terminus to '#{from}' (#{detail}); valid terminus types are #{self.class.terminus_classes(indirection.name).join(", ") }"
+    end
+  end
+end
diff --git a/lib/puppet/face/key.rb b/lib/puppet/face/key.rb
new file mode 100644
index 0000000..3a11ddb
--- /dev/null
+++ b/lib/puppet/face/key.rb
@@ -0,0 +1,4 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:key, '0.0.1') do
+end
diff --git a/lib/puppet/face/node.rb b/lib/puppet/face/node.rb
new file mode 100644
index 0000000..fd1a548
--- /dev/null
+++ b/lib/puppet/face/node.rb
@@ -0,0 +1,5 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:node, '0.0.1') do
+  set_default_format :yaml
+end
diff --git a/lib/puppet/face/report.rb b/lib/puppet/face/report.rb
new file mode 100644
index 0000000..6e6f0b3
--- /dev/null
+++ b/lib/puppet/face/report.rb
@@ -0,0 +1,15 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:report, '0.0.1') do
+  action(:submit) do
+    when_invoked do |report, options|
+      begin
+        Puppet::Transaction::Report.terminus_class = :rest
+        report.save
+      rescue => detail
+        puts detail.backtrace if Puppet[:trace]
+        Puppet.err "Could not send report: #{detail}"
+      end
+    end
+  end
+end
diff --git a/lib/puppet/face/resource.rb b/lib/puppet/face/resource.rb
new file mode 100644
index 0000000..d162f72
--- /dev/null
+++ b/lib/puppet/face/resource.rb
@@ -0,0 +1,4 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:resource, '0.0.1') do
+end
diff --git a/lib/puppet/face/resource_type.rb b/lib/puppet/face/resource_type.rb
new file mode 100644
index 0000000..0cdbd71
--- /dev/null
+++ b/lib/puppet/face/resource_type.rb
@@ -0,0 +1,4 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:resource_type, '0.0.1') do
+end
diff --git a/lib/puppet/face/status.rb b/lib/puppet/face/status.rb
new file mode 100644
index 0000000..7085e7c
--- /dev/null
+++ b/lib/puppet/face/status.rb
@@ -0,0 +1,4 @@
+require 'puppet/face/indirector'
+
+Puppet::Face::Indirector.define(:status, '0.0.1') do
+end
diff --git a/lib/puppet/faces.rb b/lib/puppet/faces.rb
deleted file mode 100644
index 947eecf..0000000
--- a/lib/puppet/faces.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# The public name of this feature is 'faces', but we have hidden all the
-# plumbing over in the 'interfaces' namespace to make clear the distinction
-# between the two.
-#
-# This file exists to ensure that the public name is usable without revealing
-# the details of the implementation; you really only need go look at anything
-# under Interfaces if you are looking to extend the implementation.
-#
-# It isn't hidden to gratuitously hide things, just to make it easier to
-# separate out the interests people will have.  --daniel 2011-04-07
-require 'puppet/interface'
-Puppet::Faces = Puppet::Interface
diff --git a/lib/puppet/faces/catalog.rb b/lib/puppet/faces/catalog.rb
deleted file mode 100644
index 3353d5d..0000000
--- a/lib/puppet/faces/catalog.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:catalog, '0.0.1') do
-  action(:apply) do
-    when_invoked do |catalog, options|
-      report = Puppet::Transaction::Report.new("apply")
-      report.configuration_version = catalog.version
-
-      Puppet::Util::Log.newdestination(report)
-
-      begin
-        benchmark(:notice, "Finished catalog run") do
-          catalog.apply(:report => report)
-        end
-      rescue => detail
-        puts detail.backtrace if Puppet[:trace]
-        Puppet.err "Failed to apply catalog: #{detail}"
-      end
-
-      report.finalize_report
-      report
-    end
-  end
-
-  action(:download) do
-    when_invoked do |certname, facts, options|
-      Puppet::Resource::Catalog.indirection.terminus_class = :rest
-      facts_to_upload = {:facts_format => :b64_zlib_yaml, :facts => CGI.escape(facts.render(:b64_zlib_yaml))}
-      catalog = nil
-      retrieval_duration = thinmark do
-        catalog = Puppet::Faces[:catalog, '0.0.1'].find(certname, facts_to_upload)
-      end
-      catalog = catalog.to_ral
-      catalog.finalize
-      catalog.retrieval_duration = retrieval_duration
-      catalog.write_class_file
-      catalog
-    end
-  end
-end
diff --git a/lib/puppet/faces/catalog/select.rb b/lib/puppet/faces/catalog/select.rb
deleted file mode 100644
index e29d199..0000000
--- a/lib/puppet/faces/catalog/select.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Select and show a list of resources of a given type.
-Puppet::Faces.define(:catalog, '0.0.1') do
-  action :select do
-    when_invoked do |host, type, options|
-      catalog = Puppet::Resource::Catalog.indirection.find(host)
-
-      catalog.resources.reject { |res| res.type != type }.each { |res| puts res }
-    end
-  end
-end
diff --git a/lib/puppet/faces/certificate.rb b/lib/puppet/faces/certificate.rb
deleted file mode 100644
index b10bee5..0000000
--- a/lib/puppet/faces/certificate.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-require 'puppet/faces/indirector'
-require 'puppet/ssl/host'
-
-Puppet::Faces::Indirector.define(:certificate, '0.0.1') do
-  # REVISIT: This should use a pre-invoke hook to run the common code that
-  # needs to happen before we invoke any action; that would be much nicer than
-  # the "please repeat yourself" stuff found in here right now.
-  #
-  # option "--ca-location LOCATION" do
-  #   type [:whatever, :location, :symbols]
-  #   hook :before do |value|
-  #     Puppet::SSL::Host.ca_location = value
-  #   end
-  # end
-  #
-  # ...but should I pass the arguments as well?
-  # --daniel 2011-04-05
-  option "--ca-location LOCATION"
-
-  action :generate do
-    when_invoked do |name, options|
-      Puppet::SSL::Host.ca_location = options[:ca_location].to_sym
-      host = Puppet::SSL::Host.new(name)
-      host.generate_certificate_request
-      host.certificate_request.class.indirection.save(host.certificate_request)
-    end
-  end
-
-  action :list do
-    when_invoked do |options|
-      Puppet::SSL::Host.ca_location = options[:ca_location].to_sym
-      Puppet::SSL::Host.indirection.search("*", {
-        :for => :certificate_request,
-      }).map { |h| h.inspect }
-    end
-  end
-
-  action :sign do
-    when_invoked do |name, options|
-      Puppet::SSL::Host.ca_location = options[:ca_location].to_sym
-      host = Puppet::SSL::Host.new(name)
-      host.desired_state = 'signed'
-      Puppet::SSL::Host.indirection.save(host)
-    end
-  end
-end
diff --git a/lib/puppet/faces/certificate_request.rb b/lib/puppet/faces/certificate_request.rb
deleted file mode 100644
index 5e91bdb..0000000
--- a/lib/puppet/faces/certificate_request.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:certificate_request, '0.0.1') do
-end
diff --git a/lib/puppet/faces/certificate_revocation_list.rb b/lib/puppet/faces/certificate_revocation_list.rb
deleted file mode 100644
index 2f2d728..0000000
--- a/lib/puppet/faces/certificate_revocation_list.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:certificate_revocation_list, '0.0.1') do
-end
diff --git a/lib/puppet/faces/config.rb b/lib/puppet/faces/config.rb
deleted file mode 100644
index 647bf50..0000000
--- a/lib/puppet/faces/config.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-require 'puppet/faces'
-
-Puppet::Faces.define(:config, '0.0.1') do
-  action(:print) do
-    when_invoked do |*args|
-      options = args.pop
-      Puppet.settings[:configprint] = args.join(",")
-      Puppet.settings.print_config_options
-      nil
-    end
-  end
-end
diff --git a/lib/puppet/faces/configurer.rb b/lib/puppet/faces/configurer.rb
deleted file mode 100644
index d409876..0000000
--- a/lib/puppet/faces/configurer.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-require 'puppet/faces'
-
-Puppet::Faces.define(:configurer, '0.0.1') do
-  action(:synchronize) do
-    when_invoked do |certname, options|
-      facts = Puppet::Faces[:facts, '0.0.1'].find(certname)
-      catalog = Puppet::Faces[:catalog, '0.0.1'].download(certname, facts)
-      report = Puppet::Faces[:catalog, '0.0.1'].apply(catalog)
-      report
-    end
-  end
-end
diff --git a/lib/puppet/faces/facts.rb b/lib/puppet/faces/facts.rb
deleted file mode 100644
index 33eacef..0000000
--- a/lib/puppet/faces/facts.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require 'puppet/faces/indirector'
-require 'puppet/node/facts'
-
-Puppet::Faces::Indirector.define(:facts, '0.0.1') do
-  set_default_format :yaml
-
-  # Upload our facts to the server
-  action(:upload) do
-    when_invoked do |options|
-      Puppet::Node::Facts.indirection.terminus_class = :facter
-      facts = Puppet::Node::Facts.indirection.find(Puppet[:certname])
-      Puppet::Node::Facts.indirection.terminus_class = :rest
-      Puppet::Node::Facts.indirection.save(facts)
-      Puppet.notice "Uploaded facts for '#{Puppet[:certname]}'"
-      nil
-    end
-  end
-end
diff --git a/lib/puppet/faces/file.rb b/lib/puppet/faces/file.rb
deleted file mode 100644
index e8ad18c..0000000
--- a/lib/puppet/faces/file.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:file, '0.0.1') do
-  set_indirection_name :file_bucket_file
-end
diff --git a/lib/puppet/faces/help.rb b/lib/puppet/faces/help.rb
deleted file mode 100644
index 1d8abe2..0000000
--- a/lib/puppet/faces/help.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-require 'puppet/faces'
-require 'puppet/util/command_line'
-require 'pathname'
-require 'erb'
-
-Puppet::Faces.define(:help, '0.0.1') do
-  summary "Displays help about puppet subcommands"
-
-  action(:help) do
-    summary "Display help about faces and their actions."
-
-    option "--version VERSION" do
-      desc "Which version of the interface to show help for"
-    end
-
-    when_invoked do |*args|
-      # Check our invocation, because we want varargs and can't do defaults
-      # yet.  REVISIT: when we do option defaults, and positional options, we
-      # should rewrite this to use those. --daniel 2011-04-04
-      options = args.pop
-      if options.nil? or args.length > 2 then
-        raise ArgumentError, "help only takes two (optional) arguments, a face name, and an action"
-      end
-
-      version = :current
-      if options.has_key? :version then
-        if options[:version].to_s !~ /^current$/i then
-          version = options[:version]
-        else
-          if args.length == 0 then
-            raise ArgumentError, "version only makes sense when a face is given"
-          end
-        end
-      end
-
-      # Name those parameters...
-      facename, actionname = args
-
-      if facename then
-        if legacy_applications.include? facename then
-          actionname and raise ArgumentError, "Legacy subcommands don't take actions"
-          return Puppet::Application[facename].help
-        else
-          face = Puppet::Faces[facename.to_sym, version]
-          actionname and action = face.get_action(actionname.to_sym)
-        end
-      end
-
-      case args.length
-      when 0 then
-        template = erb 'global.erb'
-      when 1 then
-        face or fail ArgumentError, "Unable to load face #{facename}"
-        template = erb 'face.erb'
-      when 2 then
-        face or fail ArgumentError, "Unable to load face #{facename}"
-        action or fail ArgumentError, "Unable to load action #{actionname} from #{face}"
-        template = erb 'action.erb'
-      else
-        fail ArgumentError, "Too many arguments to help action"
-      end
-
-      # Run the ERB template in our current binding, including all the local
-      # variables we established just above. --daniel 2011-04-11
-      return template.result(binding)
-    end
-  end
-
-  def erb(name)
-    template = (Pathname(__FILE__).dirname + "help" + name)
-    erb = ERB.new(template.read, nil, '%')
-    erb.filename = template.to_s
-    return erb
-  end
-
-  def legacy_applications
-    # The list of applications, less those that are duplicated as a face.
-    Puppet::Util::CommandLine.available_subcommands.reject do |appname|
-      Puppet::Faces.face? appname.to_sym, :current or
-        # ...this is a nasty way to exclude non-applications. :(
-        %w{faces_base indirection_base}.include? appname
-    end.sort
-  end
-
-  def horribly_extract_summary_from(appname)
-    begin
-      require "puppet/application/#{appname}"
-      help = Puppet::Application[appname].help.split("\n")
-      # Now we find the line with our summary, extract it, and return it.  This
-      # depends on the implementation coincidence of how our pages are
-      # formatted.  If we can't match the pattern we expect we return the empty
-      # string to ensure we don't blow up in the summary. --daniel 2011-04-11
-      while line = help.shift do
-        if md = /^puppet-#{appname}\([^\)]+\) -- (.*)$/.match(line) then
-          return md[1]
-        end
-      end
-    rescue Exception
-      # Damn, but I hate this: we just ignore errors here, no matter what
-      # class they are.  Meh.
-    end
-    return ''
-  end
-end
diff --git a/lib/puppet/faces/help/global.erb b/lib/puppet/faces/help/global.erb
deleted file mode 100644
index e123367..0000000
--- a/lib/puppet/faces/help/global.erb
+++ /dev/null
@@ -1,20 +0,0 @@
-puppet <subcommand> [options] <action> [options]
-
-Available subcommands, from Puppet Faces:
-% Puppet::Faces.faces.sort.each do |name|
-%   face = Puppet::Faces[name, :current]
-  <%= face.name.to_s.ljust(16) %>  <%= face.summary %>
-% end
-
-% unless legacy_applications.empty? then # great victory when this is true!
-Available applications, soon to be ported to Faces:
-%   legacy_applications.each do |appname|
-%     summary = horribly_extract_summary_from appname
-  <%= appname.to_s.ljust(16) %>  <%= summary %>
-%   end
-% end
-
-See 'puppet help <subcommand> <action>' for help on a specific subcommand action.
-See 'puppet help <subcommand>' for help on a specific subcommand.
-See 'puppet man  <subcommand>' for the full man page.
-Puppet v<%= Puppet::PUPPETVERSION %>
diff --git a/lib/puppet/faces/indirector.rb b/lib/puppet/faces/indirector.rb
deleted file mode 100644
index 7e4e0f0..0000000
--- a/lib/puppet/faces/indirector.rb
+++ /dev/null
@@ -1,94 +0,0 @@
-require 'puppet'
-require 'puppet/faces'
-
-class Puppet::Faces::Indirector < Puppet::Faces
-  option "--terminus TERMINUS" do
-    desc "REVISIT: You can select a terminus, which has some bigger effect
-that we should describe in this file somehow."
-  end
-
-  def self.indirections
-    Puppet::Indirector::Indirection.instances.collect { |t| t.to_s }.sort
-  end
-
-  def self.terminus_classes(indirection)
-    Puppet::Indirector::Terminus.terminus_classes(indirection.to_sym).collect { |t| t.to_s }.sort
-  end
-
-  def call_indirection_method(method, *args)
-    options = args.last
-    options.has_key?(:terminus) and set_terminus(options[:terminus])
-
-    begin
-      result = indirection.__send__(method, *args)
-    rescue => detail
-      puts detail.backtrace if Puppet[:trace]
-      raise "Could not call '#{method}' on '#{indirection_name}': #{detail}"
-    end
-
-    indirection.reset_terminus_class
-    return result
-  end
-
-  action :destroy do
-    when_invoked { |*args| call_indirection_method(:destroy, *args) }
-  end
-
-  action :find do
-    when_invoked { |*args| call_indirection_method(:find, *args) }
-  end
-
-  action :save do
-    when_invoked { |*args| call_indirection_method(:save, *args) }
-  end
-
-  action :search do
-    when_invoked { |*args| call_indirection_method(:search, *args) }
-  end
-
-  # Print the configuration for the current terminus class
-  action :info do
-    when_invoked do |*args|
-      options = args.pop
-      options.has_key?(:terminus) and set_terminus(options[:terminus])
-
-      if t = indirection.terminus_class
-        puts "Run mode '#{Puppet.run_mode.name}': #{t}"
-      else
-        $stderr.puts "No default terminus class for run mode '#{Puppet.run_mode.name}'"
-      end
-
-      indirection.reset_terminus_class
-    end
-  end
-
-  attr_accessor :from
-
-  def indirection_name
-    @indirection_name || name.to_sym
-  end
-
-  # Here's your opportunity to override the indirection name.  By default it
-  # will be the same name as the face.
-  def set_indirection_name(name)
-    @indirection_name = name
-  end
-
-  # Return an indirection associated with a face, if one exists;
-  # One usually does.
-  def indirection
-    unless @indirection
-      @indirection = Puppet::Indirector::Indirection.instance(indirection_name)
-      @indirection or raise "Could not find terminus for #{indirection_name}"
-    end
-    @indirection
-  end
-
-  def set_terminus(from)
-    begin
-      indirection.terminus_class = from
-    rescue => detail
-      raise "Could not set '#{indirection.name}' terminus to '#{from}' (#{detail}); valid terminus types are #{self.class.terminus_classes(indirection.name).join(", ") }"
-    end
-  end
-end
diff --git a/lib/puppet/faces/key.rb b/lib/puppet/faces/key.rb
deleted file mode 100644
index 7b6ad52..0000000
--- a/lib/puppet/faces/key.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:key, '0.0.1') do
-end
diff --git a/lib/puppet/faces/node.rb b/lib/puppet/faces/node.rb
deleted file mode 100644
index 7eed0df..0000000
--- a/lib/puppet/faces/node.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:node, '0.0.1') do
-  set_default_format :yaml
-end
diff --git a/lib/puppet/faces/report.rb b/lib/puppet/faces/report.rb
deleted file mode 100644
index 23a5189..0000000
--- a/lib/puppet/faces/report.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:report, '0.0.1') do
-  action(:submit) do
-    when_invoked do |report, options|
-      begin
-        Puppet::Transaction::Report.terminus_class = :rest
-        report.save
-      rescue => detail
-        puts detail.backtrace if Puppet[:trace]
-        Puppet.err "Could not send report: #{detail}"
-      end
-    end
-  end
-end
diff --git a/lib/puppet/faces/resource.rb b/lib/puppet/faces/resource.rb
deleted file mode 100644
index 60b0d94..0000000
--- a/lib/puppet/faces/resource.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:resource, '0.0.1') do
-end
diff --git a/lib/puppet/faces/resource_type.rb b/lib/puppet/faces/resource_type.rb
deleted file mode 100644
index 4321d65..0000000
--- a/lib/puppet/faces/resource_type.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:resource_type, '0.0.1') do
-end
diff --git a/lib/puppet/faces/status.rb b/lib/puppet/faces/status.rb
deleted file mode 100644
index e035f28..0000000
--- a/lib/puppet/faces/status.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'puppet/faces/indirector'
-
-Puppet::Faces::Indirector.define(:status, '0.0.1') do
-end
diff --git a/lib/puppet/interface.rb b/lib/puppet/interface.rb
index 27b3584..6570ebe 100644
--- a/lib/puppet/interface.rb
+++ b/lib/puppet/interface.rb
@@ -19,7 +19,7 @@ class Puppet::Interface
     # 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/faces")
+      @autoloader ||= Puppet::Util::Autoload.new(:application, "puppet/face")
     end
 
     def faces
@@ -90,7 +90,7 @@ class Puppet::Interface
 
   # Try to find actions defined in other files.
   def load_actions
-    path = "puppet/faces/#{name}"
+    path = "puppet/face/#{name}"
 
     loaded = []
     [path, "#{name}@#{version}/#{path}"].each do |path|
@@ -115,6 +115,6 @@ class Puppet::Interface
   end
 
   def to_s
-    "Puppet::Faces[#{name.inspect}, #{version.inspect}]"
+    "Puppet::Face[#{name.inspect}, #{version.inspect}]"
   end
 end
diff --git a/lib/puppet/interface/face_collection.rb b/lib/puppet/interface/face_collection.rb
index e4eb22f..591471d 100644
--- a/lib/puppet/interface/face_collection.rb
+++ b/lib/puppet/interface/face_collection.rb
@@ -12,7 +12,7 @@ module Puppet::Interface::FaceCollection
       $LOAD_PATH.each do |dir|
         next unless FileTest.directory?(dir)
         Dir.chdir(dir) do
-          Dir.glob("puppet/faces/*.rb").collect { |f| f.sub(/\.rb/, '') }.each do |file|
+          Dir.glob("puppet/face/*.rb").collect { |f| f.sub(/\.rb/, '') }.each do |file|
             iname = file.sub(/\.rb/, '')
             begin
               require iname
@@ -66,7 +66,7 @@ module Puppet::Interface::FaceCollection
     # We use require to avoid executing the code multiple times, like any
     # other Ruby library that we might want to use.  --daniel 2011-04-06
     begin
-      require "puppet/faces/#{name}"
+      require "puppet/face/#{name}"
 
       # If we wanted :current, we need to index to find that; direct version
       # requests just work™ as they go. --daniel 2011-04-06
@@ -100,7 +100,7 @@ module Puppet::Interface::FaceCollection
         @faces[name][:current] = @faces[name][latest_ver]
       end
     rescue LoadError => e
-      raise unless e.message =~ %r{-- puppet/faces/#{name}$}
+      raise unless e.message =~ %r{-- puppet/face/#{name}$}
       # ...guess we didn't find the file; return a much better problem.
     end
 
diff --git a/lib/puppet/util/command_line.rb b/lib/puppet/util/command_line.rb
index fa462ee..a884b86 100644
--- a/lib/puppet/util/command_line.rb
+++ b/lib/puppet/util/command_line.rb
@@ -70,8 +70,8 @@ module Puppet
           # Doing this at the top of the file is natural, but causes puppet.rb
           # to load too early, which causes things to break.  This is a nasty
           # thing, found in #7065. --daniel 2011-04-11
-          require 'puppet/faces/help'
-          puts Puppet::Faces[:help, :current].help
+          require 'puppet/face'
+          puts Puppet::Face[:help, :current].help
         end
       end
 
diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb
index 9d0e0a7..cec8a57 100644
--- a/lib/puppet/util/selinux.rb
+++ b/lib/puppet/util/selinux.rb
@@ -1,4 +1,4 @@
-# Provides utility functions to help interfaces Puppet to SELinux.
+# Provides utility functions to help interface Puppet to SELinux.
 #
 # This requires the very new SELinux Ruby bindings.  These bindings closely
 # mirror the SELinux C library interface.
diff --git a/spec/lib/puppet/face/basetest.rb b/spec/lib/puppet/face/basetest.rb
new file mode 100644
index 0000000..00616f7
--- /dev/null
+++ b/spec/lib/puppet/face/basetest.rb
@@ -0,0 +1 @@
+Puppet::Face.define(:basetest, '0.0.1')
diff --git a/spec/lib/puppet/face/huzzah.rb b/spec/lib/puppet/face/huzzah.rb
new file mode 100644
index 0000000..3428c68
--- /dev/null
+++ b/spec/lib/puppet/face/huzzah.rb
@@ -0,0 +1,5 @@
+require 'puppet/face'
+Puppet::Face.define(:huzzah, '2.0.1') do
+  summary "life is a thing for celebration"
+  action :bar do "is where beer comes from" end
+end
diff --git a/spec/lib/puppet/faces/basetest.rb b/spec/lib/puppet/faces/basetest.rb
deleted file mode 100644
index d20c52b..0000000
--- a/spec/lib/puppet/faces/basetest.rb
+++ /dev/null
@@ -1 +0,0 @@
-Puppet::Faces.define(:basetest, '0.0.1')
diff --git a/spec/lib/puppet/faces/huzzah.rb b/spec/lib/puppet/faces/huzzah.rb
deleted file mode 100644
index e867302..0000000
--- a/spec/lib/puppet/faces/huzzah.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'puppet/faces'
-Puppet::Faces.define(:huzzah, '2.0.1') do
-  summary "life is a thing for celebration"
-  action :bar do "is where beer comes from" end
-end
diff --git a/spec/unit/application/config_spec.rb b/spec/unit/application/config_spec.rb
index 0c12796..fb224ea 100755
--- a/spec/unit/application/config_spec.rb
+++ b/spec/unit/application/config_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
 require 'puppet/application/config'
 
 describe Puppet::Application::Config do
-  it "should be a subclass of Puppet::Application::FacesBase" do
-    Puppet::Application::Config.superclass.should equal(Puppet::Application::FacesBase)
+  it "should be a subclass of Puppet::Application::FaceBase" do
+    Puppet::Application::Config.superclass.should equal(Puppet::Application::FaceBase)
   end
 end
diff --git a/spec/unit/application/face_base_spec.rb b/spec/unit/application/face_base_spec.rb
new file mode 100755
index 0000000..d09e00a
--- /dev/null
+++ b/spec/unit/application/face_base_spec.rb
@@ -0,0 +1,188 @@
+#!/usr/bin/env rspec
+
+require 'spec_helper'
+require 'puppet/application/face_base'
+require 'tmpdir'
+
+class Puppet::Application::FaceBase::Basetest < Puppet::Application::FaceBase
+end
+
+describe Puppet::Application::FaceBase do
+  before :all do
+    Puppet::Face.define(:basetest, '0.0.1') do
+      option("--[no-]boolean")
+      option("--mandatory MANDATORY")
+      option("--optional [OPTIONAL]")
+
+      action :foo do
+        option("--action")
+        when_invoked { |*args| args.length }
+      end
+    end
+  end
+
+  let :app do
+    app = Puppet::Application::FaceBase::Basetest.new
+    app.command_line.stubs(:subcommand_name).returns('subcommand')
+    Puppet::Util::Log.stubs(:newdestination)
+    app
+  end
+
+  describe "#find_global_settings_argument" do
+    it "should not match --ca to --ca-location" do
+      option = mock('ca option', :optparse_args => ["--ca"])
+      Puppet.settings.expects(:each).yields(:ca, option)
+
+      app.find_global_settings_argument("--ca-location").should be_nil
+    end
+  end
+
+  describe "#parse_options" do
+    before :each do
+      app.command_line.stubs(:args).returns %w{}
+    end
+
+    describe "parsing the command line" do
+      context "with just an action" do
+        before :all do
+          # We have to stub Signal.trap to avoid a crazy mess where we take
+          # over signal handling and make it impossible to cancel the test
+          # suite run.
+          #
+          # It would be nice to fix this elsewhere, but it is actually hard to
+          # capture this in rspec 2.5 and all. :(  --daniel 2011-04-08
+          Signal.stubs(:trap)
+          app.command_line.stubs(:args).returns %w{foo}
+          app.preinit
+          app.parse_options
+        end
+
+        it "should set the face based on the type" do
+          app.face.name.should == :basetest
+        end
+
+        it "should set the format based on the face default" do
+          app.format.should == :pson
+        end
+
+        it "should find the action" do
+          app.action.should be
+          app.action.name.should == :foo
+        end
+      end
+
+      it "should fail if no action is given" do
+        expect { app.preinit; app.parse_options }.
+          to raise_error OptionParser::MissingArgument, /No action given/
+      end
+
+      it "should report a sensible error when options with = fail" do
+        app.command_line.stubs(:args).returns %w{--action=bar foo}
+        expect { app.preinit; app.parse_options }.
+          to raise_error OptionParser::InvalidOption, /invalid option: --action/
+      end
+
+      it "should fail if an action option is before the action" do
+        app.command_line.stubs(:args).returns %w{--action foo}
+        expect { app.preinit; app.parse_options }.
+          to raise_error OptionParser::InvalidOption, /invalid option: --action/
+      end
+
+      it "should fail if an unknown option is before the action" do
+        app.command_line.stubs(:args).returns %w{--bar foo}
+        expect { app.preinit; app.parse_options }.
+          to raise_error OptionParser::InvalidOption, /invalid option: --bar/
+      end
+
+      it "should fail if an unknown option is after the action" do
+        app.command_line.stubs(:args).returns %w{foo --bar}
+        expect { app.preinit; app.parse_options }.
+          to raise_error OptionParser::InvalidOption, /invalid option: --bar/
+      end
+
+      it "should accept --bar as an argument to a mandatory option after action" do
+        app.command_line.stubs(:args).returns %w{foo --mandatory --bar}
+        app.preinit
+        app.parse_options
+        app.action.name.should == :foo
+        app.options.should == { :mandatory => "--bar" }
+      end
+
+      it "should accept --bar as an argument to a mandatory option before action" do
+        app.command_line.stubs(:args).returns %w{--mandatory --bar foo}
+        app.preinit
+        app.parse_options
+        app.action.name.should == :foo
+        app.options.should == { :mandatory => "--bar" }
+      end
+
+      it "should not skip when --foo=bar is given" do
+        app.command_line.stubs(:args).returns %w{--mandatory=bar --bar foo}
+        expect { app.preinit; app.parse_options }.
+          to raise_error OptionParser::InvalidOption, /invalid option: --bar/
+      end
+
+      { "boolean options before" => %w{--trace foo},
+        "boolean options after"  => %w{foo --trace}
+      }.each do |name, args|
+        it "should accept global boolean settings #{name} the action" do
+          app.command_line.stubs(:args).returns args
+          app.preinit
+          app.parse_options
+          Puppet[:trace].should be_true
+        end
+      end
+
+      { "before" => %w{--syslogfacility user1 foo},
+        " after" => %w{foo --syslogfacility user1}
+      }.each do |name, args|
+        it "should accept global settings with arguments #{name} the action" do
+          app.command_line.stubs(:args).returns args
+          app.preinit
+          app.parse_options
+          Puppet[:syslogfacility].should == "user1"
+        end
+      end
+    end
+  end
+
+  describe "#setup" do
+    it "should remove the action name from the arguments" do
+      app.command_line.stubs(:args).returns %w{--mandatory --bar foo}
+      app.preinit
+      app.parse_options
+      app.setup
+      app.arguments.should == [{ :mandatory => "--bar" }]
+    end
+
+    it "should pass positional arguments" do
+      app.command_line.stubs(:args).returns %w{--mandatory --bar foo bar baz quux}
+      app.preinit
+      app.parse_options
+      app.setup
+      app.arguments.should == ['bar', 'baz', 'quux', { :mandatory => "--bar" }]
+    end
+  end
+
+  describe "#main" do
+    before :each do
+      app.expects(:exit).with(0)
+
+      app.face      = Puppet::Face[:basetest, '0.0.1']
+      app.action    = app.face.get_action(:foo)
+      app.format    = :pson
+      app.arguments = ["myname", "myarg"]
+    end
+
+    it "should send the specified verb and name to the face" do
+      app.face.expects(:foo).with(*app.arguments)
+      app.main
+    end
+
+    it "should use its render method to render any result" do
+      app.expects(:render).with(app.arguments.length + 1)
+      app.stubs(:puts)          # meh.  Don't print nil, thanks. --daniel 2011-04-12
+      app.main
+    end
+  end
+end
diff --git a/spec/unit/application/faces_base_spec.rb b/spec/unit/application/faces_base_spec.rb
deleted file mode 100755
index 18bd302..0000000
--- a/spec/unit/application/faces_base_spec.rb
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/env rspec
-
-require 'spec_helper'
-require 'puppet/application/faces_base'
-require 'tmpdir'
-
-class Puppet::Application::FacesBase::Basetest < Puppet::Application::FacesBase
-end
-
-describe Puppet::Application::FacesBase do
-  before :all do
-    Puppet::Faces.define(:basetest, '0.0.1') do
-      option("--[no-]boolean")
-      option("--mandatory MANDATORY")
-      option("--optional [OPTIONAL]")
-
-      action :foo do
-        option("--action")
-        when_invoked { |*args| args.length }
-      end
-    end
-  end
-
-  let :app do
-    app = Puppet::Application::FacesBase::Basetest.new
-    app.command_line.stubs(:subcommand_name).returns('subcommand')
-    Puppet::Util::Log.stubs(:newdestination)
-    app
-  end
-
-  describe "#find_global_settings_argument" do
-    it "should not match --ca to --ca-location" do
-      option = mock('ca option', :optparse_args => ["--ca"])
-      Puppet.settings.expects(:each).yields(:ca, option)
-
-      app.find_global_settings_argument("--ca-location").should be_nil
-    end
-  end
-
-  describe "#parse_options" do
-    before :each do
-      app.command_line.stubs(:args).returns %w{}
-    end
-
-    describe "parsing the command line" do
-      context "with just an action" do
-        before :all do
-          # We have to stub Signal.trap to avoid a crazy mess where we take
-          # over signal handling and make it impossible to cancel the test
-          # suite run.
-          #
-          # It would be nice to fix this elsewhere, but it is actually hard to
-          # capture this in rspec 2.5 and all. :(  --daniel 2011-04-08
-          Signal.stubs(:trap)
-          app.command_line.stubs(:args).returns %w{foo}
-          app.preinit
-          app.parse_options
-        end
-
-        it "should set the faces based on the type" do
-          app.face.name.should == :basetest
-        end
-
-        it "should set the format based on the faces default" do
-          app.format.should == :pson
-        end
-
-        it "should find the action" do
-          app.action.should be
-          app.action.name.should == :foo
-        end
-      end
-
-      it "should fail if no action is given" do
-        expect { app.preinit; app.parse_options }.
-          to raise_error OptionParser::MissingArgument, /No action given/
-      end
-
-      it "should report a sensible error when options with = fail" do
-        app.command_line.stubs(:args).returns %w{--action=bar foo}
-        expect { app.preinit; app.parse_options }.
-          to raise_error OptionParser::InvalidOption, /invalid option: --action/
-      end
-
-      it "should fail if an action option is before the action" do
-        app.command_line.stubs(:args).returns %w{--action foo}
-        expect { app.preinit; app.parse_options }.
-          to raise_error OptionParser::InvalidOption, /invalid option: --action/
-      end
-
-      it "should fail if an unknown option is before the action" do
-        app.command_line.stubs(:args).returns %w{--bar foo}
-        expect { app.preinit; app.parse_options }.
-          to raise_error OptionParser::InvalidOption, /invalid option: --bar/
-      end
-
-      it "should fail if an unknown option is after the action" do
-        app.command_line.stubs(:args).returns %w{foo --bar}
-        expect { app.preinit; app.parse_options }.
-          to raise_error OptionParser::InvalidOption, /invalid option: --bar/
-      end
-
-      it "should accept --bar as an argument to a mandatory option after action" do
-        app.command_line.stubs(:args).returns %w{foo --mandatory --bar}
-        app.preinit
-        app.parse_options
-        app.action.name.should == :foo
-        app.options.should == { :mandatory => "--bar" }
-      end
-
-      it "should accept --bar as an argument to a mandatory option before action" do
-        app.command_line.stubs(:args).returns %w{--mandatory --bar foo}
-        app.preinit
-        app.parse_options
-        app.action.name.should == :foo
-        app.options.should == { :mandatory => "--bar" }
-      end
-
-      it "should not skip when --foo=bar is given" do
-        app.command_line.stubs(:args).returns %w{--mandatory=bar --bar foo}
-        expect { app.preinit; app.parse_options }.
-          to raise_error OptionParser::InvalidOption, /invalid option: --bar/
-      end
-
-      { "boolean options before" => %w{--trace foo},
-        "boolean options after"  => %w{foo --trace}
-      }.each do |name, args|
-        it "should accept global boolean settings #{name} the action" do
-          app.command_line.stubs(:args).returns args
-          app.preinit
-          app.parse_options
-          Puppet[:trace].should be_true
-        end
-      end
-
-      { "before" => %w{--syslogfacility user1 foo},
-        " after" => %w{foo --syslogfacility user1}
-      }.each do |name, args|
-        it "should accept global settings with arguments #{name} the action" do
-          app.command_line.stubs(:args).returns args
-          app.preinit
-          app.parse_options
-          Puppet[:syslogfacility].should == "user1"
-        end
-      end
-    end
-  end
-
-  describe "#setup" do
-    it "should remove the action name from the arguments" do
-      app.command_line.stubs(:args).returns %w{--mandatory --bar foo}
-      app.preinit
-      app.parse_options
-      app.setup
-      app.arguments.should == [{ :mandatory => "--bar" }]
-    end
-
-    it "should pass positional arguments" do
-      app.command_line.stubs(:args).returns %w{--mandatory --bar foo bar baz quux}
-      app.preinit
-      app.parse_options
-      app.setup
-      app.arguments.should == ['bar', 'baz', 'quux', { :mandatory => "--bar" }]
-    end
-  end
-
-  describe "#main" do
-    before :each do
-      app.expects(:exit).with(0)
-
-      app.face      = Puppet::Faces[:basetest, '0.0.1']
-      app.action    = app.face.get_action(:foo)
-      app.format    = :pson
-      app.arguments = ["myname", "myarg"]
-    end
-
-    it "should send the specified verb and name to the faces" do
-      app.face.expects(:foo).with(*app.arguments)
-      app.main
-    end
-
-    it "should use its render method to render any result" do
-      app.expects(:render).with(app.arguments.length + 1)
-      app.stubs(:puts)          # meh.  Don't print nil, thanks. --daniel 2011-04-12
-      app.main
-    end
-  end
-end
diff --git a/spec/unit/application/faces_spec.rb b/spec/unit/application/faces_spec.rb
index c4d15a2..9b6f073 100755
--- a/spec/unit/application/faces_spec.rb
+++ b/spec/unit/application/faces_spec.rb
@@ -9,8 +9,7 @@ describe Puppet::Application::Faces do
   end
 
   it "should always call 'list'" do
-    faces = Puppet::Application::Faces.new
-    faces.expects(:list)
-    faces.main
+    subject.expects(:list)
+    subject.main
   end
 end
diff --git a/spec/unit/application/indirection_base_spec.rb b/spec/unit/application/indirection_base_spec.rb
index 98eb3a1..9aac368 100755
--- a/spec/unit/application/indirection_base_spec.rb
+++ b/spec/unit/application/indirection_base_spec.rb
@@ -2,19 +2,19 @@
 
 require 'spec_helper'
 require 'puppet/application/indirection_base'
-require 'puppet/faces/indirector'
+require 'puppet/face/indirector'
 
 ########################################################################
 # Stub for testing; the names are critical, sadly. --daniel 2011-03-30
 class Puppet::Application::TestIndirection < Puppet::Application::IndirectionBase
 end
 
-face = Puppet::Faces::Indirector.define(:testindirection, '0.0.1') do
+face = Puppet::Face::Indirector.define(:testindirection, '0.0.1') do
 end
 # REVISIT: This horror is required because we don't allow anything to be
 # :current except for if it lives on, and is loaded from, disk. --daniel 2011-03-29
 face.instance_variable_set('@version', :current)
-Puppet::Faces.register(face)
+Puppet::Face.register(face)
 ########################################################################
 
 
diff --git a/spec/unit/face/catalog_spec.rb b/spec/unit/face/catalog_spec.rb
new file mode 100755
index 0000000..28c2aa9
--- /dev/null
+++ b/spec/unit/face/catalog_spec.rb
@@ -0,0 +1,4 @@
+require 'puppet/face'
+describe Puppet::Face[:catalog, '0.0.1'] do
+  it "should actually have some testing..."
+end
diff --git a/spec/unit/face/certificate_request_spec.rb b/spec/unit/face/certificate_request_spec.rb
new file mode 100755
index 0000000..a83a92d
--- /dev/null
+++ b/spec/unit/face/certificate_request_spec.rb
@@ -0,0 +1,3 @@
+describe Puppet::Face[:certificate_request, '0.0.1'] do
+  it "should actually have some tests..."
+end
diff --git a/spec/unit/face/certificate_revocation_list_spec.rb b/spec/unit/face/certificate_revocation_list_spec.rb
new file mode 100755
index 0000000..22c0fa2
--- /dev/null
+++ b/spec/unit/face/certificate_revocation_list_spec.rb
@@ -0,0 +1,3 @@
+describe Puppet::Face[:certificate_revocation_list, '0.0.1'] do
+  it "should actually have some tests..."
+end
diff --git a/spec/unit/face/certificate_spec.rb b/spec/unit/face/certificate_spec.rb
new file mode 100755
index 0000000..dbcc888
--- /dev/null
+++ b/spec/unit/face/certificate_spec.rb
@@ -0,0 +1,14 @@
+require 'puppet/ssl/host'
+
+describe Puppet::Face[:certificate, '0.0.1'] do
+  it "should have a ca-location option" do
+    subject.should be_option :ca_location
+  end
+
+  it "should set the ca location when invoked" do
+    pending "#6983: This is broken in the actual face..."
+    Puppet::SSL::Host.expects(:ca_location=).with(:foo)
+    Puppet::SSL::Host.indirection.expects(:save)
+    subject.sign :ca_location => :foo
+  end
+end
diff --git a/spec/unit/face/config_spec.rb b/spec/unit/face/config_spec.rb
new file mode 100755
index 0000000..3657b9a
--- /dev/null
+++ b/spec/unit/face/config_spec.rb
@@ -0,0 +1,24 @@
+#!/usr/bin/env ruby
+
+require 'spec_helper'
+
+describe Puppet::Face[: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)
+    subject.print
+  end
+
+  it "should set 'configprint' to all desired values and call print_config_options when a specific value is provided" do
+    Puppet.settings.stubs(:puts)
+    Puppet.settings.expects(:print_config_options)
+    subject.print("libdir", "ssldir")
+    Puppet.settings[:configprint].should == "libdir,ssldir"
+  end
+
+  it "should always return nil" do
+    Puppet.settings.stubs(:puts)
+    Puppet.settings.expects(:print_config_options)
+    subject.print("libdir").should be_nil
+  end
+end
diff --git a/spec/unit/face/configurer_spec.rb b/spec/unit/face/configurer_spec.rb
new file mode 100755
index 0000000..a404c92
--- /dev/null
+++ b/spec/unit/face/configurer_spec.rb
@@ -0,0 +1,26 @@
+#!/usr/bin/env ruby
+
+require 'spec_helper'
+require 'puppet/indirector/catalog/rest'
+require 'tempfile'
+
+describe Puppet::Face[:configurer, '0.0.1'] do
+  describe "#synchronize" do
+    it "should retrieve and apply a catalog and return a report" do
+      pending "REVISIT: 2.7 changes broke this, and we want the merge published"
+
+      dirname = Dir.mktmpdir("puppetdir")
+      Puppet[:vardir] = dirname
+      Puppet[:confdir] = dirname
+      @catalog = Puppet::Resource::Catalog.new
+      @file = Puppet::Resource.new(:file, File.join(dirname, "tmp_dir_resource"), :parameters => {:ensure => :present})
+      @catalog.add_resource(@file)
+      Puppet::Resource::Catalog::Rest.any_instance.stubs(:find).returns(@catalog)
+
+      report = subject.synchronize("foo")
+
+      report.kind.should   == "apply"
+      report.status.should == "changed"
+    end
+  end
+end
diff --git a/spec/unit/face/facts_spec.rb b/spec/unit/face/facts_spec.rb
new file mode 100755
index 0000000..f574ac7
--- /dev/null
+++ b/spec/unit/face/facts_spec.rb
@@ -0,0 +1,21 @@
+#!/usr/bin/env ruby
+
+require 'spec_helper'
+
+describe Puppet::Face[:facts, '0.0.1'] do
+  it "should define an 'upload' fact" do
+    subject.should be_action(:upload)
+  end
+
+  it "should set its default format to :yaml" do
+    subject.default_format.should == :yaml
+  end
+
+  describe "when uploading" do
+    it "should set the terminus_class to :facter"
+
+    it "should set the cach_eclass to :rest"
+
+    it "should find the current certname"
+  end
+end
diff --git a/spec/unit/face/file_spec.rb b/spec/unit/face/file_spec.rb
new file mode 100755
index 0000000..97e8bcc
--- /dev/null
+++ b/spec/unit/face/file_spec.rb
@@ -0,0 +1,3 @@
+describe Puppet::Face[:file, '0.0.1'] do
+  it "should actually have some tests..."
+end
diff --git a/spec/unit/face/help_spec.rb b/spec/unit/face/help_spec.rb
new file mode 100644
index 0000000..e67f29e
--- /dev/null
+++ b/spec/unit/face/help_spec.rb
@@ -0,0 +1,112 @@
+require 'spec_helper'
+require 'puppet/face/help'
+
+describe Puppet::Face[:help, '0.0.1'] do
+  it "should have a help action" do
+    subject.should be_action :help
+  end
+
+  it "should have a default action of help" do
+    pending "REVISIT: we don't support default actions yet"
+  end
+
+  it "should accept a call with no arguments" do
+    expect { subject.help() }.should_not raise_error
+  end
+
+  it "should accept a face name" do
+    expect { subject.help(:help) }.should_not raise_error
+  end
+
+  it "should accept a face and action name" do
+    expect { subject.help(:help, :help) }.should_not raise_error
+  end
+
+  it "should fail if more than a face and action are given" do
+    expect { subject.help(:help, :help, :for_the_love_of_god) }.
+      should raise_error ArgumentError
+  end
+
+  it "should treat :current and 'current' identically" do
+    subject.help(:help, :version => :current).should ==
+      subject.help(:help, :version => 'current')
+  end
+
+  it "should complain when the request version of a face is missing" do
+    expect { subject.help(:huzzah, :bar, :version => '17.0.0') }.
+      should raise_error Puppet::Error
+  end
+
+  it "should find a face by version" do
+    face = Puppet::Face[:huzzah, :current]
+    subject.help(:huzzah, :version => face.version).
+      should == subject.help(:huzzah, :version => :current)
+  end
+
+  context "when listing subcommands" do
+    subject { Puppet::Face[:help, :current].help }
+
+    # Check a precondition for the next block; if this fails you have
+    # something odd in your set of face, and we skip testing things that
+    # matter. --daniel 2011-04-10
+    it "should have at least one face with a summary" do
+      Puppet::Face.faces.should be_any do |name|
+        Puppet::Face[name, :current].summary
+      end
+    end
+
+    Puppet::Face.faces.each do |name|
+      face = Puppet::Face[name, :current]
+      summary = face.summary
+
+      it { should =~ %r{ #{name} } }
+      it { should =~ %r{ #{name} +#{summary}} } if summary
+    end
+
+    Puppet::Face[:help, :current].legacy_applications.each do |appname|
+      it { should =~ %r{ #{appname} } }
+
+      summary = Puppet::Face[:help, :current].horribly_extract_summary_from(appname)
+      summary and it { should =~ %r{ #{summary}\b} }
+    end
+  end
+
+  context "#legacy_applications" do
+    subject { Puppet::Face[:help, :current].legacy_applications }
+
+    # If we don't, these tests are ... less than useful, because they assume
+    # it.  When this breaks you should consider ditching the entire feature
+    # and tests, but if not work out how to fake one. --daniel 2011-04-11
+    it { should have_at_least(1).item }
+
+    # Meh.  This is nasty, but we can't control the other list; the specific
+    # bug that caused these to be listed is annoyingly subtle and has a nasty
+    # fix, so better to have a "fail if you do something daft" trigger in
+    # place here, I think. --daniel 2011-04-11
+    %w{face_base indirection_base}.each do |name|
+      it { should_not include name }
+    end
+  end
+
+  context "help for legacy applications" do
+    subject { Puppet::Face[:help, :current] }
+    let :appname do subject.legacy_applications.first end
+
+    # This test is purposely generic, so that as we eliminate legacy commands
+    # we don't get into a loop where we either test a face-based replacement
+    # and fail to notice breakage, or where we have to constantly rewrite this
+    # test and all. --daniel 2011-04-11
+    it "should return the legacy help when given the subcommand" do
+      help = subject.help(appname)
+      help.should =~ /puppet-#{appname}/
+      %w{SYNOPSIS USAGE DESCRIPTION OPTIONS COPYRIGHT}.each do |heading|
+        help.should =~ /^#{heading}$/
+      end
+    end
+
+    it "should fail when asked for an action on a legacy command" do
+      expect { subject.help(appname, :whatever) }.
+        to raise_error ArgumentError, /Legacy subcommands don't take actions/
+    end
+  end
+end
diff --git a/spec/unit/face/indirector_spec.rb b/spec/unit/face/indirector_spec.rb
new file mode 100755
index 0000000..269e055
--- /dev/null
+++ b/spec/unit/face/indirector_spec.rb
@@ -0,0 +1,60 @@
+#!/usr/bin/env ruby
+
+require 'spec_helper'
+require 'puppet/face/indirector'
+
+describe Puppet::Face::Indirector do
+  subject do
+    instance = Puppet::Face::Indirector.new(:test, '0.0.1')
+    indirection = stub('indirection',
+                       :name => :stub_indirection,
+                       :reset_terminus_class => nil)
+    instance.stubs(:indirection).returns indirection
+    instance
+  end
+
+  it "should be able to return a list of indirections" do
+    Puppet::Face::Indirector.indirections.should be_include("catalog")
+  end
+
+  it "should be able to return a list of terminuses for a given indirection" do
+    Puppet::Face::Indirector.terminus_classes(:catalog).should be_include("compiler")
+  end
+
+  describe "as an instance" do
+    it "should be able to determine its indirection" do
+      # Loading actions here an get, um, complicated
+      Puppet::Face.stubs(:load_actions)
+      Puppet::Face::Indirector.new(:catalog, '0.0.1').indirection.should equal(Puppet::Resource::Catalog.indirection)
+    end
+  end
+
+  [:find, :search, :save, :destroy].each do |method|
+    it "should define a '#{method}' action" do
+      Puppet::Face::Indirector.should be_action(method)
+    end
+
+    it "should call the indirection method with options when the '#{method}' action is invoked" do
+      subject.indirection.expects(method).with(:test, "myargs", {})
+      subject.send(method, :test, "myargs")
+    end
+    it "should forward passed options" do
+      subject.indirection.expects(method).with(:test, "action", {'one'=>'1'})
+      subject.send(method, :test, 'action', {'one'=>'1'})
+    end
+  end
+
+  it "should be able to override its indirection name" do
+    subject.set_indirection_name :foo
+    subject.indirection_name.should == :foo
+  end
+
+  it "should be able to set its terminus class" do
+    subject.indirection.expects(:terminus_class=).with(:myterm)
+    subject.set_terminus(:myterm)
+  end
+
+  it "should define a class-level 'info' action" do
+    Puppet::Face::Indirector.should be_action(:info)
+  end
+end
diff --git a/spec/unit/face/key_spec.rb b/spec/unit/face/key_spec.rb
new file mode 100755
index 0000000..10d6647
--- /dev/null
+++ b/spec/unit/face/key_spec.rb
@@ -0,0 +1,3 @@
+describe Puppet::Face[:key, '0.0.1'] do
+  it "should actually have some tests..."
+end
diff --git a/spec/unit/face/node_spec.rb b/spec/unit/face/node_spec.rb
new file mode 100755
index 0000000..d27f41b
--- /dev/null
+++ b/spec/unit/face/node_spec.rb
@@ -0,0 +1,9 @@
+#!/usr/bin/env ruby
+
+require 'spec_helper'
+
+describe Puppet::Face[:node, '0.0.1'] do
+  it "should set its default format to :yaml" do
+    subject.default_format.should == :yaml
+  end
+end
diff --git a/spec/unit/face/report_spec.rb b/spec/unit/face/report_spec.rb
new file mode 100755
index 0000000..b1b2816
--- /dev/null
+++ b/spec/unit/face/report_spec.rb
@@ -0,0 +1,3 @@
+describe Puppet::Face[:report, '0.0.1'] do
+  it "should actually have some tests..."
+end
diff --git a/spec/unit/face/resource_spec.rb b/spec/unit/face/resource_spec.rb
new file mode 100755
index 0000000..084e2a6
--- /dev/null
+++ b/spec/unit/face/resource_spec.rb
@@ -0,0 +1,3 @@
+describe Puppet::Face[:resource, '0.0.1'] do
+  it "should actually have some tests..."
+end
diff --git a/spec/unit/face/resource_type_spec.rb b/spec/unit/face/resource_type_spec.rb
new file mode 100755
index 0000000..2adaedc
--- /dev/null
+++ b/spec/unit/face/resource_type_spec.rb
@@ -0,0 +1,3 @@
+describe Puppet::Face[:resource_type, '0.0.1'] do
+  it "should actually have some tests..."
+end
diff --git a/spec/unit/faces_spec.rb b/spec/unit/face_spec.rb
similarity index 100%
rename from spec/unit/faces_spec.rb
rename to spec/unit/face_spec.rb
diff --git a/spec/unit/faces/catalog_spec.rb b/spec/unit/faces/catalog_spec.rb
deleted file mode 100755
index e0a771d..0000000
--- a/spec/unit/faces/catalog_spec.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'puppet/faces'
-describe Puppet::Faces[:catalog, '0.0.1'] do
-  it "should actually have some testing..."
-end
diff --git a/spec/unit/faces/certificate_request_spec.rb b/spec/unit/faces/certificate_request_spec.rb
deleted file mode 100755
index 1a71a83..0000000
--- a/spec/unit/faces/certificate_request_spec.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-describe Puppet::Faces[:certificate_request, '0.0.1'] do
-  it "should actually have some tests..."
-end
diff --git a/spec/unit/faces/certificate_revocation_list_spec.rb b/spec/unit/faces/certificate_revocation_list_spec.rb
deleted file mode 100755
index 4f41ede..0000000
--- a/spec/unit/faces/certificate_revocation_list_spec.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-describe Puppet::Faces[:certificate_revocation_list, '0.0.1'] do
-  it "should actually have some tests..."
-end
diff --git a/spec/unit/faces/certificate_spec.rb b/spec/unit/faces/certificate_spec.rb
deleted file mode 100755
index ba264f9..0000000
--- a/spec/unit/faces/certificate_spec.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-require 'puppet/ssl/host'
-
-describe Puppet::Faces[:certificate, '0.0.1'] do
-  it "should have a ca-location option" do
-    subject.should be_option :ca_location
-  end
-
-  it "should set the ca location when invoked" do
-    pending "#6983: This is broken in the actual faces..."
-    Puppet::SSL::Host.expects(:ca_location=).with(:foo)
-    Puppet::SSL::Host.indirection.expects(:save)
-    subject.sign :ca_location => :foo
-  end
-end
diff --git a/spec/unit/faces/config_spec.rb b/spec/unit/faces/config_spec.rb
deleted file mode 100755
index b71995e..0000000
--- a/spec/unit/faces/config_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'spec_helper'
-
-describe Puppet::Faces[: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)
-    subject.print
-  end
-
-  it "should set 'configprint' to all desired values and call print_config_options when a specific value is provided" do
-    Puppet.settings.stubs(:puts)
-    Puppet.settings.expects(:print_config_options)
-    subject.print("libdir", "ssldir")
-    Puppet.settings[:configprint].should == "libdir,ssldir"
-  end
-
-  it "should always return nil" do
-    Puppet.settings.stubs(:puts)
-    Puppet.settings.expects(:print_config_options)
-    subject.print("libdir").should be_nil
-  end
-end
diff --git a/spec/unit/faces/configurer_spec.rb b/spec/unit/faces/configurer_spec.rb
deleted file mode 100755
index 6982c00..0000000
--- a/spec/unit/faces/configurer_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'spec_helper'
-require 'puppet/indirector/catalog/rest'
-require 'tempfile'
-
-describe Puppet::Faces[:configurer, '0.0.1'] do
-  describe "#synchronize" do
-    it "should retrieve and apply a catalog and return a report" do
-      pending "REVISIT: 2.7 changes broke this, and we want the merge published"
-
-      dirname = Dir.mktmpdir("puppetdir")
-      Puppet[:vardir] = dirname
-      Puppet[:confdir] = dirname
-      @catalog = Puppet::Resource::Catalog.new
-      @file = Puppet::Resource.new(:file, File.join(dirname, "tmp_dir_resource"), :parameters => {:ensure => :present})
-      @catalog.add_resource(@file)
-      Puppet::Resource::Catalog::Rest.any_instance.stubs(:find).returns(@catalog)
-
-      report = subject.synchronize("foo")
-
-      report.kind.should   == "apply"
-      report.status.should == "changed"
-    end
-  end
-end
diff --git a/spec/unit/faces/facts_spec.rb b/spec/unit/faces/facts_spec.rb
deleted file mode 100755
index 46496a8..0000000
--- a/spec/unit/faces/facts_spec.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'spec_helper'
-
-describe Puppet::Faces[:facts, '0.0.1'] do
-  it "should define an 'upload' fact" do
-    subject.should be_action(:upload)
-  end
-
-  it "should set its default format to :yaml" do
-    subject.default_format.should == :yaml
-  end
-
-  describe "when uploading" do
-    it "should set the terminus_class to :facter"
-
-    it "should set the cach_eclass to :rest"
-
-    it "should find the current certname"
-  end
-end
diff --git a/spec/unit/faces/file_spec.rb b/spec/unit/faces/file_spec.rb
deleted file mode 100755
index fcb52c6..0000000
--- a/spec/unit/faces/file_spec.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-describe Puppet::Faces[:file, '0.0.1'] do
-  it "should actually have some tests..."
-end
diff --git a/spec/unit/faces/help_spec.rb b/spec/unit/faces/help_spec.rb
deleted file mode 100644
index cd74a5b..0000000
--- a/spec/unit/faces/help_spec.rb
+++ /dev/null
@@ -1,112 +0,0 @@
-require 'spec_helper'
-require 'puppet/faces/help'
-
-describe Puppet::Faces[:help, '0.0.1'] do
-  it "should have a help action" do
-    subject.should be_action :help
-  end
-
-  it "should have a default action of help" do
-    pending "REVISIT: we don't support default actions yet"
-  end
-
-  it "should accept a call with no arguments" do
-    expect { subject.help() }.should_not raise_error
-  end
-
-  it "should accept a face name" do
-    expect { subject.help(:help) }.should_not raise_error
-  end
-
-  it "should accept a face and action name" do
-    expect { subject.help(:help, :help) }.should_not raise_error
-  end
-
-  it "should fail if more than a face and action are given" do
-    expect { subject.help(:help, :help, :for_the_love_of_god) }.
-      should raise_error ArgumentError
-  end
-
-  it "should treat :current and 'current' identically" do
-    subject.help(:help, :version => :current).should ==
-      subject.help(:help, :version => 'current')
-  end
-
-  it "should complain when the request version of a face is missing" do
-    expect { subject.help(:huzzah, :bar, :version => '17.0.0') }.
-      should raise_error Puppet::Error
-  end
-
-  it "should find a face by version" do
-    face = Puppet::Faces[:huzzah, :current]
-    subject.help(:huzzah, :version => face.version).
-      should == subject.help(:huzzah, :version => :current)
-  end
-
-  context "when listing subcommands" do
-    subject { Puppet::Faces[:help, :current].help }
-
-    # Check a precondition for the next block; if this fails you have
-    # something odd in your set of faces, and we skip testing things that
-    # matter. --daniel 2011-04-10
-    it "should have at least one face with a summary" do
-      Puppet::Faces.faces.should be_any do |name|
-        Puppet::Faces[name, :current].summary
-      end
-    end
-
-    Puppet::Faces.faces.each do |name|
-      face = Puppet::Faces[name, :current]
-      summary = face.summary
-
-      it { should =~ %r{ #{name} } }
-      it { should =~ %r{ #{name} +#{summary}} } if summary
-    end
-
-    Puppet::Faces[:help, :current].legacy_applications.each do |appname|
-      it { should =~ %r{ #{appname} } }
-
-      summary = Puppet::Faces[:help, :current].horribly_extract_summary_from(appname)
-      summary and it { should =~ %r{ #{summary}\b} }
-    end
-  end
-
-  context "#legacy_applications" do
-    subject { Puppet::Faces[:help, :current].legacy_applications }
-
-    # If we don't, these tests are ... less than useful, because they assume
-    # it.  When this breaks you should consider ditching the entire feature
-    # and tests, but if not work out how to fake one. --daniel 2011-04-11
-    it { should have_at_least(1).item }
-
-    # Meh.  This is nasty, but we can't control the other list; the specific
-    # bug that caused these to be listed is annoyingly subtle and has a nasty
-    # fix, so better to have a "fail if you do something daft" trigger in
-    # place here, I think. --daniel 2011-04-11
-    %w{faces_base indirection_base}.each do |name|
-      it { should_not include name }
-    end
-  end
-
-  context "help for legacy applications" do
-    subject { Puppet::Faces[:help, :current] }
-    let :appname do subject.legacy_applications.first end
-
-    # This test is purposely generic, so that as we eliminate legacy commands
-    # we don't get into a loop where we either test a face-based replacement
-    # and fail to notice breakage, or where we have to constantly rewrite this
-    # test and all. --daniel 2011-04-11
-    it "should return the legacy help when given the subcommand" do
-      help = subject.help(appname)
-      help.should =~ /puppet-#{appname}/
-      %w{SYNOPSIS USAGE DESCRIPTION OPTIONS COPYRIGHT}.each do |heading|
-        help.should =~ /^#{heading}$/
-      end
-    end
-
-    it "should fail when asked for an action on a legacy command" do
-      expect { subject.help(appname, :whatever) }.
-        to raise_error ArgumentError, /Legacy subcommands don't take actions/
-    end
-  end
-end
diff --git a/spec/unit/faces/indirector_spec.rb b/spec/unit/faces/indirector_spec.rb
deleted file mode 100755
index c1aed96..0000000
--- a/spec/unit/faces/indirector_spec.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'spec_helper'
-require 'puppet/faces/indirector'
-
-describe Puppet::Faces::Indirector do
-  subject do
-    instance = Puppet::Faces::Indirector.new(:test, '0.0.1')
-    indirection = stub('indirection',
-                       :name => :stub_indirection,
-                       :reset_terminus_class => nil)
-    instance.stubs(:indirection).returns indirection
-    instance
-  end
-
-  it "should be able to return a list of indirections" do
-    Puppet::Faces::Indirector.indirections.should be_include("catalog")
-  end
-
-  it "should be able to return a list of terminuses for a given indirection" do
-    Puppet::Faces::Indirector.terminus_classes(:catalog).should be_include("compiler")
-  end
-
-  describe "as an instance" do
-    it "should be able to determine its indirection" do
-      # Loading actions here an get, um, complicated
-      Puppet::Faces.stubs(:load_actions)
-      Puppet::Faces::Indirector.new(:catalog, '0.0.1').indirection.should equal(Puppet::Resource::Catalog.indirection)
-    end
-  end
-
-  [:find, :search, :save, :destroy].each do |method|
-    it "should define a '#{method}' action" do
-      Puppet::Faces::Indirector.should be_action(method)
-    end
-
-    it "should call the indirection method with options when the '#{method}' action is invoked" do
-      subject.indirection.expects(method).with(:test, "myargs", {})
-      subject.send(method, :test, "myargs")
-    end
-    it "should forward passed options" do
-      subject.indirection.expects(method).with(:test, "action", {'one'=>'1'})
-      subject.send(method, :test, 'action', {'one'=>'1'})
-    end
-  end
-
-  it "should be able to override its indirection name" do
-    subject.set_indirection_name :foo
-    subject.indirection_name.should == :foo
-  end
-
-  it "should be able to set its terminus class" do
-    subject.indirection.expects(:terminus_class=).with(:myterm)
-    subject.set_terminus(:myterm)
-  end
-
-  it "should define a class-level 'info' action" do
-    Puppet::Faces::Indirector.should be_action(:info)
-  end
-end
diff --git a/spec/unit/faces/key_spec.rb b/spec/unit/faces/key_spec.rb
deleted file mode 100755
index 9b7a587..0000000
--- a/spec/unit/faces/key_spec.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-describe Puppet::Faces[:key, '0.0.1'] do
-  it "should actually have some tests..."
-end
diff --git a/spec/unit/faces/node_spec.rb b/spec/unit/faces/node_spec.rb
deleted file mode 100755
index c6ed71f..0000000
--- a/spec/unit/faces/node_spec.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'spec_helper'
-
-describe Puppet::Faces[:node, '0.0.1'] do
-  it "should set its default format to :yaml" do
-    subject.default_format.should == :yaml
-  end
-end
diff --git a/spec/unit/faces/report_spec.rb b/spec/unit/faces/report_spec.rb
deleted file mode 100755
index 30897d5..0000000
--- a/spec/unit/faces/report_spec.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-describe Puppet::Faces[:report, '0.0.1'] do
-  it "should actually have some tests..."
-end
diff --git a/spec/unit/faces/resource_spec.rb b/spec/unit/faces/resource_spec.rb
deleted file mode 100755
index e3f2e1c..0000000
--- a/spec/unit/faces/resource_spec.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-describe Puppet::Faces[:resource, '0.0.1'] do
-  it "should actually have some tests..."
-end
diff --git a/spec/unit/faces/resource_type_spec.rb b/spec/unit/faces/resource_type_spec.rb
deleted file mode 100755
index fcbf075..0000000
--- a/spec/unit/faces/resource_type_spec.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-describe Puppet::Faces[:resource_type, '0.0.1'] do
-  it "should actually have some tests..."
-end
diff --git a/spec/unit/interface/face_collection_spec.rb b/spec/unit/interface/face_collection_spec.rb
index 7528710..6ba35b4 100755
--- a/spec/unit/interface/face_collection_spec.rb
+++ b/spec/unit/interface/face_collection_spec.rb
@@ -15,7 +15,7 @@ describe Puppet::Interface::FaceCollection do
   before :each do
     @original_faces    = subject.instance_variable_get("@faces").dup
     @original_required = $".dup
-    $".delete_if do |path| path =~ %r{/faces/.*\.rb$} end
+    $".delete_if do |path| path =~ %r{/face/.*\.rb$} end
     subject.instance_variable_get("@faces").clear
   end
 
@@ -59,82 +59,71 @@ describe Puppet::Interface::FaceCollection do
       subject.instance_variable_get("@faces")[:foo]['0.0.1'] = 10
     end
 
-    before :each do
-      @dir = Dir.mktmpdir
-      @lib = FileUtils.mkdir_p(File.join @dir, 'puppet', 'faces')
-      $LOAD_PATH.push(@dir)
-    end
-
-    after :each do
-      FileUtils.remove_entry_secure @dir
-      $LOAD_PATH.pop
-    end
-
-    it "should return the faces with the given name" do
+    it "should return the face with the given name" do
       subject["foo", '0.0.1'].should == 10
     end
 
-    it "should attempt to load the faces if it isn't found" do
-      subject.expects(:require).with('puppet/faces/bar')
+    it "should attempt to load the face if it isn't found" do
+      subject.expects(:require).with('puppet/face/bar')
       subject["bar", '0.0.1']
     end
 
-    it "should attempt to load the default faces for the specified version :current" do
-      subject.expects(:require).with('puppet/faces/fozzie')
+    it "should attempt to load the default face for the specified version :current" do
+      subject.expects(:require).with('puppet/face/fozzie')
       subject['fozzie', :current]
     end
   end
 
   describe "::face?" do
-    it "should return true if the faces specified is registered" do
+    it "should return true if the face specified is registered" do
       subject.instance_variable_get("@faces")[:foo]['0.0.1'] = 10
       subject.face?("foo", '0.0.1').should == true
     end
 
-    it "should attempt to require the faces if it is not registered" do
+    it "should attempt to require the face if it is not registered" do
       subject.expects(:require).with do |file|
         subject.instance_variable_get("@faces")[:bar]['0.0.1'] = true
-        file == 'puppet/faces/bar'
+        file == 'puppet/face/bar'
       end
       subject.face?("bar", '0.0.1').should == true
     end
 
-    it "should return true if requiring the faces registered it" do
+    it "should return true if requiring the face registered it" do
       subject.stubs(:require).with do
         subject.instance_variable_get("@faces")[:bar]['0.0.1'] = 20
       end
     end
 
-    it "should return false if the faces is not registered" do
+    it "should return false if the face is not registered" do
       subject.stubs(:require).returns(true)
       subject.face?("bar", '0.0.1').should be_false
     end
 
-    it "should return false if the faces file itself is missing" do
+    it "should return false if the face file itself is missing" do
       subject.stubs(:require).
-        raises(LoadError, 'no such file to load -- puppet/faces/bar')
+        raises(LoadError, 'no such file to load -- puppet/face/bar')
       subject.face?("bar", '0.0.1').should be_false
     end
 
     it "should register the version loaded by `:current` as `:current`" do
       subject.expects(:require).with do |file|
-        subject.instance_variable_get("@faces")[:huzzah]['2.0.1'] = :huzzah_faces
-        file == 'puppet/faces/huzzah'
+        subject.instance_variable_get("@faces")[:huzzah]['2.0.1'] = :huzzah_face
+        file == 'puppet/face/huzzah'
       end
       subject.face?("huzzah", :current)
-      subject.instance_variable_get("@faces")[:huzzah][:current].should == :huzzah_faces
+      subject.instance_variable_get("@faces")[:huzzah][:current].should == :huzzah_face
     end
 
     context "with something on disk" do
-      it "should register the version loaded from `puppet/faces/{name}` as `:current`" do
+      it "should register the version loaded from `puppet/face/{name}` as `:current`" do
         subject.should be_face "huzzah", '2.0.1'
         subject.should be_face "huzzah", :current
-        Puppet::Faces[:huzzah, '2.0.1'].should == Puppet::Faces[:huzzah, :current]
+        Puppet::Face[:huzzah, '2.0.1'].should == Puppet::Face[:huzzah, :current]
       end
 
       it "should index :current when the code was pre-required" do
         subject.instance_variable_get("@faces")[:huzzah].should_not be_key :current
-        require 'puppet/faces/huzzah'
+        require 'puppet/face/huzzah'
         subject.face?(:huzzah, :current).should be_true
       end
     end
@@ -146,10 +135,10 @@ describe Puppet::Interface::FaceCollection do
   end
 
   describe "::register" do
-    it "should store the faces by name" do
-      faces = Puppet::Faces.new(:my_faces, '0.0.1')
-      subject.register(faces)
-      subject.instance_variable_get("@faces").should == {:my_faces => {'0.0.1' => faces}}
+    it "should store the face by name" do
+      face = Puppet::Face.new(:my_face, '0.0.1')
+      subject.register(face)
+      subject.instance_variable_get("@faces").should == {:my_face => {'0.0.1' => face}}
     end
   end
 
diff --git a/spec/unit/interface_spec.rb b/spec/unit/interface_spec.rb
index 7e6b7de..2365d5c 100755
--- a/spec/unit/interface_spec.rb
+++ b/spec/unit/interface_spec.rb
@@ -1,5 +1,5 @@
 require 'spec_helper'
-require 'puppet/faces'
+require 'puppet/face'
 require 'puppet/interface'
 
 describe Puppet::Interface do
@@ -116,7 +116,7 @@ describe Puppet::Interface do
 
   it "should try to require faces that are not known" do
     pending "mocking require causes random stack overflow"
-    subject::FaceCollection.expects(:require).with "puppet/faces/foo"
+    subject::FaceCollection.expects(:require).with "puppet/face/foo"
     subject[:foo, '0.0.1']
   end
 
diff --git a/spec/unit/util/command_line_spec.rb b/spec/unit/util/command_line_spec.rb
index 6cf9047..b0c2a85 100755
--- a/spec/unit/util/command_line_spec.rb
+++ b/spec/unit/util/command_line_spec.rb
@@ -99,7 +99,7 @@ describe Puppet::Util::CommandLine do
         Puppet::Util.expects(:which).with('puppet-whatever').returns(nil)
         commandline.expects(:system).never
 
-        text = Puppet::Faces[:help, :current].help
+        text = Puppet::Face[:help, :current].help
         commandline.expects(:puts).with { |x| x =~ /Unknown Puppet subcommand/ }
         commandline.expects(:puts).with text
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list