summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-13 00:17:57 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-13 00:17:57 -0700
commit4dd6a77481400b7eeac3377267d092d4c6d22da3 (patch)
treef95d292596144832805a9b57a55bc440f7cfaa43 /lib/puppet/interface
parent941c56a283265cdf5a951ecaae63580b60486c52 (diff)
downloadpuppet-4dd6a77481400b7eeac3377267d092d4c6d22da3.tar.gz
puppet-4dd6a77481400b7eeac3377267d092d4c6d22da3.tar.xz
puppet-4dd6a77481400b7eeac3377267d092d4c6d22da3.zip
(#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.
Diffstat (limited to 'lib/puppet/interface')
-rw-r--r--lib/puppet/interface/face_collection.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/interface/face_collection.rb b/lib/puppet/interface/face_collection.rb
index e4eb22fa3..591471d4b 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