]> gitweb.fluxo.info Git - puppet-stdlib.git/log
puppet-stdlib.git
12 years agoMerge pull request #184 from lmello/fix_bug_20681_delete_undef_values
Adrien Thebo [Wed, 18 Sep 2013 17:08:49 +0000 (10:08 -0700)]
Merge pull request #184 from lmello/fix_bug_20681_delete_undef_values

delete_undef_values function fix bug #20681

12 years ago(#20681) fix behaviour of delete_undef_values
Leonardo Rodrigues de Mello [Mon, 16 Sep 2013 14:08:13 +0000 (11:08 -0300)]
(#20681) fix behaviour of delete_undef_values

The issue #20681 describe the error of delete() function
removing the elements from the origin array/hash/string.

This issue affected other delete functions. Because
ruby delete and delete_if functions make destructive
changes to the origin array/hash.

The delete_undef_values removed elements from the
origin array/hash and this is not the desired behaviour.

To solve this, we should dup or clone the array/hash
before using the delete or delete_if ruby functions.

We should also check if args[0] is not nil before using
dup, since dup on nil raises exception.

This fix the problem and add unit tests, so we could
enforce this behaviour and prevent regressions.

12 years agoMerge pull request #183 from lmello/fix_bug_20681_delete_at
Adrien Thebo [Tue, 17 Sep 2013 18:39:29 +0000 (11:39 -0700)]
Merge pull request #183 from lmello/fix_bug_20681_delete_at

delete_at added spec to check against bug #20681

12 years agoMerge pull request #182 from lmello/fix_bug_20681_delete_values
Adrien Thebo [Tue, 17 Sep 2013 18:35:57 +0000 (11:35 -0700)]
Merge pull request #182 from lmello/fix_bug_20681_delete_values

delete_values() fix bug #20681.

12 years agoMerge pull request #185 from lmello/refactor_16498
Adrien Thebo [Tue, 17 Sep 2013 18:33:57 +0000 (11:33 -0700)]
Merge pull request #185 from lmello/refactor_16498

(#16498) Added unit test for loadyaml function.

12 years ago(#16498) Added unit test for loadyaml function.
Leonardo Rodrigues de Mello [Tue, 17 Sep 2013 14:10:00 +0000 (11:10 -0300)]
(#16498) Added unit test for loadyaml function.

As stated on the issue #16498, it would be great to have unit tests
for all the functions.

Function loadyaml was missing a unit test. This commit added the
unit test to loadyaml function.

12 years agoMerge pull request #178 from lmello/fix_bug_20681
Adrien Thebo [Tue, 17 Sep 2013 18:07:21 +0000 (11:07 -0700)]
Merge pull request #178 from lmello/fix_bug_20681

 bug # 20681 delete() function should not remove elements from original list

12 years ago(#20681) delete_at function unit test against issue
Leonardo Rodrigues de Mello [Mon, 16 Sep 2013 13:51:15 +0000 (10:51 -0300)]
(#20681) delete_at function unit test against issue

The issue #20681 describe the error of delete() function
removing the elements from the origin array/hash/string.

This issue affected the other delete functions.

The delete_at function is not afected by this bug, but
it did not had the unit test to check against it.

I had added the unit test so we could prevent regressions
on the future and also have better test coverage.

12 years ago(#20681) fix behaviour of delete_values
Leonardo Rodrigues de Mello [Mon, 16 Sep 2013 13:33:58 +0000 (10:33 -0300)]
(#20681) fix behaviour of delete_values

The issue #20681 describe the error of delete() function
removing the elements from the origin array/hash/string.

This issue affected other delete functions. Because
ruby delete and delete_if functions make destructive
changes to the origin array/hash.

The delete_undef_values removed elements from the
origin hash and this is not the desired behaviour.

To solve this, we should dup or clone the hash
before using the delete or delete_if ruby functions.

This fix the problem and add unit tests, so we could
enforce this behaviour and prevent regressions.

12 years agoMerge pull request #179 from lmello/function_pick_error_msg
Adrien Thebo [Mon, 16 Sep 2013 20:45:24 +0000 (13:45 -0700)]
Merge pull request #179 from lmello/function_pick_error_msg

enhanced the error message of pick function.

12 years agobug # 20681 delete() function should not remove elements from original list
Leonardo Rodrigues de Mello [Mon, 9 Sep 2013 13:27:54 +0000 (10:27 -0300)]
bug # 20681 delete() function should not remove elements from original list

The setup: list with 3 elements, delete one:
$test_list = [‘a’, ‘b’, ‘c’]
$test_deleted = delete($test_list, ‘a’)

Print out the elements in ‘test_deleted’:
notify { ‘group_output2’:  withpath => true, name     => “$cfeng::test_deleted”, }
Notice: /Stage[main]/Syslog/Notify[group_output2]/message: bc

Good!  Run-on output shows that ‘a’ was deleted

Print out the elements in ‘test_list’:
notify { ‘group_output1’: withpath => true, name     => “$cfeng::test_list”, }
Notice: /Stage[main]/Syslog/Notify[group_output1]/message: bc

WHAT!?  'a' was deleted from ‘test_list’ as well! Expected abc as output!

This behaviour is confirmed for string, hash and array.
This is fixed on this commit, I had  added two spec tests to cover that cases.

bug #20681 spec test for delete() function.

I had forgot in the last commit the spec test for hash in the
delete function.

bug # 20681 delete() function change aproach.

Instead of rejecting elements from the original list, we use
collection = arguments[0].dup .
then latter we could continue to use delete and gsub! on collection
without impact on original argument.

this is a better solution than the previous one, and works on ruby
1.8.7, 1.9.3 and 2.0.0.

The previous solution does not work on ruby 1.8.7.

delete function remove typo whitespace.

fix typo whitespaces.

12 years agoenhanced the error message of pick function.
Leonardo Rodrigues de Mello [Fri, 6 Sep 2013 13:53:47 +0000 (10:53 -0300)]
enhanced the error message of pick function.

When pick function fail return a better error message like
the other stdlib functions, indicating that the error
is on function pick.

This would help people that see the error to identity it is
related to a incorrect use of stdlib function pick, instead of having
to grep all puppet libraries and manifests source for the old message.

I had also changed the spec test.

pick function change spec  as suggested GH-179

Fix the spec test to use expect {}.to instead of lambda {}.should
as explained by Adrienthebo.

"Using expect { }.to is preferred over lambda { }.should.
 In addition it's best practice to do a string match against the
error message to ensure that we're catching the right error,
instead of any error of the right type."

Also fixed a typo on the error message, it was missing one space.

pick function stylish fix as suggested on GH179

12 years agoMerge pull request #181 from nibalizer/grammar
Adrien Thebo [Thu, 12 Sep 2013 16:57:28 +0000 (09:57 -0700)]
Merge pull request #181 from nibalizer/grammar

Minor grammar fix

12 years agoMinor grammar fix
Spencer Krum [Wed, 11 Sep 2013 22:37:59 +0000 (15:37 -0700)]
Minor grammar fix

12 years agoMerge pull request #175 from floatingatoll/patch-1
Adrien Thebo [Wed, 11 Sep 2013 18:13:28 +0000 (11:13 -0700)]
Merge pull request #175 from floatingatoll/patch-1

(maint) fix RST formatting of has_interface_with code examples

12 years agoMerge pull request #174 from dprince/file_line_after
Adrien Thebo [Mon, 9 Sep 2013 18:17:16 +0000 (11:17 -0700)]
Merge pull request #174 from dprince/file_line_after

Update file_line resource to support 'after'.

12 years ago(maint) fix RST formatting of has_interface_with code examples
floatingatoll [Wed, 4 Sep 2013 17:26:14 +0000 (10:26 -0700)]
(maint) fix RST formatting of has_interface_with code examples

12 years ago(maint) Improve the tests and readability of file_line
Jeff McCune [Thu, 29 Aug 2013 23:27:27 +0000 (16:27 -0700)]
(maint) Improve the tests and readability of file_line

Without this patch the implementation of the file_line provider is a bit
convoluted with respect to the newly introduced "after" parameter.

This patch addresses the problem by separating out the concerns of each
case into their own methods of handling the behavior with the match
parameter, handling the behavior with the after parameter, or simply
appending the line.

12 years agoUpdate file_line resource to support 'after'.
Dan Prince [Thu, 29 Aug 2013 16:19:16 +0000 (12:19 -0400)]
Update file_line resource to support 'after'.

When adding new lines to a file the 'after' option can be useful
when you need to insert file lines into the middle of a file.

This is particularly helpful when using file_line with sectioned
config files.

NOTE: the after option only works when adding new lines. If you are
updating an existing (matched) line it will simply modify it in place.
This assumes it was in the right place to begin with.

12 years ago(maint) Fix failing spec test with Puppet 3.3.0-rc2
Jeff McCune [Thu, 29 Aug 2013 19:54:14 +0000 (12:54 -0700)]
(maint) Fix failing spec test with Puppet 3.3.0-rc2

Without this patch the stdlib spec tests are failing against recent
versions of Puppet.  The root cause of this problem is a change in the
behavior of create_resources in Puppet 6baa57b.  The change in behavior
caused the :name key to be omitted from the hash returned by
Puppet::Parser::Resource#to_hash which in turn is causing the test
failure.

This patch addresses the problem by updating the test to match the
description of the example.  Only the attribute :ensure is checked
instead of the full hash itself.

12 years ago(maint) Fix location_for helper method
Jeff McCune [Thu, 29 Aug 2013 19:59:44 +0000 (12:59 -0700)]
(maint) Fix location_for helper method

Without this patch the location_for helper method in the Gemfile
incorrectly assumes the mdata variable has a value.  This patch
addresses the problem by explicitly binding the regular expression match
results to the mdata variable to ensure it has a value when accessed by
index.

12 years agoMerge pull request #172 from ptomulik/fix/delete_xxx_spec
Adrien Thebo [Wed, 28 Aug 2013 22:39:32 +0000 (15:39 -0700)]
Merge pull request #172 from ptomulik/fix/delete_xxx_spec

small fix to delete_values_spec.rb and README.markdown

12 years agosmall fix to delete_values_spec.rb and README.markdown
Paweł Tomulik [Wed, 14 Aug 2013 00:23:36 +0000 (02:23 +0200)]
small fix to delete_values_spec.rb and README.markdown

12 years agoMerge pull request #170 from ptomulik/fix_delete_values
Adrien Thebo [Tue, 13 Aug 2013 17:27:42 +0000 (10:27 -0700)]
Merge pull request #170 from ptomulik/fix_delete_values

minor corrections to delete_values()

12 years agoMerge branch 'maint-refactor_validate_slength'
Adrien Thebo [Mon, 12 Aug 2013 19:57:55 +0000 (12:57 -0700)]
Merge branch 'maint-refactor_validate_slength'

12 years ago(maint) Validate input argument in a single location
Adrien Thebo [Mon, 12 Aug 2013 19:52:17 +0000 (12:52 -0700)]
(maint) Validate input argument in a single location

12 years ago(maint) refactor validate_slength tests
Adrien Thebo [Mon, 12 Aug 2013 19:48:46 +0000 (12:48 -0700)]
(maint) refactor validate_slength tests

12 years ago(maint) reindent case statement to match standard indentation
Adrien Thebo [Mon, 12 Aug 2013 18:51:36 +0000 (11:51 -0700)]
(maint) reindent case statement to match standard indentation

12 years ago(maint) collapse String/Array validation into shared lambda
Adrien Thebo [Mon, 12 Aug 2013 18:50:55 +0000 (11:50 -0700)]
(maint) collapse String/Array validation into shared lambda

12 years ago(maint) clean up validate_slength argument validation
Adrien Thebo [Mon, 12 Aug 2013 18:27:56 +0000 (11:27 -0700)]
(maint) clean up validate_slength argument validation

12 years ago(maint) reword error messages for validate_slength
Adrien Thebo [Mon, 12 Aug 2013 18:20:46 +0000 (11:20 -0700)]
(maint) reword error messages for validate_slength

12 years ago(maint) Explicitly unpack validate_slength args
Adrien Thebo [Mon, 12 Aug 2013 18:08:35 +0000 (11:08 -0700)]
(maint) Explicitly unpack validate_slength args

12 years ago(maint) Remove unneeded parens around exceptions
Adrien Thebo [Mon, 12 Aug 2013 18:00:27 +0000 (11:00 -0700)]
(maint) Remove unneeded parens around exceptions

12 years agoMerge pull request #169 from hdeheer/patch-1
Adrien Thebo [Mon, 12 Aug 2013 17:49:47 +0000 (10:49 -0700)]
Merge pull request #169 from hdeheer/patch-1

Fix validate_slength, arg.length should be args[0].length

12 years agominor corrections to delete_values()
Paweł Tomulik [Thu, 8 Aug 2013 14:56:32 +0000 (16:56 +0200)]
minor corrections to delete_values()

12 years agoFix validate_slength, arg.length should be args[0].length
Hubert [Thu, 8 Aug 2013 10:56:12 +0000 (12:56 +0200)]
Fix validate_slength, arg.length should be args[0].length

During a puppet run an error will be thrown and a puppet run will fail completely (when using validate_slength):
undefined local variable or method `arg' for #<Puppet::Parser::Scope:0x7f243c236948>

12 years agoMerge pull request #167 from mhellmic/minlength
Adrien Thebo [Tue, 6 Aug 2013 16:48:44 +0000 (09:48 -0700)]
Merge pull request #167 from mhellmic/minlength

extend the validate_slength function to accept a minimum length

12 years agochanged the validate_slength function to accept a min length
Martin Hellmich [Fri, 28 Jun 2013 16:03:37 +0000 (18:03 +0200)]
changed the validate_slength function to accept a min length

An optional third parameter can be given a min length. The function
then only passes successfully, if all strings are in the range
min_length <= string <= max_length

update and fix function and unit tests

the check for the minlength has to be written differently
because 0 values should be possible. We now check
a) if the input is convertible, and throw a ParseError and
b) if the input .is_a?(Numeric) and ask for a positive number
it's not as clean as for maxlength, but keeps a similar behaviour

refined the error checking for the min length

try to convert to Integer(args[2]) and fail,
if it's not possible

changed the tests accordingly to the new parameter checking

12 years agoMerge pull request #166 from ptomulik/delete_undef_values
Adrien Thebo [Mon, 5 Aug 2013 22:29:08 +0000 (15:29 -0700)]
Merge pull request #166 from ptomulik/delete_undef_values

Add delete_values() and delete_undef_values() functions

12 years agoadded delete_values() and delete_undef_values() functions
Paweł Tomulik [Mon, 29 Jul 2013 09:30:47 +0000 (11:30 +0200)]
added delete_values() and delete_undef_values() functions

12 years agoMerge branch 'uriescape-use_default_escape_list'
Adrien Thebo [Mon, 22 Jul 2013 20:13:13 +0000 (13:13 -0700)]
Merge branch 'uriescape-use_default_escape_list'

This closes GH-164

12 years agoAdjust to use default URI.escape escape list
Tomas Doran [Tue, 2 Jul 2013 10:18:42 +0000 (11:18 +0100)]
Adjust to use default URI.escape escape list

Conform to RFC per comments on: https://github.com/puppetlabs/puppetlabs-stdlib/pull/164

Conflicts:
lib/puppet/parser/functions/uriescape.rb
spec/unit/puppet/parser/functions/uriescape_spec.rb

12 years agoMerge branch 'pull-163'
Adrien Thebo [Thu, 11 Jul 2013 23:26:45 +0000 (16:26 -0700)]
Merge branch 'pull-163'

This closes GH-163

12 years ago(#21416) Allow file_line to match multiple lines
Alex O'Rielly [Fri, 21 Jun 2013 22:33:44 +0000 (17:33 -0500)]
(#21416) Allow file_line to match multiple lines

Without this commit the file_line type will outright fail if multiple
lines match the given regex. This commit allows the file_line type and
provider to optionally match and modify all matching lines.

Changeset rebased into a single commit by Adrien Thebo <adrien@puppetlabs.com>

12 years agoMerge pull request #165 from tigercomputing/fixes/ensure_resource-doc
Adrien Thebo [Thu, 27 Jun 2013 18:19:39 +0000 (11:19 -0700)]
Merge pull request #165 from tigercomputing/fixes/ensure_resource-doc

ensure_resource: fix documentation typo

12 years agoensure_resource: fix documentation typo
Chris Boot [Thu, 27 Jun 2013 16:51:36 +0000 (17:51 +0100)]
ensure_resource: fix documentation typo

12 years agoMerge pull request #158 from wfarr/validate_ip
Adrien Thebo [Fri, 7 Jun 2013 22:06:41 +0000 (15:06 -0700)]
Merge pull request #158 from wfarr/validate_ip

[#20862] Add functions to validate ipv4 and ipv6 addresses

12 years agoMerge branch 'pull-56'
Adrien Thebo [Tue, 28 May 2013 18:17:29 +0000 (11:17 -0700)]
Merge branch 'pull-56'

12 years ago(maint) Remove syntax decoration from range_spec
Adrien Thebo [Tue, 28 May 2013 18:17:00 +0000 (11:17 -0700)]
(maint) Remove syntax decoration from range_spec

12 years ago(maint) Clean up range_spec error expectation
Adrien Thebo [Tue, 28 May 2013 18:14:28 +0000 (11:14 -0700)]
(maint) Clean up range_spec error expectation

Replace `lambda` with `expect` for making an error expectation

Add an explicit error message in expectation

12 years ago(maint) Use present tense in range_spec messages
Adrien Thebo [Tue, 28 May 2013 18:13:20 +0000 (11:13 -0700)]
(maint) Use present tense in range_spec messages

12 years ago(maint) split up range spec with describe blocks
Adrien Thebo [Tue, 28 May 2013 18:11:50 +0000 (11:11 -0700)]
(maint) split up range spec with describe blocks

12 years agoMerge remote-tracking branch 'pr/56' into pull-56
Adrien Thebo [Tue, 28 May 2013 18:03:51 +0000 (11:03 -0700)]
Merge remote-tracking branch 'pr/56' into pull-56

Conflicts:
lib/puppet/parser/functions/range.rb
spec/unit/puppet/parser/functions/range_spec.rb

12 years agoMerge pull request #159 from fiddyspence/feature/base64
Adrien Thebo [Fri, 24 May 2013 16:40:50 +0000 (09:40 -0700)]
Merge pull request #159 from fiddyspence/feature/base64

Adding base64 function

12 years agoAdding base64 function
fiddyspence [Fri, 24 May 2013 15:33:24 +0000 (16:33 +0100)]
Adding base64 function

Adding base64 function and spec test.  Included a bonus fix to
validate_slength_spec.rb to put the expectation message in the right
place.

12 years agoDon't run certain tests under 1.8.7
Will Farrington [Thu, 23 May 2013 00:43:37 +0000 (17:43 -0700)]
Don't run certain tests under 1.8.7

12 years agoUpdate ipv6 examples
Will Farrington [Thu, 23 May 2013 00:37:08 +0000 (17:37 -0700)]
Update ipv6 examples

12 years agoRuby 2.0 introduces IPAddr::InvalidAddressError
Will Farrington [Thu, 23 May 2013 00:19:03 +0000 (17:19 -0700)]
Ruby 2.0 introduces IPAddr::InvalidAddressError

12 years agoAdd functions to validate ipv4 and ipv6 addresses
Will Farrington [Thu, 23 May 2013 00:10:45 +0000 (17:10 -0700)]
Add functions to validate ipv4 and ipv6 addresses

12 years agoMerge pull request #157 from rohanrns/master
Hailee Kenney [Mon, 20 May 2013 16:17:11 +0000 (09:17 -0700)]
Merge pull request #157 from rohanrns/master

Trivial documentation fix for upcase function.

12 years agoTrivial documentation fix
Rohan Sheth [Sat, 18 May 2013 18:48:41 +0000 (11:48 -0700)]
Trivial documentation fix

12 years agoMerge pull request #155 from AlexCline/feature/master/array_comparison_functions
Hailee Kenney [Wed, 15 May 2013 20:56:15 +0000 (13:56 -0700)]
Merge pull request #155 from AlexCline/feature/master/array_comparison_functions

(#20684) Add array comparison functions, difference, intersection and union

12 years agoMerge pull request #147 from mhellmic/master
Adrien Thebo [Wed, 15 May 2013 17:58:04 +0000 (10:58 -0700)]
Merge pull request #147 from mhellmic/master

don't fail on undef variable in merge

12 years ago(#20684) Add array comparison functions, difference, intersection and union.
Alex Cline [Mon, 13 May 2013 16:09:33 +0000 (12:09 -0400)]
(#20684) Add array comparison functions, difference, intersection and union.

Included is code, tests and documentation for the difference, intersection
and union functions for comparing arrays.

12 years agoMerge branch 'puppetlabs-release/four_one_oh'
Jeff McCune [Fri, 10 May 2013 21:23:58 +0000 (14:23 -0700)]
Merge branch 'puppetlabs-release/four_one_oh'

* puppetlabs-release/four_one_oh:
  Update Modulefile, CHANGELOG for version 4.1.0

closes #154

12 years agoUpdate Modulefile, CHANGELOG for version 4.1.0
Ryan Coleman [Fri, 10 May 2013 16:54:39 +0000 (09:54 -0700)]
Update Modulefile, CHANGELOG for version 4.1.0

This commit alters the module metadata to indicate a 4.1.0 version
release for the Puppet Forge. It contains backwards compatible
features, refactors and bug fixes.

CHANGELOG updated by JJM

12 years agoAdded rspec tests for the new behaviour of merge accepting empty strings
Martin Hellmich [Wed, 8 May 2013 16:20:56 +0000 (18:20 +0200)]
Added rspec tests for the new behaviour of merge accepting empty strings

added test that '' is accepted
changed a test that a number is correctly rejected with a type error

12 years agofix in merge.rb: refine the checking if an argument is an empty string
Martin Hellmich [Wed, 8 May 2013 15:14:28 +0000 (17:14 +0200)]
fix in merge.rb: refine the checking if an argument is an empty string

12 years agoMerge branch 'fix_facts_dot_d_with_pe'
Jeff McCune [Tue, 7 May 2013 19:10:06 +0000 (12:10 -0700)]
Merge branch 'fix_facts_dot_d_with_pe'

* fix_facts_dot_d_with_pe:
  (maint) Indent facter_dot_d with 2 spaces
  (#20582) Restore facter_dot_d to stdlib for PE users
  Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""
  (maint) Update Gemfile with GEM_FACTER_VERSION

closes #153

12 years ago(maint) Indent facter_dot_d with 2 spaces
Jeff McCune [Tue, 7 May 2013 16:44:43 +0000 (09:44 -0700)]
(maint) Indent facter_dot_d with 2 spaces

Whitespace only re-flow of facter_dot_d.rb

12 years ago(#20582) Restore facter_dot_d to stdlib for PE users
Jeff McCune [Mon, 6 May 2013 23:29:35 +0000 (16:29 -0700)]
(#20582) Restore facter_dot_d to stdlib for PE users

Without this patch Puppet Enterprise users who install the most recent
version of stdlib lose the ability to resolve certain facts critical to
the operation of Puppet Enterprise.  These facts are defined externally
in the file
`/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`.
As an example, Puppet Enterprise catalogs fail to compile if the
`fact_stomp_server`, and `fact_stomp_port` facts are not defined.

`facter_dot_d` was removed from stdlib version 4 because Facter version
1.7 now supports external facts defined in
`/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`.
Puppet Enterprise does not yet include Facter 1.7, however.  The most
recent PE release, 2.8.1, includes Facter 1.6.17.  With this version of
Facter, users who replace the version of stdlib that ships with PE with
the most recent version from the Forge will lose the ability to resolve
facts from
`/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`.

This patch addresses the problem by detecting if Facter version < 1.7 is
loaded.  If so, then the facter_dot_d.rb facts will be defined using the
stdlib custom fact.  If Facter >= 1.7 is being used then stdlib will not
define external facts.

12 years agoRevert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""
Jeff McCune [Mon, 6 May 2013 21:54:46 +0000 (14:54 -0700)]
Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""

This reverts commit 8fc00ea5b6b39b220ebc6391489915dbeeb364ab.

We're restoring facts_dot_d support to stdlib because users are pulling
in the latest version of stdlib while on Puppet Enterprise which breaks
the operation of PE itself when the fact_stomp_server and
fact_stomp_port facts are not defined.  They are not defined in PE
because PE runs with Facter 1.6.17 and Puppet 2.7.21

12 years ago(maint) Update Gemfile with GEM_FACTER_VERSION
Jeff McCune [Mon, 6 May 2013 23:22:59 +0000 (16:22 -0700)]
(maint) Update Gemfile with GEM_FACTER_VERSION

Without this patch we cannot explicitly set the version of Facter to
integrate using Bundler.  This patch addresses the problem by adding a
new environment variable, GEM_FACTER_VERSION which allows bundler to
install a specific version of Facter.  GEM_FACTER_VERSION is the
variable name instead of FACTER_GEM_VERSION to prevent the gem_version
fact from being defined.  In addition, GEM_PUPPET_VERSION is defined
based on PUPPET_GEM_VERSION in order to match the environment names and
provide backwards compatibility with CI jobs.

12 years agoMerge pull request #152 from AlexCline/feature/master/allow_arrays_in_ensure_resource
Adrien Thebo [Mon, 6 May 2013 23:54:17 +0000 (16:54 -0700)]
Merge pull request #152 from AlexCline/feature/master/allow_arrays_in_ensure_resource

(#20548) Allow an array of resource titles to be passed into the ensure_...

12 years agoTerser method of string to array conversion courtesy of ethooz.
Alex Cline [Mon, 6 May 2013 20:16:38 +0000 (16:16 -0400)]
Terser method of string to array conversion courtesy of ethooz.

12 years agoRefactor ensure_resource expectations
Alex Cline [Mon, 6 May 2013 19:30:35 +0000 (15:30 -0400)]
Refactor ensure_resource expectations

This splits out the ensure_resource expectations into separate
blocks for clarity.  Per adrienthebo's recommendation.

12 years agoChanged str-to-array conversion and removed abbreviation.
Alex Cline [Mon, 6 May 2013 17:52:57 +0000 (13:52 -0400)]
Changed str-to-array conversion and removed abbreviation.

12 years ago(#20548) Allow an array of resource titles to be passed into the ensure_resource...
Alex Cline [Fri, 3 May 2013 19:47:27 +0000 (15:47 -0400)]
(#20548) Allow an array of resource titles to be passed into the ensure_resource function

This patch allows an array of resource titles to be passed into
the ensure_resource function.  Each item in the array will be
checked for existence and will be created if it doesn't already
exist.

12 years agoMerge pull request #150 from raphink/dev/dirname_function
Adrien Thebo [Thu, 2 May 2013 22:17:32 +0000 (15:17 -0700)]
Merge pull request #150 from raphink/dev/dirname_function

Add a dirname function

12 years agoAdd a dirname function
Raphaël Pinson [Thu, 2 May 2013 13:10:59 +0000 (15:10 +0200)]
Add a dirname function

12 years agoMerge branch 'msmithgu-small-typo-fix'
Jeff McCune [Tue, 30 Apr 2013 00:18:09 +0000 (17:18 -0700)]
Merge branch 'msmithgu-small-typo-fix'

* msmithgu-small-typo-fix:
  (maint) Fix a small typo in hash() description

closes #148

12 years ago(maint) Fix a small typo in hash() description
Mark Smith-Guerrero [Mon, 29 Apr 2013 13:19:07 +0000 (09:19 -0400)]
(maint) Fix a small typo in hash() description

12 years agocheck if an argument supposed to be merged is empty to
Martin Hellmich [Mon, 22 Apr 2013 21:26:22 +0000 (23:26 +0200)]
check if an argument supposed to be merged is empty to
pass over undefs without failing

12 years agoMerge branch 'master' of git://github.com/puppetlabs/puppetlabs-stdlib
Martin Hellmich [Mon, 22 Apr 2013 21:24:38 +0000 (23:24 +0200)]
Merge branch 'master' of git://github.com/puppetlabs/puppetlabs-stdlib

12 years agoMerge branch 'update_gemspec' for 4.0.2
Jeff McCune [Fri, 12 Apr 2013 17:12:16 +0000 (10:12 -0700)]
Merge branch 'update_gemspec' for 4.0.2

* update_gemspec:
  Update gemspec, Modulefile, CHANGELOG for 4.0.2

closes #145
[ci skip]

12 years agoUpdate gemspec, Modulefile, CHANGELOG for 4.0.2
Jeff McCune [Fri, 12 Apr 2013 16:23:34 +0000 (09:23 -0700)]
Update gemspec, Modulefile, CHANGELOG for 4.0.2

Without this patch the information displayed on rubygems.org does not
clearly convey the intent of the Gem format of stdlib from the official
puppet module format of stdlib.  This is a problem because end users
might get confused and start installing stdlib from rubygems.org

This patch addresses the problem by making it clear that the gem version
of stdlib is not intended for end users, but rather is specifically
intended to make it easier for other module authors to depend on stdlib
and have that dependency automatically resolved using a Gemfile.

[ci skip]

12 years agoMerge pull request #144 from ghoneycutt/compat_matrix
Jeff McCune [Fri, 12 Apr 2013 16:40:24 +0000 (09:40 -0700)]
Merge pull request #144 from ghoneycutt/compat_matrix

adds compatibility matrix

12 years agoadds compatibility matrix
Garrett Honeycutt [Fri, 12 Apr 2013 11:04:15 +0000 (13:04 +0200)]
adds compatibility matrix

12 years agoMerge branch 'philandstuff-master'
Jeff McCune [Fri, 12 Apr 2013 00:57:27 +0000 (17:57 -0700)]
Merge branch 'philandstuff-master'

* philandstuff-master:
  Add behavior example for anchor refresh propagation
  Make the anchor type propagate refresh events

closes #78

12 years agoAdd behavior example for anchor refresh propagation
Jeff McCune [Fri, 12 Apr 2013 00:55:40 +0000 (17:55 -0700)]
Add behavior example for anchor refresh propagation

Without this patch we don't have a spec test to make sure the anchor
resource type passes notify events along.  This patch addresses the
problem by using RSpec Puppet to build a catalog, apply the catalog,
then pull a resource out of the transaction and make sure the resource
was triggered.

12 years agoMake the anchor type propagate refresh events
Philip Potter [Thu, 12 Jul 2012 16:05:23 +0000 (17:05 +0100)]
Make the anchor type propagate refresh events

Without this patch the anchor resource does not propogate refresh
events, making it difficult to subscribe to a class which has been
notified by another resource.

12 years agoMerge branch 'cprice-puppet-ticket/master/13695-readme-about-puppetlabs-spec-helper'
Jeff McCune [Thu, 11 Apr 2013 23:42:58 +0000 (16:42 -0700)]
Merge branch 'cprice-puppet-ticket/master/13695-readme-about-puppetlabs-spec-helper'

* cprice-puppet-ticket/master/13695-readme-about-puppetlabs-spec-helper:
  (#13695) add README about puppetlabs_spec_helper

[ci skip]
closes #63

12 years ago(#13695) add README about puppetlabs_spec_helper
Chris Price [Fri, 13 Apr 2012 22:35:43 +0000 (15:35 -0700)]
(#13695) add README about puppetlabs_spec_helper

12 years agoUpdate gemspec, CHANGELOG, Modulefile for 4.0.1
Jeff McCune [Thu, 11 Apr 2013 21:31:29 +0000 (14:31 -0700)]
Update gemspec, CHANGELOG, Modulefile for 4.0.1

12 years agoFix README function documentation
Jeff McCune [Thu, 11 Apr 2013 21:29:56 +0000 (14:29 -0700)]
Fix README function documentation

Without this patch some core puppet functions leaked into the
documentation for the functions contained in stdlib.  This patch removes
them and cleans up some of the formatting.

12 years agoMerge branch stdlib 4.0.0 release
Jeff McCune [Thu, 11 Apr 2013 21:16:57 +0000 (14:16 -0700)]
Merge branch stdlib 4.0.0 release

* v4:
  Update gemspec for 4.0.0
  Update function documentation for 4.0.0
  Update Modulefile, README, CHANGELOG for stdlib-4.0.0

12 years agoUpdate gemspec for 4.0.0
Jeff McCune [Thu, 11 Apr 2013 21:14:02 +0000 (14:14 -0700)]
Update gemspec for 4.0.0

12 years agoUpdate function documentation for 4.0.0
Jeff McCune [Thu, 11 Apr 2013 21:04:31 +0000 (14:04 -0700)]
Update function documentation for 4.0.0

Without this patch the function documentation is out of sync with the
functions contained in the standard library.  This commit updates the
functions.  I generated the list using this sequence:

    cd ~/src/puppet
    git checkout 3.1.1
    bundle exec puppet doc -r function > /tmp/puppet_functions.txt
    cd ~/src/stdlib
    bundle exec puppet doc -r function > /tmp/stdlib_functions.txt
    diff -U2 puppet_functions.txt stdlib_functions.txt | grep '^+' | perl -ple 's/^\+//' > functions.txt

I then replaced the README function documentation with the contents of
functions.txt which contains only the functions contained in stdlib.

12 years agoUpdate Modulefile, README, CHANGELOG for stdlib-4.0.0
Jeff McCune [Thu, 11 Apr 2013 20:44:05 +0000 (13:44 -0700)]
Update Modulefile, README, CHANGELOG for stdlib-4.0.0

12 years agoAdd ability to use puppet from git via bundler
Jeff McCune [Thu, 11 Apr 2013 16:49:53 +0000 (09:49 -0700)]
Add ability to use puppet from git via bundler

Without this patch the Gemfile can only satisfy dependencies using
officially release gem versions.  This is a problem because we want to
test stdlib against the latest HEAD of the puppet git repository.

This patch addresses the problem by copying over the location_for method
from the Puppet Gemfile, which will parse out git://, file:// or Gem
version specifications.

This, in turn, allows jobs to be configured to run with different
dependency integrations.