]> gitweb.fluxo.info Git - puppet-stdlib.git/log
puppet-stdlib.git
13 years agoDisable tests that fail on 2.6.x due to #15912
Patrick Carlisle [Fri, 10 Aug 2012 18:43:36 +0000 (11:43 -0700)]
Disable tests that fail on 2.6.x due to #15912

In Puppet 2.6.x there is a bug where a function may be incorrectly detected as
an rvalue when it is not, or not detected when it is. This means that in tests
the correct syntax for calling a function will be rejected. This disables
those tests on 2.6.x, as there is no straightforward way to write them to be
compatible with both 2.6.x and newer versions of Puppet.

13 years agoUse rvalue functions correctly
Patrick Carlisle [Thu, 9 Aug 2012 21:18:30 +0000 (14:18 -0700)]
Use rvalue functions correctly

A bug fix in Puppet exposed that several tests were using rvalue functions
incorrectly (this was not properly checked by puppet before). This fixes those
tests.

13 years agoMerge pull request #81 from jeffmccune/maint/2.2.x/rename_seams_to_internals
Jeff McCune [Mon, 23 Jul 2012 15:51:13 +0000 (08:51 -0700)]
Merge pull request #81 from jeffmccune/maint/2.2.x/rename_seams_to_internals

(Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals}

13 years ago(Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals}
Jeff McCune [Mon, 23 Jul 2012 15:28:06 +0000 (08:28 -0700)]
(Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals}

The module PuppetlabsSpec::PuppetSeams has been renamed in the
puppetlabs_spec_helper gem to PuppetlabsSpec::PuppetInternals.

The method to obtain a scope object has also changed slightly.  Without
this patch the spec tests will fail because the stdlib module is not
aligned with the spec helper gem.  This patch fixes the problem by
matching up messages with their receivers in the spec helper library.

Paired-with: Andrew Parker <andy@puppetlabs.com>

13 years agoMerge branch 'fix/2.2.x/make_it_green' into 2.2.x
Jeff McCune [Thu, 19 Jul 2012 23:36:26 +0000 (16:36 -0700)]
Merge branch 'fix/2.2.x/make_it_green' into 2.2.x

* fix/2.2.x/make_it_green:
  (Maint) use PuppetlabsSpec::PuppetSeams.parser_scope
  (Maint) Fix interpreter lines

13 years ago(Maint) use PuppetlabsSpec::PuppetSeams.parser_scope
Jeff McCune [Thu, 19 Jul 2012 23:14:37 +0000 (16:14 -0700)]
(Maint) use PuppetlabsSpec::PuppetSeams.parser_scope

Without this patch all of the spec tests for parser functions in stdlib
would instantiate their own scope instances.  This is a problem because
the standard library is tightly coupled with the internal behavior of
Puppet.  Tight coupling like this creates failures when we change the
internal behavior of Puppet.  This is exactly what happened recently
when we changed the method signature for the initializer of
Puppet::Parser::Scope instances.

This patch fixes the problem by creating scope instances using the
puppet labs spec helper.  The specific method that provides scope
instances in Puppet-version-independent way is something like this:

 let(:scope) { PuppetlabsSpec::PuppetSeams.parser_scope }

This patch simply implements this across the board.

13 years ago(Maint) Fix interpreter lines
Jeff McCune [Thu, 19 Jul 2012 22:27:52 +0000 (15:27 -0700)]
(Maint) Fix interpreter lines

This time around I actually know why I'm doing this thanks to the
reminder from Nick Lewis.

Ruby will replace itself in memory with the executable listed in the
interpreter line if the string "ruby" is not in there.

Since /usr/bin/env rspec doesn't contain the substring "ruby", you can't
actually run ruby -W1 or whatever on the file.

This patch fixes the problem by making sure "ruby" is present,
preventing ruby from replacing itself in memory.

13 years agoFix spec tests using the new spec_helper
Jeff McCune [Fri, 11 May 2012 05:01:40 +0000 (22:01 -0700)]
Fix spec tests using the new spec_helper

This patch back ports the file from the master branch.  The spec tests
fail without this patch applied.  This should make it easier to setup
Puppet settings using the puppet_spec_helper project.

13 years agoRevert "Merge remote-tracking branch 'eshamow/tickets/bug/13595_restrict_initialize_e...
Jeff McCune [Wed, 4 Apr 2012 12:56:35 +0000 (08:56 -0400)]
Revert "Merge remote-tracking branch 'eshamow/tickets/bug/13595_restrict_initialize_everything_for_tests' into 2.2.x"

This reverts commit 40da421c0480f940638d0db9aabf180500d6ae5c, reversing
changes made to 69465b0f3e0c0c5284812bfa76ab8d3c254d10a9.

13 years agoMerge remote-tracking branch 'eshamow/tickets/bug/13595_restrict_initialize_everythin...
Jeff McCune [Wed, 4 Apr 2012 12:47:06 +0000 (08:47 -0400)]
Merge remote-tracking branch 'eshamow/tickets/bug/13595_restrict_initialize_everything_for_tests' into 2.2.x

* eshamow/tickets/bug/13595_restrict_initialize_everything_for_tests:
  (#13595) initialize_everything_for_tests couples modules Puppet ver

13 years ago(#13595) initialize_everything_for_tests couples modules Puppet ver
Eric Shamow [Wed, 4 Apr 2012 03:26:36 +0000 (23:26 -0400)]
(#13595) initialize_everything_for_tests couples modules Puppet ver

Replace regex used in spec_helper.rb to disallow both Puppet 2.6 and any
2.7 prior to 13.

13 years agoMerge branch 'ticket/2.2.x/13439_fix_spec_helper_try3' into 2.2.x
Jeff McCune [Fri, 30 Mar 2012 06:18:39 +0000 (23:18 -0700)]
Merge branch 'ticket/2.2.x/13439_fix_spec_helper_try3' into 2.2.x

* ticket/2.2.x/13439_fix_spec_helper_try3:
  (#13439) Fix MRI 1.9 issue with spec_helper

13 years ago(#13439) Fix MRI 1.9 issue with spec_helper
Jeff McCune [Fri, 30 Mar 2012 06:04:12 +0000 (23:04 -0700)]
(#13439) Fix MRI 1.9 issue with spec_helper

When using MRI 1.9.x the stdlib spec helper does not invoke because
Puppet.settings.private_methods returns symbols instead of strings.

This is a problem because we need to set default configuration settings
like Puppet[:vardir] when using the compiler.

This patch fixes the issue by simply checking the Puppet version.  This
seems a better choice than rescuing NoMethodError since the method might
be renamed or removed in the future.

13 years agoMerge branch 'ticket/2.2.x/13439_fix_spec_helper_try2' into 2.2.x
Jeff McCune [Thu, 29 Mar 2012 23:54:42 +0000 (16:54 -0700)]
Merge branch 'ticket/2.2.x/13439_fix_spec_helper_try2' into 2.2.x

* ticket/2.2.x/13439_fix_spec_helper_try2:
  (#13439) Fix test failures with Puppet 2.6.x

13 years ago(#13439) Fix test failures with Puppet 2.6.x
Jeff McCune [Thu, 29 Mar 2012 23:52:15 +0000 (16:52 -0700)]
(#13439) Fix test failures with Puppet 2.6.x

Without this patch the spec_helper sends a message named
initialize_everything_for_tests to Puppet.settings.  This is a problem
because Puppet 2.6.x does not have this method, only Puppet 2.7.x and
Puppet master have this method at this time and we're getting false
positive test failures.

This patch fixes the problem by looking before we leap.  We test if the
private method exists before calling it.  This works with Ruby 1.8.5 and
onwards and Puppet 2.6, 2.7 and master.

This should fix all of the failures I've caused in Jenkins today.

13 years agoMerge branch 'ticket/2.2.x/13439_fix_spec_helper' into 2.2.x
Jeff McCune [Thu, 29 Mar 2012 23:25:55 +0000 (16:25 -0700)]
Merge branch 'ticket/2.2.x/13439_fix_spec_helper' into 2.2.x

* ticket/2.2.x/13439_fix_spec_helper:
  (#13439) refactor spec helper for compatibility with both puppet 2.7 and master

13 years ago(#13439) refactor spec helper for compatibility with both puppet 2.7 and
cprice [Tue, 27 Mar 2012 17:38:38 +0000 (10:38 -0700)]
(#13439) refactor spec helper for compatibility with both puppet 2.7 and
master

13 years agoMerge branch '2.1.x' into 2.2.x
Jeff McCune [Thu, 29 Mar 2012 22:19:21 +0000 (15:19 -0700)]
Merge branch '2.1.x' into 2.2.x

* 2.1.x:
  Update CHANGELOG, Modulefile for 2.1.3

Conflicts:
CHANGELOG
Modulefile

13 years agoMerge branch 'maint/2.2.x/range_spec_tests' into 2.2.x
Jeff McCune [Thu, 29 Mar 2012 22:17:48 +0000 (15:17 -0700)]
Merge branch 'maint/2.2.x/range_spec_tests' into 2.2.x

* maint/2.2.x/range_spec_tests:
  (#13494) Specify the behavior of zero padded strings

13 years ago(#13494) Specify the behavior of zero padded strings
Jeff McCune [Thu, 29 Mar 2012 22:12:06 +0000 (15:12 -0700)]
(#13494) Specify the behavior of zero padded strings

Without this patch the specified behavior of strings that are numeric
only and zero padded is unclear and untested in the spec tests.  This is
a problem because it's not clear that range('00', '10') will actually
return [ "0", "1", ..., "10" ] instead of [ "00", "01", ..., "10" ]

This patch addresses the issue by providing explicit test coverage.  If
the string conversion behavior of puppet changes, this test will begin
to fail.

13 years agoUpdate CHANGELOG, Modulefile for 2.1.3
Jeff McCune [Thu, 29 Mar 2012 16:43:20 +0000 (09:43 -0700)]
Update CHANGELOG, Modulefile for 2.1.3

13 years agoMerge branch '2.1.x' into 2.2.x
Ken Barber [Tue, 7 Feb 2012 13:37:16 +0000 (13:37 +0000)]
Merge branch '2.1.x' into 2.2.x

* 2.1.x:
  (#12377) Avoid infinite loop when retrying require json

13 years agoMerge branch 'ticket/2.2.x/12377_stdlib_facter_dot_d_loaderror_recovery_may_be_harmfu...
Ken Barber [Mon, 6 Feb 2012 17:55:43 +0000 (17:55 +0000)]
Merge branch 'ticket/2.2.x/12377_stdlib_facter_dot_d_loaderror_recovery_may_be_harmful' into 2.1.x

* ticket/2.2.x/12377_stdlib_facter_dot_d_loaderror_recovery_may_be_harmful:
  (#12377) Avoid infinite loop when retrying require json

13 years ago(#12377) Avoid infinite loop when retrying require json
Jeff McCune [Mon, 6 Feb 2012 05:22:27 +0000 (21:22 -0800)]
(#12377) Avoid infinite loop when retrying require json

Without this patch an infinite loop will be entered if the json and
rubygems libraries are not available.

This patch fixes the problem by retrying the `require 'json'` only if
rubygems was successfully loaded for the first time.  Subsequent
attempts to load rubygems will cause the LoadError exception from a
missing json library to be re-raised.

Thanks to Krzysztof Wilczynski for pointing out this issue.

14 years agoMerge branch 'bug/2.2.x/is_domain_name' into 2.2.x
Jeff McCune [Thu, 12 Jan 2012 03:19:02 +0000 (19:19 -0800)]
Merge branch 'bug/2.2.x/is_domain_name' into 2.2.x

* bug/2.2.x/is_domain_name:
  Check according to rfc1035
  Add additional domain name tests
  (maint) Memoize scope in domain_name spec

Closes pull request GH-24

14 years agoCheck according to rfc1035
Stig Sandbeck Mathisen [Wed, 9 Nov 2011 08:02:09 +0000 (09:02 +0100)]
Check according to rfc1035

Update doc string to match function

14 years agoAdd additional domain name tests
Jeff McCune [Thu, 12 Jan 2012 03:15:04 +0000 (19:15 -0800)]
Add additional domain name tests

Without this patch some valid domain names are not covered in the spec
tests as Stig Sandbeck Mathisen <ssm@debian.org> points out.  This patch
adds spec tests for the domains "." and "x.com" which are both valid.

14 years ago(maint) Memoize scope in domain_name spec
Jeff McCune [Thu, 12 Jan 2012 02:55:21 +0000 (18:55 -0800)]
(maint) Memoize scope in domain_name spec

This is an opportunity improvement since I'm in the code.  Get rid of
instance variables in the spec test and replace them with a memo let
method block.

14 years agoMerge branch 'ticket/2.2.x/11901-rspec_sort_order' into 2.2.x
Jeff McCune [Thu, 12 Jan 2012 01:48:30 +0000 (17:48 -0800)]
Merge branch 'ticket/2.2.x/11901-rspec_sort_order' into 2.2.x

* ticket/2.2.x/11901-rspec_sort_order:
  (#11901) Fix sort order error in tests for 'keys' and 'values'

14 years ago(#11901) Fix sort order error in tests for 'keys' and 'values'
Jeff McCune [Thu, 12 Jan 2012 01:39:15 +0000 (17:39 -0800)]
(#11901) Fix sort order error in tests for 'keys' and 'values'

Between Ruby 1.8.7 p352 and p357 the way arrays were returned when using
keys and values in Ruby changed, and due to assumption about the
ordering our tests are now failing.

This patch fixes the issue by using the =~ operator matcher in rspec.
This matcher is implemented as RSpec::Matchers::MatchArray and performs
multiset equality matching of arrays.  Order doesn't matter, but
duplicate values do.

This patch also switches @scope instance variables to memoized let
methods for clarity in the code.

Original Author: Ken Barber
Reviewed-by: Nick Lewis
This commit closes GH-29

14 years agoMerge pull request #28 from kbarber/ticket/2.2.x/11873-time_spec_failure
Daniel Pittman [Tue, 10 Jan 2012 19:01:32 +0000 (11:01 -0800)]
Merge pull request #28 from kbarber/ticket/2.2.x/11873-time_spec_failure

(#11873) time function spec failure on Fixnum matcher

14 years ago(#11873) time function spec failure on Fixnum matcher
Ken Barber [Tue, 10 Jan 2012 18:58:07 +0000 (18:58 +0000)]
(#11873) time function spec failure on Fixnum matcher

The rspec code for the time function was trying to match the type to be a
'Fixnum'. Ruby will sometimes make this a 'Bignum' depending on its internals
and we can't rely on this to be true all the time.

This patch just makes sure the type is an integer instead.

14 years agoMerge branch '2.1.x' into 2.2.x
Jeff McCune [Fri, 30 Dec 2011 23:49:41 +0000 (15:49 -0800)]
Merge branch '2.1.x' into 2.2.x

* 2.1.x:
  (#11607) Add Rakefile to enable spec testing

14 years agoMerge pull request #26 from jeffmccune/ticket/2.1.x/11607_fix_ci_tests_for_stdlib
Jeff McCune [Fri, 30 Dec 2011 23:49:03 +0000 (15:49 -0800)]
Merge pull request #26 from jeffmccune/ticket/2.1.x/11607_fix_ci_tests_for_stdlib

(#11607) Add Rakefile to enable spec testing

14 years ago(#11607) Add Rakefile to enable spec testing
Jeff McCune [Fri, 30 Dec 2011 23:45:00 +0000 (15:45 -0800)]
(#11607) Add Rakefile to enable spec testing

Without this patch the 2.1.x branch does not have a Rakefile like the
2.2.x and master branches do.  This is a problem for the continuous
integration testing since it executes `rake test` against 2.1.x, 2.2.x
and master currently.

This patch fixes the problem by copying the Rakefile into place enabling
the `rake test` task.

Reviewed-by: Josh Cooper
14 years agoUpdate CHANGELOG and Modulefile for 2.2.1
Jeff McCune [Fri, 30 Dec 2011 20:21:21 +0000 (12:21 -0800)]
Update CHANGELOG and Modulefile for 2.2.1

14 years agoMerge branch '2.1.x' into 2.2.x
Jeff McCune [Fri, 30 Dec 2011 20:19:15 +0000 (12:19 -0800)]
Merge branch '2.1.x' into 2.2.x

* 2.1.x:
  Update Modulefile CHANGELOG for v2.1.2 release

Conflicts:
CHANGELOG
Modulefile

14 years agoUpdate Modulefile CHANGELOG for v2.1.2 release
Jeff McCune [Fri, 30 Dec 2011 20:05:15 +0000 (12:05 -0800)]
Update Modulefile CHANGELOG for v2.1.2 release

14 years agoMerge branch 'v2.1.x' into v2.2.x
Jeff McCune [Fri, 30 Dec 2011 19:48:21 +0000 (11:48 -0800)]
Merge branch 'v2.1.x' into v2.2.x

* v2.1.x:
  (maint) Add semantic versioning info to README
  Docs: Clarify the use case for the anchor type
  Docs: Remove author emails from stdlib functions
  Docs: Copyedit function doc strings
  Docs: Correct indentation of markdown code examples
  Docs: Update documentation of stdlib classes
  Docs: Update file_line documentation
  Docs: Improve example in merge function

14 years ago(maint) Add semantic versioning info to README
Jeff McCune [Fri, 30 Dec 2011 19:46:21 +0000 (11:46 -0800)]
(maint) Add semantic versioning info to README

This patch adds semantic versioning information to the README of this
module.  This information is missing and unclear without this patch.
This should help clarify the support matrix for the Standard Library as
it relates to Puppet Enterprise released versions.

14 years agoMerge pull request #21 from puppetlabs/v2.2
Garrett Honeycutt [Tue, 8 Nov 2011 22:20:09 +0000 (14:20 -0800)]
Merge pull request #21 from puppetlabs/v2.2

 * v2.x:

14 years ago * v2.x:
James Turnbull [Tue, 8 Nov 2011 22:16:11 +0000 (14:16 -0800)]
 * v2.x:
      Update CHANGELOG and Modulefile for v2.2.0

14 years agoMerge pull request #19 from nanliu/ticket/10285
Ken Barber [Tue, 25 Oct 2011 23:31:47 +0000 (16:31 -0700)]
Merge pull request #19 from nanliu/ticket/10285

(#10285) Refactor json to use pson instead.

14 years ago(#10285) Refactor json to use pson instead.
Nan Liu [Tue, 25 Oct 2011 22:54:47 +0000 (15:54 -0700)]
(#10285) Refactor json to use pson instead.

Remove json requirement since puppet already provides pson which is
equivalent.

14 years agoMerge branch 'main/mater/watchr'
Jeff McCune [Mon, 10 Oct 2011 19:06:33 +0000 (12:06 -0700)]
Merge branch 'main/mater/watchr'

* main/mater/watchr:
  (Maint) Add watchr autotest script

14 years ago(Maint) Add watchr autotest script
Jeff McCune [Mon, 10 Oct 2011 19:03:57 +0000 (12:03 -0700)]
(Maint) Add watchr autotest script

This patch adds a watchr script to autotest the stdlib module.  To use:

    % watchr spec/watchr.rb

14 years agoMerge pull request #18 from jeffmccune/maint/master/make_tests_run_on_puppet_26
Jeff McCune [Mon, 10 Oct 2011 19:02:34 +0000 (12:02 -0700)]
Merge pull request #18 from jeffmccune/maint/master/make_tests_run_on_puppet_26

(Maint) Make rspec tests work with Puppet 2.6.4

14 years ago(Maint) Make rspec tests work with Puppet 2.6.4
Jeff McCune [Mon, 10 Oct 2011 18:58:48 +0000 (11:58 -0700)]
(Maint) Make rspec tests work with Puppet 2.6.4

The behavior without this patch applied is that the rspec tests do not
function with Puppet 2.6.4.  This patch back-ports some fixes introduced
in Puppet 2.7.x to the spec_helper to make the tests work as expected on
Puppet 2.6.4.

The specific patches back ported from Puppet are:

 * 2ae88067 (Puppet::Util::ExecutionStub.reset)
 * cf183534 (Switched spec tests to use a class rather than Array as the
             log destination.)

14 years agoMerge branch 'ticket/master/revert_8925'
Jeff McCune [Mon, 10 Oct 2011 18:52:33 +0000 (11:52 -0700)]
Merge branch 'ticket/master/revert_8925'

* ticket/master/revert_8925:
  (#10007) Revert "Merge pull request #13 from kbarber/issue/master/8925-user_ssl_certs"

14 years ago(#10007) Revert "Merge pull request #13 from kbarber/issue/master/8925-user_ssl_certs"
Jeff McCune [Mon, 10 Oct 2011 18:51:14 +0000 (11:51 -0700)]
(#10007) Revert "Merge pull request #13 from kbarber/issue/master/8925-user_ssl_certs"

This reverts commit 14852e0259e1e43371dbcb2675e00c6d6e614f05, reversing
changes made to a95dccd464b55945feb8bcf7483f777c25164115.

This is to fix the broken build (failing tests) as per #8925 and #10007

14 years agoMerge pull request #13 from kbarber/issue/master/8925-user_ssl_certs
James Turnbull [Tue, 4 Oct 2011 20:00:16 +0000 (13:00 -0700)]
Merge pull request #13 from kbarber/issue/master/8925-user_ssl_certs

(#8925) Added new function called 'get_certificate' for retrieving

14 years agoMerge branch 'ticket/master/9859_add_root_home_fact_to_stdlib'
Jeff McCune [Mon, 3 Oct 2011 18:53:21 +0000 (11:53 -0700)]
Merge branch 'ticket/master/9859_add_root_home_fact_to_stdlib'

* ticket/master/9859_add_root_home_fact_to_stdlib:
  (#9859) Add root_home fact and tests

14 years ago(#9859) Add root_home fact and tests
Jeff McCune [Mon, 3 Oct 2011 18:51:05 +0000 (11:51 -0700)]
(#9859) Add root_home fact and tests

Without this patch applied, the stdlib module does not provide a
root_home fact.  This fact is necessary to easily determine the root
account home directory on platforms Puppet is supported on.

The major variations this fact address are:
---
solaris: /
linux: /root
macosx: /var/root

Spec tests using rspec have been provided as well to cover these three
general cases.  Windows tests are marked as pending.

14 years agoMerge pull request #16 from nfagerlund/docs/v2.0.0/XXXX_function_doc_updates
Jeff McCune [Thu, 18 Aug 2011 20:45:28 +0000 (13:45 -0700)]
Merge pull request #16 from nfagerlund/docs/v2.0.0/XXXX_function_doc_updates

Docs/v2.0.0/xxxx function doc updates

14 years agoDocs: Clarify the use case for the anchor type
nfagerlund [Wed, 17 Aug 2011 23:43:22 +0000 (16:43 -0700)]
Docs: Clarify the use case for the anchor type

This commit tweaks the docs for the anchor resource type to give more context
for its existence.

14 years agoDocs: Remove author emails from stdlib functions
nfagerlund [Wed, 17 Aug 2011 22:55:07 +0000 (15:55 -0700)]
Docs: Remove author emails from stdlib functions

Author email addresses were included in the doc strings for some (but not all)
stdlib functions. This commit removes them in the interest of consistency.

14 years agoDocs: Copyedit function doc strings
nfagerlund [Wed, 17 Aug 2011 22:53:27 +0000 (15:53 -0700)]
Docs: Copyedit function doc strings

This commit makes several minor consistency and wording edits to the doc
strings of the stdlib functions.

14 years agoDocs: Correct indentation of markdown code examples
nfagerlund [Wed, 17 Aug 2011 22:20:26 +0000 (15:20 -0700)]
Docs: Correct indentation of markdown code examples

Code examples in several function doc strings were only indented by two
spaces, which would not result in proper display when rendered as HTML. This
commit corrects the indentation to four spaces.

14 years agoDocs: Update documentation of stdlib classes
nfagerlund [Wed, 17 Aug 2011 22:09:03 +0000 (15:09 -0700)]
Docs: Update documentation of stdlib classes

This commit edits the puppetdoc text of the stdlib and stdlib::stages classes
to remove redundancy and add additional information.

14 years agoDocs: Update file_line documentation
Jeff McCune [Tue, 16 Aug 2011 23:09:01 +0000 (16:09 -0700)]
Docs: Update file_line documentation

This commit clarifies the behavior of the file_line resource type.

14 years agoDocs: Improve example in merge function
Jeff McCune [Tue, 16 Aug 2011 22:57:47 +0000 (15:57 -0700)]
Docs: Improve example in merge function

This commit replaces the example in the merge function with a much clearer
one. It also mentions that the rightmost value wins in the event of duplicated
hash keys.

14 years agoMerge branch 'v2.x'
Jeff McCune [Thu, 18 Aug 2011 19:07:29 +0000 (12:07 -0700)]
Merge branch 'v2.x'

* v2.x:
  Update CHANGELOG, README and Modulefile for v2.1.1

14 years agoUpdate CHANGELOG, README and Modulefile for v2.1.1
Jeff McCune [Thu, 18 Aug 2011 17:52:54 +0000 (10:52 -0700)]
Update CHANGELOG, README and Modulefile for v2.1.1

14 years agoMerge branch 'ticket/v2.x/9080_match_facts.d_to_facter2dot0' into v2.x
Jeff McCune [Thu, 18 Aug 2011 19:06:30 +0000 (12:06 -0700)]
Merge branch 'ticket/v2.x/9080_match_facts.d_to_facter2dot0' into v2.x

* ticket/v2.x/9080_match_facts.d_to_facter2dot0:
  (#9080) Make facts.d match Facter 2.0

14 years agoUpdate CHANGELOG, README and Modulefile for v2.1.1
Jeff McCune [Thu, 18 Aug 2011 17:52:54 +0000 (10:52 -0700)]
Update CHANGELOG, README and Modulefile for v2.1.1

14 years agoMerge branch 'ticket/v2.x/9080_match_facts.d_to_facter2dot0'
Jeff McCune [Thu, 18 Aug 2011 17:50:35 +0000 (10:50 -0700)]
Merge branch 'ticket/v2.x/9080_match_facts.d_to_facter2dot0'

* ticket/v2.x/9080_match_facts.d_to_facter2dot0:
  (#9080) Make facts.d match Facter 2.0

14 years ago(#9080) Make facts.d match Facter 2.0
Jeff McCune [Thu, 18 Aug 2011 17:44:40 +0000 (10:44 -0700)]
(#9080) Make facts.d match Facter 2.0

Based on feedback from Luke, the facts.d directory should at least match
the directory that will be used by Facter 2.0.

Reading #2157 I believe the Facter 2.0 facts.d feature is reasonably API
compatible with this custom fact from R.I. so I'm comfortable using the
same filesystem path.

Change in behavior:  Now look for facts in:
 * /etc/facter/facts.d
 * /etc/puppetlabs/facter/facts.d

14 years agoMerge branch 'v2.x'
Jeff McCune [Wed, 17 Aug 2011 23:38:14 +0000 (16:38 -0700)]
Merge branch 'v2.x'

* v2.x:
  Update CHANGELOG, Modulefile and README for 2.1.0
  (#9080) Add facts from /etc/puppetlabs/facts.d

14 years agoUpdate CHANGELOG, Modulefile and README for 2.1.0
Jeff McCune [Wed, 17 Aug 2011 23:37:20 +0000 (16:37 -0700)]
Update CHANGELOG, Modulefile and README for 2.1.0

14 years agoMerge branch 'ticket/v2.x/9080_add_static_facts' into v2.x
Jeff McCune [Wed, 17 Aug 2011 23:32:46 +0000 (16:32 -0700)]
Merge branch 'ticket/v2.x/9080_add_static_facts' into v2.x

* ticket/v2.x/9080_add_static_facts:
  (#9080) Add facts from /etc/puppetlabs/facts.d

14 years ago(#9080) Add facts from /etc/puppetlabs/facts.d
Jeff McCune [Wed, 17 Aug 2011 23:13:59 +0000 (16:13 -0700)]
(#9080) Add facts from /etc/puppetlabs/facts.d

This fact is a direct copy of R.I.'s work at
https://github.com/ripienaar/facter-facts

This is necessary plumbing to allow the installer to write a simple text
file based on the role the node is receiving.  For example:

    $ cat /etc/puppetlabs/facts.d/puppet_enterprise_mcollective.txt
    fact_stomp_port=61613
    fact_stomp_server=puppetmaster
    fact_is_puppetagent=true
    fact_is_puppetmaster=true

The mcollectivepe module relies on these facts being set and we need a
persistent place to write them during the interview process and later
read them when puppet agent runs to configure MCollective on the agent
systems.

Since stdlib is a public module, both /etc/facts.d and
/etc/puppetlabs/facts.d are scanned for static facts.

14 years ago(#8925) Added new function called 'get_certificate' for retrieving
Ken Barber [Sun, 14 Aug 2011 01:47:32 +0000 (03:47 +0200)]
(#8925) Added new function called 'get_certificate' for retrieving
certificates from a CA (or locally).

This function works by either obtaining the file locally
or remotely based on Puppets configuration.

Also added get_pubkey which wraps get_certificate and extracts the
public key.

14 years agoMerge branch 'issue/master/8797_puppetlabs-functions_merge'
Jeff McCune [Mon, 8 Aug 2011 23:58:14 +0000 (16:58 -0700)]
Merge branch 'issue/master/8797_puppetlabs-functions_merge'

Closes pull request #12

Reviewed-by: Jeff McCune
Verified all spec tests pass using rspec **/*_spec.rb

* issue/master/8797_puppetlabs-functions_merge: (164 commits)
  * Moved kwalify to puppetlabs-kwalify project * Re-arranged tests in line with puppetlabs-stdlib
  Prep for stdlib merge * Renamed load_yaml & load_json to parseyaml & parsejson * Renamed is_valid_* functions and remove the 'valid_'
  Fix some ruby 1.9.2 issues.
  (#3) Provide documentation for remaining functions.
  (#3) Apply missing documentation to more functions.
  Remove rand.
  Some improvements to values_at tests.
  (#1) provide some more detailed tests for a number of functions.
  Removed date stub since this functinality is available in strftime anyway.
  (#2) fix is_string finally so it also makes sure numbers return false.
  (#2) unstub is_valid_domain_name
  Added doc strings for first five functions
  Removed join_with_prefix.
  (#2) unstub is_valid_mac_address.
  Allow sort for strings.
  Count functionality overlaps with size - so removing it.
  Removed crontab functions instead of unstubbing them.
  Removed load_variables. load_yaml is sufficient to solve this problem on its own.
  Remove is_valid_netmask instead of unstubbing. Doesn't seem like a sensible function on its own.
  (#2) unstub is_numeric function.
  ...

14 years agoMerge pull request #11 from jeffmccune/ticket/master/8793_cut_version_2.0.0
Jeff McCune [Mon, 8 Aug 2011 18:00:26 +0000 (11:00 -0700)]
Merge pull request #11 from jeffmccune/ticket/master/8793_cut_version_2.0.0

Update CHANGELOG and Modulefile for 2.0.0 release

Reviewed-by: Dan Bode
14 years agoUpdate CHANGELOG and Modulefile for 2.0.0 release
Jeff McCune [Fri, 5 Aug 2011 02:42:30 +0000 (19:42 -0700)]
Update CHANGELOG and Modulefile for 2.0.0 release

14 years agoMerge pull request #10 from jeffmccune/ticket/master/8792_rename_whole_line_to_file_line
Ken Barber [Mon, 8 Aug 2011 16:47:30 +0000 (09:47 -0700)]
Merge pull request #10 from jeffmccune/ticket/master/8792_rename_whole_line_to_file_line

(#8792) Rename whole_line type to file_line.

14 years ago(#8792) Rename basic smoke test to reflect file_line rename
Jeff McCune [Mon, 8 Aug 2011 16:33:56 +0000 (09:33 -0700)]
(#8792) Rename basic smoke test to reflect file_line rename

Without this patch the basic smoke test in the module tests/ directory
did not math up with the renamed whole_line => file_line resource type.

This patch updates the smoke test file to match the most recently
selected name of file_line.  The filename has been changed, comments
added to the smoke test file, and resource declarations inside the file
changed.

14 years ago(#8797) Merge puppetlabs-functions into puppetlabs-stdlib
Ken Barber [Fri, 5 Aug 2011 07:52:00 +0000 (08:52 +0100)]
(#8797) Merge puppetlabs-functions into puppetlabs-stdlib

It was decided that maintaining puppetlabs-functions and
puppetlabs-stdlib was duplication as both are trying to
achieve the same goal.

This patch provides a merge of the puppetlabs-functions
into the puppetlabs-stdlib repository, with history
preservation.

The following conflicts were found and resolved:

* LICENSE file from functions was used as it aligns with
  ASL usage instructions and contains relevant copyright
  information:
  http://www.apache.org/licenses/LICENSE-2.0.html
* Used spec_helper.rb from functions - this is what
  Puppet core uses and doesn't break tests.
* Merged .gitignore and spec.opts options.

14 years ago* Moved kwalify to puppetlabs-kwalify project
Ken Barber [Fri, 5 Aug 2011 07:46:38 +0000 (08:46 +0100)]
* Moved kwalify to puppetlabs-kwalify project
* Re-arranged tests in line with puppetlabs-stdlib

14 years agoPrep for stdlib merge
Ken Barber [Fri, 5 Aug 2011 07:25:03 +0000 (08:25 +0100)]
Prep for stdlib merge
* Renamed load_yaml & load_json to parseyaml & parsejson
* Renamed is_valid_* functions and remove the 'valid_'

14 years ago(#8792) Rename whole_line type to file_line
Jeff McCune [Fri, 5 Aug 2011 02:17:48 +0000 (19:17 -0700)]
(#8792) Rename whole_line type to file_line

Without this patch the resource whole_line would be included in the
stable stdlib module shipping in PE 1.2.  Ideally the name will be
stable and unchanging in the future.

There was quite a bit of concern over whole_line being an unwise name.
file_line appears to be the most suitable name and least likely to need
another rename in the future.

14 years agoUpdate CHANGELOG and Modulefile for 1.1.0
Jeff McCune [Fri, 5 Aug 2011 01:34:32 +0000 (18:34 -0700)]
Update CHANGELOG and Modulefile for 1.1.0

14 years agoMerge branch 'refactor/master/8665_whole_line'
Jeff McCune [Fri, 5 Aug 2011 00:58:05 +0000 (17:58 -0700)]
Merge branch 'refactor/master/8665_whole_line'

* refactor/master/8665_whole_line:
  (#8665) Change type from append_line to whole_line

14 years agoUpdate CHANGELOG and README for 1.0.0
Jeff McCune [Fri, 5 Aug 2011 00:20:39 +0000 (17:20 -0700)]
Update CHANGELOG and README for 1.0.0

14 years agoMerge branch 'ticket/master/8678_validate_array_string'
Jeff McCune [Thu, 4 Aug 2011 23:05:49 +0000 (16:05 -0700)]
Merge branch 'ticket/master/8678_validate_array_string'

* ticket/master/8678_validate_array_string:
  (#8678) Add validate_array and validate_string functions

14 years ago(#8678) Add validate_array and validate_string functions
Jeff McCune [Wed, 3 Aug 2011 22:51:27 +0000 (15:51 -0700)]
(#8678) Add validate_array and validate_string functions

The accounts module is making use of validate_array() and
validate_string() which do not exist int he stdlib module without this
patch.

This patch adds the two functions to the stdlib with unit tests.

Reviewed-by: Dan Bode
14 years agoMerge branch 'ticket/master/8717_merge_function_ruby_185'
Jeff McCune [Mon, 1 Aug 2011 18:48:50 +0000 (11:48 -0700)]
Merge branch 'ticket/master/8717_merge_function_ruby_185'

* ticket/master/8717_merge_function_ruby_185:
  (#8717) Make merge() function work with Ruby 1.8.5

14 years ago(#8717) Make merge() function work with Ruby 1.8.5
Jeff McCune [Mon, 1 Aug 2011 18:30:28 +0000 (11:30 -0700)]
(#8717) Make merge() function work with Ruby 1.8.5

The previous behavior of the merge() function used Array#inject with two
arguments.  Ruby 1.8.5 only supports inject being used with one
argument.

This change initializes and empty Hash object and merges each argument
into the accumulator.  The last argument still "wins" in the merge.

rspec tests (cd spec; rspec **/*_spec.rb) verified as passing with this
change.

Reviewed-by: Dan Bode
14 years agoFix some ruby 1.9.2 issues.
Ken Barber [Fri, 29 Jul 2011 23:44:02 +0000 (00:44 +0100)]
Fix some ruby 1.9.2 issues.

14 years agoMerge branch 'feature/master/add_merge_has_key'
Dan Bode [Fri, 29 Jul 2011 22:42:53 +0000 (15:42 -0700)]
Merge branch 'feature/master/add_merge_has_key'

14 years ago(#8709) Add hash merging function
Dan Bode [Fri, 29 Jul 2011 22:28:21 +0000 (15:28 -0700)]
(#8709) Add hash merging function

In Puppet, it is not possible to reassign hash
values.

This function allows a reasonable way to perform
hash munging in Puppet.

Reviewed-by: Jeff McCune
14 years ago(#8708) Add has_key function
Dan Bode [Fri, 29 Jul 2011 22:10:13 +0000 (15:10 -0700)]
(#8708) Add has_key function

It is difficult to use existance of keys in a hash
as a boolean condition in Puppet (see #8705)

This function provides a working solution until
the underlying issue in Puppet can be resolved.

Reviewed-by: Jeff McCune
14 years ago(#3) Provide documentation for remaining functions.
Ken Barber [Fri, 29 Jul 2011 22:09:30 +0000 (23:09 +0100)]
(#3) Provide documentation for remaining functions.

14 years ago(#3) Apply missing documentation to more functions.
Ken Barber [Fri, 29 Jul 2011 21:18:56 +0000 (22:18 +0100)]
(#3) Apply missing documentation to more functions.

14 years agoRemove rand.
Ken Barber [Fri, 29 Jul 2011 21:08:09 +0000 (22:08 +0100)]
Remove rand.

14 years agoSome improvements to values_at tests.
Ken Barber [Fri, 29 Jul 2011 20:17:19 +0000 (21:17 +0100)]
Some improvements to values_at tests.

14 years ago(#1) provide some more detailed tests for a number of functions.
Ken Barber [Fri, 29 Jul 2011 19:57:10 +0000 (20:57 +0100)]
(#1) provide some more detailed tests for a number of functions.

14 years agoRemoved date stub since this functinality is available in strftime anyway.
Ken Barber [Fri, 29 Jul 2011 19:56:40 +0000 (20:56 +0100)]
Removed date stub since this functinality is available in strftime anyway.

14 years ago(#2) fix is_string finally so it also makes sure numbers return false.
Ken Barber [Fri, 29 Jul 2011 19:11:47 +0000 (20:11 +0100)]
(#2) fix is_string finally so it also makes sure numbers return false.

14 years ago(#2) unstub is_valid_domain_name
Ken Barber [Fri, 29 Jul 2011 19:08:31 +0000 (20:08 +0100)]
(#2) unstub is_valid_domain_name