<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puppet.git/test/language, branch ticket/master/8119</title>
<subtitle>Puppet repo</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/'/>
<entry>
<title>Scope[] now returns nil for undefined variables</title>
<updated>2011-07-15T18:52:41+00:00</updated>
<author>
<name>Luke Kanies</name>
<email>luke@puppetlabs.com</email>
</author>
<published>2011-07-05T23:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=bdc0f8716ae8ccb2b2657dfab591afe9589d8902'/>
<id>bdc0f8716ae8ccb2b2657dfab591afe9589d8902</id>
<content type='text'>
Given that we have the 'include?' method, this feature
is unnecessary, and it makes sense to convert to more
ruby-like behavior.

Any code that previously checked whether lookupvar
(or the new []) returned :undefined should now check
whether 'scope.include?(var)'.  Thus, you can have
the same behavior, but it takes a bit different code
to get it.

Signed-off-by: Luke Kanies &lt;luke@puppetlabs.com&gt;
Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Given that we have the 'include?' method, this feature
is unnecessary, and it makes sense to convert to more
ruby-like behavior.

Any code that previously checked whether lookupvar
(or the new []) returned :undefined should now check
whether 'scope.include?(var)'.  Thus, you can have
the same behavior, but it takes a bit different code
to get it.

Signed-off-by: Luke Kanies &lt;luke@puppetlabs.com&gt;
Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Adding []/[]= support to Scope</title>
<updated>2011-07-15T18:51:49+00:00</updated>
<author>
<name>Luke Kanies</name>
<email>luke@puppetlabs.com</email>
</author>
<published>2011-06-08T14:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=0d2e0672eb516a1b1f2ced6b8c74bd2064dd205e'/>
<id>0d2e0672eb516a1b1f2ced6b8c74bd2064dd205e</id>
<content type='text'>
The interface to scope is much clearer this way anyway,
but this is needed to integrate Puppet with Hiera[1].
It just provides hash-like behavior to Scope, which Hiera
and others can now easily rely on.

I also went through all of the code that used Scope#lookupvar
and Scope#setvar and changed it if possible, and at the same
time cleaned up a lot of tests that were unnecessarily stubbing
(and thus making it difficult to tell if I had actually broken
anything).

1 - https://github.com/ripienaar/hiera

Signed-off-by: Luke Kanies &lt;luke@puppetlabs.com&gt;
Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The interface to scope is much clearer this way anyway,
but this is needed to integrate Puppet with Hiera[1].
It just provides hash-like behavior to Scope, which Hiera
and others can now easily rely on.

I also went through all of the code that used Scope#lookupvar
and Scope#setvar and changed it if possible, and at the same
time cleaned up a lot of tests that were unnecessarily stubbing
(and thus making it difficult to tell if I had actually broken
anything).

1 - https://github.com/ripienaar/hiera

Signed-off-by: Luke Kanies &lt;luke@puppetlabs.com&gt;
Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>(#6928) Remove --parseonly</title>
<updated>2011-04-13T22:40:58+00:00</updated>
<author>
<name>Nick Lewis</name>
<email>nick@puppetlabs.com</email>
</author>
<published>2011-04-13T21:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=fc36e8de8cdf32ae13b9241f9a9eef4c2727056e'/>
<id>fc36e8de8cdf32ae13b9241f9a9eef4c2727056e</id>
<content type='text'>
This has been removed in favor of 'puppet parser validate &lt;manifest&gt;'.

Paired-With: Jesse Wolfe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has been removed in favor of 'puppet parser validate &lt;manifest&gt;'.

Paired-With: Jesse Wolfe
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor en route to #5027 -- remove usestring parameter from lookupvar</title>
<updated>2011-04-12T19:47:31+00:00</updated>
<author>
<name>Markus Roberts</name>
<email>Markus@reality.com</email>
</author>
<published>2010-10-22T00:24:09+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=31f8e660c8f4c0ec01f140322cf7c585144a0888'/>
<id>31f8e660c8f4c0ec01f140322cf7c585144a0888</id>
<content type='text'>
The usestring parameter to lookupvar was objectionable for several reasons;
first, it performed a function orthogonal to the main purpose of the method,
second its default was the least common value, and third it was causing other
code to work for reasons that were not obvious (extlookup).

This refactor breaks the value-transforming function out into a seperate
method which allows the user to specify the value to be used in lieu of :undef
and removes the parameter.  The function, Scope#undef_as(default,exp) is
written so that it can be used in user code (templates, functions, etc.) if
needed.

This refactor will introduce a user-visible behaviour change in the case where
users were counting on lookupvar to return "" for undefined variables.  The
best solution is to have them use undef_as, replacing:

    lookupvar('myvar')

with

    undef_as('',lookupvar('myvar'))

(with the option to specify another default value if desired).  If this is too
objectionable, we could rename the existing lookupvar as raw_lookupvar and
define

    def lookupvar(v)
      undef_as('',raw_lookupvar(v))
    end

to restore the present behaviour.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The usestring parameter to lookupvar was objectionable for several reasons;
first, it performed a function orthogonal to the main purpose of the method,
second its default was the least common value, and third it was causing other
code to work for reasons that were not obvious (extlookup).

This refactor breaks the value-transforming function out into a seperate
method which allows the user to specify the value to be used in lieu of :undef
and removes the parameter.  The function, Scope#undef_as(default,exp) is
written so that it can be used in user code (templates, functions, etc.) if
needed.

This refactor will introduce a user-visible behaviour change in the case where
users were counting on lookupvar to return "" for undefined variables.  The
best solution is to have them use undef_as, replacing:

    lookupvar('myvar')

with

    undef_as('',lookupvar('myvar'))

(with the option to specify another default value if desired).  If this is too
objectionable, we could rename the existing lookupvar as raw_lookupvar and
define

    def lookupvar(v)
      undef_as('',raw_lookupvar(v))
    end

to restore the present behaviour.
</pre>
</div>
</content>
</entry>
<entry>
<title>(#4576) Raise an error when a node is classified into a non-existent class</title>
<updated>2011-03-24T23:57:24+00:00</updated>
<author>
<name>Jesse Wolfe</name>
<email>jes5199@gmail.com</email>
</author>
<published>2011-03-24T23:56:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=8124f8e725148be2556285629171d4964973c424'/>
<id>8124f8e725148be2556285629171d4964973c424</id>
<content type='text'>
In 2.6.x, this was upgraded from "info" to "warning". This change for
Statler escalates the warning to an exception which will abort the
compile. This makes compiling fail consistently when you try to use an
undefined class from any of: node classifiers, the class keyword, and the
include function.

Paired-with: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 2.6.x, this was upgraded from "info" to "warning". This change for
Statler escalates the warning to an exception which will abort the
compile. This makes compiling fail consistently when you try to use an
undefined class from any of: node classifiers, the class keyword, and the
include function.

Paired-with: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '2.6.x' into next</title>
<updated>2010-12-16T19:30:51+00:00</updated>
<author>
<name>Nick Lewis</name>
<email>nick@puppetlabs.com</email>
</author>
<published>2010-12-16T19:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=480c399f183627f5f588e9dc9f5f86f683c0e468'/>
<id>480c399f183627f5f588e9dc9f5f86f683c0e468</id>
<content type='text'>
Manually Resolved Conflicts:
	lib/puppet/resource/type_collection.rb
	spec/unit/configurer_spec.rb
	spec/unit/indirector/catalog/active_record_spec.rb
	spec/unit/resource/type_collection_spec.rb
	spec/unit/transaction/resource_harness_spec.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Manually Resolved Conflicts:
	lib/puppet/resource/type_collection.rb
	spec/unit/configurer_spec.rb
	spec/unit/indirector/catalog/active_record_spec.rb
	spec/unit/resource/type_collection_spec.rb
	spec/unit/transaction/resource_harness_spec.rb
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #1757 Change file mode representation to octal</title>
<updated>2010-12-08T22:57:50+00:00</updated>
<author>
<name>Jesse Wolfe</name>
<email>jes5199@gmail.com</email>
</author>
<published>2010-10-18T23:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=3e5927773c1dc7bc6e9af922fef09149d1599ef6'/>
<id>3e5927773c1dc7bc6e9af922fef09149d1599ef6</id>
<content type='text'>
This patch changes the internal representation of a file's mode to a
string instead of an integer. This simplifies the problem of displaying
the value consistently throughout all of puppet.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes the internal representation of a file's mode to a
string instead of an integer. This simplifies the problem of displaying
the value consistently throughout all of puppet.
</pre>
</div>
</content>
</entry>
<entry>
<title>maint: Use expand_path when requiring spec_helper or puppettest</title>
<updated>2010-12-06T20:01:18+00:00</updated>
<author>
<name>Matt Robinson</name>
<email>matt@puppetlabs.com</email>
</author>
<published>2010-12-06T20:01:18+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=626d7564467bdc0e9d2d385e9aa10c539d9ed175'/>
<id>626d7564467bdc0e9d2d385e9aa10c539d9ed175</id>
<content type='text'>
Doing a require to a relative path can cause files to be required more
than once when they're required from different relative paths.  If you
expand the path fully, this won't happen.  Ruby 1.9 also requires that
you use expand_path when doing these requires.

Paired-with: Jesse Wolfe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Doing a require to a relative path can cause files to be required more
than once when they're required from different relative paths.  If you
expand the path fully, this won't happen.  Ruby 1.9 also requires that
you use expand_path when doing these requires.

Paired-with: Jesse Wolfe
</pre>
</div>
</content>
</entry>
<entry>
<title>Maint: Refactor tests to use &lt;class&gt;.indirection.&lt;method&gt;</title>
<updated>2010-11-29T20:08:19+00:00</updated>
<author>
<name>Paul Berry</name>
<email>paul@puppetlabs.com</email>
</author>
<published>2010-11-29T19:55:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=14f8160674628340ccfd79baeb84f66cf1e0398a'/>
<id>14f8160674628340ccfd79baeb84f66cf1e0398a</id>
<content type='text'>
Replaced uses of the find, search, destroy, and expire methods on
model classes with direct calls to the indirection objects.  This
change affects tests only.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced uses of the find, search, destroy, and expire methods on
model classes with direct calls to the indirection objects.  This
change affects tests only.
</pre>
</div>
</content>
</entry>
<entry>
<title>[4638] Cleanup of plurals and inheritance relationships in AST</title>
<updated>2010-08-27T17:29:23+00:00</updated>
<author>
<name>Paul Berry</name>
<email>paul@puppetlabs.com</email>
</author>
<published>2010-08-25T18:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=df088c9ba16dce50c17a79920c1ac186db67b9e9'/>
<id>df088c9ba16dce50c17a79920c1ac186db67b9e9</id>
<content type='text'>
Changed the grammar so that the following "plural" constructs always
parse as an ASTArray:

- funcvalues
- rvalues
- resourceinstances
- anyparams
- params
- caseopts
- casevalues

And the following "singluar" construct never parses as an ASTArray:

- statement

The previous behavior was for these constructs to parse as a scalar
when they represented a single item and an ASTArray when they
contained zero or multiple items.  ("Statement" could sometimes
represent a single item because a single resource declaration could
represent multiple resources).  This complicated other grammar rules
and caused ambiguous handling of nested arrays.

Also made these changes to the AST class hierarchy:

- ResourceInstance no longer derives from ASTArray.  This relationship
  was not meaningful because a ResourceInstance is a (title,
  parameters) pair, not an array, and it produced complications when
  we wanted to represent an array of ResourceInstance objects.

- Resource no longer derives from ResourceReference.  No significant
  functionality was being inherited and the relationship doesn't make
  sense in an AST context.

- ResourceOverride no longer derives from Resource.  No significant
  functionality was being inherited and the relationship doesn't make
  sense in an AST context.

- Resource can now represent a compound resource instance such as
  "notify { foo: ; bar: }".  This saves the parser from having to
  use represent a statement as an array of objects.

- ASTArray's evaluate method never flattens out arrays of arrays.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changed the grammar so that the following "plural" constructs always
parse as an ASTArray:

- funcvalues
- rvalues
- resourceinstances
- anyparams
- params
- caseopts
- casevalues

And the following "singluar" construct never parses as an ASTArray:

- statement

The previous behavior was for these constructs to parse as a scalar
when they represented a single item and an ASTArray when they
contained zero or multiple items.  ("Statement" could sometimes
represent a single item because a single resource declaration could
represent multiple resources).  This complicated other grammar rules
and caused ambiguous handling of nested arrays.

Also made these changes to the AST class hierarchy:

- ResourceInstance no longer derives from ASTArray.  This relationship
  was not meaningful because a ResourceInstance is a (title,
  parameters) pair, not an array, and it produced complications when
  we wanted to represent an array of ResourceInstance objects.

- Resource no longer derives from ResourceReference.  No significant
  functionality was being inherited and the relationship doesn't make
  sense in an AST context.

- ResourceOverride no longer derives from Resource.  No significant
  functionality was being inherited and the relationship doesn't make
  sense in an AST context.

- Resource can now represent a compound resource instance such as
  "notify { foo: ; bar: }".  This saves the parser from having to
  use represent a statement as an array of objects.

- ASTArray's evaluate method never flattens out arrays of arrays.
</pre>
</div>
</content>
</entry>
</feed>
