diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-13 00:38:53 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-13 00:38:53 -0700 |
| commit | b060ca7e1594a6ecfd6b1e32933e6a531b08bcf4 (patch) | |
| tree | 95c35f65addba0d408cb7f5c9e2c5de53724a737 /lib/puppet/application | |
| parent | 941c56a283265cdf5a951ecaae63580b60486c52 (diff) | |
| parent | db11770718c61f9ee3d5fcd703c5c0c7c05227ca (diff) | |
| download | puppet-b060ca7e1594a6ecfd6b1e32933e6a531b08bcf4.tar.gz puppet-b060ca7e1594a6ecfd6b1e32933e6a531b08bcf4.tar.xz puppet-b060ca7e1594a6ecfd6b1e32933e6a531b08bcf4.zip | |
Merge branch 'bug/next/7056-use-face-rather-than-faces' into next
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/config.rb | 4 | ||||
| -rw-r--r-- | lib/puppet/application/configurer.rb | 6 | ||||
| -rw-r--r-- | lib/puppet/application/face_base.rb (renamed from lib/puppet/application/faces_base.rb) | 6 | ||||
| -rw-r--r-- | lib/puppet/application/faces.rb | 12 | ||||
| -rw-r--r-- | lib/puppet/application/help.rb | 4 | ||||
| -rw-r--r-- | lib/puppet/application/indirection_base.rb | 4 |
6 files changed, 18 insertions, 18 deletions
diff --git a/lib/puppet/application/config.rb b/lib/puppet/application/config.rb index 41a46c339..a94441e7f 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 751e6b4d7..6e86cd2d4 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/faces_base.rb b/lib/puppet/application/face_base.rb index f1b77f285..2a048a532 100644 --- a/lib/puppet/application/faces_base.rb +++ b/lib/puppet/application/face_base.rb @@ -1,8 +1,8 @@ require 'puppet/application' -require 'puppet/faces' +require 'puppet/face' require 'optparse' -class Puppet::Application::FacesBase < Puppet::Application +class Puppet::Application::FaceBase < Puppet::Application should_parse_config run_mode :agent @@ -60,7 +60,7 @@ class Puppet::Application::FacesBase < Puppet::Application # 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] + @face = Puppet::Face[@type, :current] @format = @face.default_format # Now, walk the command line and identify the action. We skip over diff --git a/lib/puppet/application/faces.rb b/lib/puppet/application/faces.rb index a7b227e23..3dd3f0312 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/help.rb b/lib/puppet/application/help.rb index fd8818db0..0d7767632 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 7455ebedf..580a0999a 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 |
