diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-07 14:20:35 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-07 15:52:04 -0700 |
| commit | 8d144d0bf5116c5f04522f2b4cd75699f6480f8e (patch) | |
| tree | d1f0a58fc106b04c9149782b56b0736394ef931b /lib/puppet/application/faces.rb | |
| parent | 5592034fdb8bf3a72ab3133d69443490f9ad7b78 (diff) | |
| download | puppet-8d144d0bf5116c5f04522f2b4cd75699f6480f8e.tar.gz puppet-8d144d0bf5116c5f04522f2b4cd75699f6480f8e.tar.xz puppet-8d144d0bf5116c5f04522f2b4cd75699f6480f8e.zip | |
(#7012) Update references in code to use face(s)
The codebase is now using the new name, faces, uniformly to reference the
objects contained. All tests pass.
Diffstat (limited to 'lib/puppet/application/faces.rb')
| -rw-r--r-- | lib/puppet/application/faces.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/puppet/application/faces.rb b/lib/puppet/application/faces.rb index 0a6a798ce..904a0cccc 100644 --- a/lib/puppet/application/faces.rb +++ b/lib/puppet/application/faces.rb @@ -1,7 +1,7 @@ require 'puppet/application' -require 'puppet/string' +require 'puppet/faces' -class Puppet::Application::String < Puppet::Application +class Puppet::Application::Faces < Puppet::Application should_parse_config run_mode :agent @@ -18,7 +18,7 @@ class Puppet::Application::String < Puppet::Application if arguments.empty? arguments = %w{terminuses actions} end - strings.each do |name| + faces.each do |name| str = "#{name}:\n" if arguments.include?("terminuses") begin @@ -68,12 +68,12 @@ class Puppet::Application::String < Puppet::Application end unless respond_to?(verb) - raise "Command '#{verb}' not found for 'string'" + raise "Command '#{verb}' not found for 'faces'" end end - def strings - Puppet::String.strings + def faces + Puppet::Faces.faces end def terminus_classes(indirection) @@ -81,9 +81,9 @@ class Puppet::Application::String < Puppet::Application end def actions(indirection) - return [] unless string = Puppet::String[indirection, '0.0.1'] - string.load_actions - return string.actions.sort { |a, b| a.to_s <=> b.to_s } + return [] unless faces = Puppet::Faces[indirection, '0.0.1'] + faces.load_actions + return faces.actions.sort { |a, b| a.to_s <=> b.to_s } end def load_applications |
