<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puppet.git/lib/puppet/interface, branch ticket/master/7841</title>
<subtitle>Puppet repo</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/'/>
<entry>
<title>(#8690) Accept 'global' options in Puppet Faces</title>
<updated>2011-07-28T22:20:54+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-07-28T22:08:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=023d9597b9895f57fda05dc79adad41684179eb2'/>
<id>023d9597b9895f57fda05dc79adad41684179eb2</id>
<content type='text'>
When we introduced verification of options, we forgot to handle the case that
global options from the Puppet settings system could be passed to the face.
This, in turn, means that the system would fail if you used any of those.

This remediates that, and now these work as expected.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we introduced verification of options, we forgot to handle the case that
global options from the Puppet settings system could be passed to the face.
This, in turn, means that the system would fail if you used any of those.

This remediates that, and now these work as expected.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#8561, #7290) Implement the option contract fully.</title>
<updated>2011-07-22T23:27:17+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-07-22T22:15:38+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=82e5fa9561e2d4cb1d699a41c14f50953d8f2d97'/>
<id>82e5fa9561e2d4cb1d699a41c14f50953d8f2d97</id>
<content type='text'>
Rewrite the process of validating and updating the options to fully reflect
the contract - we fail if there are unknown options passed, report nicely
errors of duplicate names, pass only the canonical names to the action code,
and generally enforce nicely.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rewrite the process of validating and updating the options to fully reflect
the contract - we fail if there are unknown options passed, report nicely
errors of duplicate names, pass only the canonical names to the action code,
and generally enforce nicely.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#8561) Unify validation and modification of action arguments.</title>
<updated>2011-07-22T23:27:13+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-07-22T21:32:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=77441be2299bbb96ab9f048855b0fd4c16eb7b5a'/>
<id>77441be2299bbb96ab9f048855b0fd4c16eb7b5a</id>
<content type='text'>
Rather than having multiple, separate operations that modify and validate the
arguments to an action, a single pass makes sense.  This also means less walks
across the set of data, and a few less expensive method calls in Ruby.

Additionally, we work on a duplicate of the arguments hash rather than
directly modifying the original.  Because everything we do is at the top level
key/value mapping, this is sufficient to isolate the original.

While mostly theoretical, we now don't mutilate the hash passed in, so the
user won't get nastily surprised by the fact that we could have done so.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than having multiple, separate operations that modify and validate the
arguments to an action, a single pass makes sense.  This also means less walks
across the set of data, and a few less expensive method calls in Ruby.

Additionally, we work on a duplicate of the arguments hash rather than
directly modifying the original.  Because everything we do is at the top level
key/value mapping, this is sufficient to isolate the original.

While mostly theoretical, we now don't mutilate the hash passed in, so the
user won't get nastily surprised by the fact that we could have done so.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#7184) Load the core of obsolete versions of Faces.</title>
<updated>2011-07-22T20:29:32+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-07-21T23:43:16+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=532c4f37e4f8289cf4a9871ebc0cb5086c2ba26a'/>
<id>532c4f37e4f8289cf4a9871ebc0cb5086c2ba26a</id>
<content type='text'>
When we define an action on an older version of a Face, we must be sure to
directly load the core of that version, not just define it with the external
Action(s) that it had.

Otherwise we break our contract, which is that any core Actions for a specific
version will be available to your external Action for as long as we support
that core version.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we define an action on an older version of a Face, we must be sure to
directly load the core of that version, not just define it with the external
Action(s) that it had.

Otherwise we break our contract, which is that any core Actions for a specific
version will be available to your external Action for as long as we support
that core version.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#7184) Find actions bound to other versions of Faces.</title>
<updated>2011-07-22T20:29:29+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-07-21T23:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=2cd3bc47993fbd32a77ca9dfdd51353f2dfbcb58'/>
<id>2cd3bc47993fbd32a77ca9dfdd51353f2dfbcb58</id>
<content type='text'>
When we first touch a Face, we load all the available Actions from disk.

Given they define themselves against a specific version of a Face, they are
automatically available tied to the correct version; this makes it trivially
possible to locate those on demand and return them.

Now, we have the ability to find and, consequently, invoke Actions on older
versions of Faces.  We don't load enough context, though: the older face will
only have external Actions defined, not anything core.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we first touch a Face, we load all the available Actions from disk.

Given they define themselves against a specific version of a Face, they are
automatically available tied to the correct version; this makes it trivially
possible to locate those on demand and return them.

Now, we have the ability to find and, consequently, invoke Actions on older
versions of Faces.  We don't load enough context, though: the older face will
only have external Actions defined, not anything core.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#7184) Centralize "find action for face" into Puppet::Face</title>
<updated>2011-07-22T20:29:25+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-07-21T22:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=1e0655e6bdbc872014abdffa5deacb334616e826'/>
<id>1e0655e6bdbc872014abdffa5deacb334616e826</id>
<content type='text'>
As part of moving to load actions first, and their associated face, when
invoked from the command line, it makes sense to push the logic for finding
the action and face down into the Puppet::Face implementation.

This means that we can change the logic there without needing to update the
public part of the CLI implementation, and that any further facades can use
the same, correct, logic to locate the action for the face.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of moving to load actions first, and their associated face, when
invoked from the command line, it makes sense to push the logic for finding
the action and face down into the Puppet::Face implementation.

This means that we can change the logic there without needing to update the
public part of the CLI implementation, and that any further facades can use
the same, correct, logic to locate the action for the face.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#7123) Support runtime setting of 'default' on actions.</title>
<updated>2011-07-21T00:07:10+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-07-20T19:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=fd6a653cb32cb03e339655862c526fd5dccbfcf0'/>
<id>fd6a653cb32cb03e339655862c526fd5dccbfcf0</id>
<content type='text'>
Given the inheritance model for actions, we are sometimes going to need to set
them to 'default' at runtime, rather than during their static declaration.

Add tests to verify that this works correctly, and update the code to ensure
that happens.  This gives up caching of the default action, but this should be
an extremely rare operation - pretty much only CLI invocation, really.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Given the inheritance model for actions, we are sometimes going to need to set
them to 'default' at runtime, rather than during their static declaration.

Add tests to verify that this works correctly, and update the code to ensure
that happens.  This gives up caching of the default action, but this should be
an extremely rare operation - pretty much only CLI invocation, really.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#6787) Add `default_to` for options.</title>
<updated>2011-07-21T00:06:34+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-07-20T18:58:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=b75b1c19ecf6c278b065d203ac8486fa598caa8b'/>
<id>b75b1c19ecf6c278b065d203ac8486fa598caa8b</id>
<content type='text'>
This implement support for options with default values, allowing faces to set
those values when not invoked.  This can eliminate substantial duplicate code
from actions, especially when there are face-level options in use.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implement support for options with default values, allowing faces to set
those values when not invoked.  This can eliminate substantial duplicate code
from actions, especially when there are face-level options in use.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#7204) Consolidate Semantic Versioning code.</title>
<updated>2011-07-19T17:55:58+00:00</updated>
<author>
<name>Pieter van de Bruggen</name>
<email>pieter@puppetlabs.com</email>
</author>
<published>2011-07-19T17:55:26+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=72abe6ce7192bba0b295a8a83483668d21050624'/>
<id>72abe6ce7192bba0b295a8a83483668d21050624</id>
<content type='text'>
This introduces a class representing a semantic version, and
implementing a few of the most common uses of them: validation,
comparison, and finding the greatest available version matching
a range.  This refactoring also allows us to easily expand our
matching of version ranges in the future, which is a big plus.

Reviewed-By: Daniel Pittman
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces a class representing a semantic version, and
implementing a few of the most common uses of them: validation,
comparison, and finding the greatest available version matching
a range.  This refactoring also allows us to easily expand our
matching of version ranges in the future, which is a big plus.

Reviewed-By: Daniel Pittman
</pre>
</div>
</content>
</entry>
<entry>
<title>(#7699) Help command should only list options once</title>
<updated>2011-07-13T22:38:32+00:00</updated>
<author>
<name>Dan Bode</name>
<email>dan@puppetlabs.com</email>
</author>
<published>2011-07-13T22:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=b82f29c61aa84a12fc208487e4b049cb24702261'/>
<id>b82f29c61aa84a12fc208487e4b049cb24702261</id>
<content type='text'>
The problem was caused by the fact that the
options method returns a list of options that
treated the aliases as seperate options.

The fix is to only maintain a list of options
and not add all aliases to the options list.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem was caused by the fact that the
options method returns a list of options that
treated the aliases as seperate options.

The fix is to only maintain a list of options
and not add all aliases to the options list.</pre>
</div>
</content>
</entry>
</feed>
