summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-05-05 16:24:26 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-05-05 16:30:51 -0700
commit61edff9ba5e8e4f8db8bb9cd5a84a986b8703c5d (patch)
tree9b926e293d8e0bb0cf92c136b0975c2bbf491ff7 /lib/puppet/application
parent1c7bb924bd38042a6b03b5e7a32c24c602087eea (diff)
downloadpuppet-61edff9ba5e8e4f8db8bb9cd5a84a986b8703c5d.tar.gz
puppet-61edff9ba5e8e4f8db8bb9cd5a84a986b8703c5d.tar.xz
puppet-61edff9ba5e8e4f8db8bb9cd5a84a986b8703c5d.zip
(#7353) Remove :for_humans format entirely.
Since we never shipped this in a real release, we don't need to maintain compatibility. So, remove it entirely from the codebase. Reviewed-By: Max Martin <max@puppetlabs.com>
Diffstat (limited to 'lib/puppet/application')
-rw-r--r--lib/puppet/application/face_base.rb20
1 files changed, 5 insertions, 15 deletions
diff --git a/lib/puppet/application/face_base.rb b/lib/puppet/application/face_base.rb
index 8c1e03e3f..7a5ce3400 100644
--- a/lib/puppet/application/face_base.rb
+++ b/lib/puppet/application/face_base.rb
@@ -29,17 +29,11 @@ class Puppet::Application::FaceBase < Puppet::Application
attr_accessor :face, :action, :type, :arguments, :render_as
def render_as=(format)
- @render_as = case format.to_sym
- when :for_humans then
- # We have an old alias name for :console, which went out in
- # 2.7.0rc1, so we are going to carry it forward for a
- # while. --daniel 2011-05-04
- Puppet::Network::FormatHandler.format(:console)
- when :json then
- Puppet::Network::FormatHandler.format(:pson)
- else
- Puppet::Network::FormatHandler.format(format)
- end
+ if format == :json then
+ @render_as = Puppet::Network::FormatHandler.format(:pson)
+ else
+ @render_as = Puppet::Network::FormatHandler.format(format)
+ end
@render_as or raise ArgumentError, "I don't know how to render '#{format}'"
end
@@ -47,10 +41,6 @@ class Puppet::Application::FaceBase < Puppet::Application
# Invoke the rendering hook supplied by the user, if appropriate.
if hook = action.when_rendering(render_as.name)
result = hook.call(result)
- elsif render_as.name == :console and hook = action.when_rendering(:for_humans)
- # We have an old alias name for :console, which went out in 2.7.0rc1, so
- # we are going to carry it forward for a while. --daniel 2011-05-04
- result = hook.call(result)
end
render_as.render(result)