Issue #6752 has been updated by Daniel Pittman.
Luke Kanies wrote:
> Daniel Pittman wrote:
> > [...]
> > The only outstanding question about the current rendering is that keys can
> > be unlimited length; I propose capping them at 38 characters, and using
> > ellipses in shortening long strings. That should give a reasonable balance
> > of utility and data trimming for human-focused output.
>
> Why? That is, is it really worth investing in infrastructure to make it so
> people can't use options longer than 38 characters? Just refuse any patches
> that actually do this in core, and let people do whatever they want in their
> own system. Is that not sufficient?
Er, perhaps you misunderstand me: this is about *displaying* the text, not
using it. It seemed worth asking the question about the line of code required
to truncate the keys to me, so we had thought about user-focused presentation.
None of this would be about preventing people using the keys anywhere in the
system or anything.
So, no, other than the question of intent, it didn't seem like either a lot of
work – gsub(/^(.{1,35}).*$/) { |x| x[0] + '...' } – to support this.
----------------------------------------
Bug #6752: Allow action-specific render methods
https://projects.puppetlabs.com/issues/6752
Author: Paul Berry
Status: Accepted
Priority: Normal
Assignee: Daniel Pittman
Category: interfaces
Target version: Statler
Affected Puppet version: development
Keywords:
Branch:
https://github.com/daniel-pittman/puppet/commits/bug%2F2.7.x%2F6752-allow-action-specific-render-methods
The current implementation of interfaces allows a render method to be specified
at the interface level but not at the action level. (The render method is in
fact specified in the application file, not the interface file).
This is unfortunate because not all actions in the same interface generate the
same kind of output, so it does not necessarily make sense to have their output
rendered in the same way. For example, "puppet catalog find" generates a
catalog, which should probably be rendered as YAML or JSON, whereas "puppet
catalog select" generates a list of resources.
It would be nice if interface-specific render methods could be specified in the
declaration of the interface, and action-specific render methods could be
specified in the declaration of the action.
The current implementation works around this situation by having "puppet
catalog select" direct its output straight to stdout (instead of returning
it)--this means that "puppet catalog select" cannot be effectively used from
within Ruby.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs?hl=en.