IMO, if never shipped it in a full release, it doesn't need backward 
compatibility support.

I recommend removing the for_humans mention entirely.

On May 4, 2011, at 12:39 PM, Daniel Pittman wrote:

> Where we need special support for :for_humans as an alias for :console, call
> it out in comments.  This makes it clear to someone who wonders why what the
> actual underlying purpose of the whole thing is.
> 
> Reviewed-By: Jacob Helwig <[email protected]>
> ---
> lib/puppet/interface/action_builder.rb     |    2 ++
> spec/unit/interface/action_builder_spec.rb |    2 ++
> 2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/puppet/interface/action_builder.rb 
> b/lib/puppet/interface/action_builder.rb
> index 0bf4f14..1630553 100644
> --- a/lib/puppet/interface/action_builder.rb
> +++ b/lib/puppet/interface/action_builder.rb
> @@ -38,6 +38,8 @@ class Puppet::Interface::ActionBuilder
>   def render_as(value = nil)
>     value.nil? and raise ArgumentError, "You must give a rendering format to 
> render_as"
> 
> +    # :for_humans is a compatibility alias for :console, but since we shipped
> +    # it in 2.7.0rc1 we need to support it ongoing. --daniel 2011-05-04
>     formats = Puppet::Network::FormatHandler.formats << :for_humans
>     unless formats.include? value
>       raise ArgumentError, "#{value.inspect} is not a valid rendering format: 
> #{formats.sort.join(", ")}"
> diff --git a/spec/unit/interface/action_builder_spec.rb 
> b/spec/unit/interface/action_builder_spec.rb
> index e0d0ebe..89aef26 100755
> --- a/spec/unit/interface/action_builder_spec.rb
> +++ b/spec/unit/interface/action_builder_spec.rb
> @@ -200,6 +200,8 @@ describe Puppet::Interface::ActionBuilder do
>       end
>     end
> 
> +    # :for_humans is an alias for :console, and deprecated, but since we
> +    # shipped it in 2.7.0rc1 we need to support it. --daniel 2011-05-04
>     it "should accept :for_humans format" do
>       action = Puppet::Interface::ActionBuilder.build(face, :foo) do
>         when_invoked do true end
> -- 
> 1.7.5
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/puppet-dev?hl=en.
> 


-- 
The point of living and of being an optimist, is to be foolish enough
to believe the best is yet to come.        -- Peter Ustinov
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   http://about.me/lak




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to