summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-01-11(maint) Memoize scope in domain_name specJeff McCune
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.
2012-01-11Merge branch 'ticket/2.2.x/11901-rspec_sort_order' into 2.2.xJeff McCune
* ticket/2.2.x/11901-rspec_sort_order: (#11901) Fix sort order error in tests for 'keys' and 'values'
2012-01-11(#11901) Fix sort order error in tests for 'keys' and 'values'Jeff McCune
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
2012-01-10Merge pull request #28 from kbarber/ticket/2.2.x/11873-time_spec_failureDaniel Pittman
(#11873) time function spec failure on Fixnum matcher
2012-01-10(#11873) time function spec failure on Fixnum matcherKen Barber
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.
2011-12-30Merge branch '2.1.x' into 2.2.xJeff McCune
* 2.1.x: (#11607) Add Rakefile to enable spec testing
2011-12-30Merge pull request #26 from ↵Jeff McCune
jeffmccune/ticket/2.1.x/11607_fix_ci_tests_for_stdlib (#11607) Add Rakefile to enable spec testing
2011-12-30(#11607) Add Rakefile to enable spec testingJeff McCune
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
2011-12-30Update CHANGELOG and Modulefile for 2.2.1Jeff McCune
2011-12-30Merge branch '2.1.x' into 2.2.xJeff McCune
* 2.1.x: Update Modulefile CHANGELOG for v2.1.2 release Conflicts: CHANGELOG Modulefile
2011-12-30Update Modulefile CHANGELOG for v2.1.2 releaseJeff McCune
2011-12-30Merge branch 'v2.1.x' into v2.2.xJeff McCune
* 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
2011-12-30(maint) Add semantic versioning info to READMEJeff McCune
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.
2011-11-08Merge pull request #21 from puppetlabs/v2.2Garrett Honeycutt
* v2.x:
2011-11-08 * v2.x:James Turnbull
Update CHANGELOG and Modulefile for v2.2.0
2011-10-25Merge pull request #19 from nanliu/ticket/10285Ken Barber
(#10285) Refactor json to use pson instead.
2011-10-25(#10285) Refactor json to use pson instead.Nan Liu
Remove json requirement since puppet already provides pson which is equivalent.
2011-10-10Merge branch 'main/mater/watchr'Jeff McCune
* main/mater/watchr: (Maint) Add watchr autotest script
2011-10-10(Maint) Add watchr autotest scriptJeff McCune
This patch adds a watchr script to autotest the stdlib module. To use: % watchr spec/watchr.rb
2011-10-10Merge pull request #18 from jeffmccune/maint/master/make_tests_run_on_puppet_26Jeff McCune
(Maint) Make rspec tests work with Puppet 2.6.4
2011-10-10(Maint) Make rspec tests work with Puppet 2.6.4Jeff McCune
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.)
2011-10-10Merge branch 'ticket/master/revert_8925'Jeff McCune
* ticket/master/revert_8925: (#10007) Revert "Merge pull request #13 from kbarber/issue/master/8925-user_ssl_certs"
2011-10-10(#10007) Revert "Merge pull request #13 from ↵Jeff McCune
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
2011-10-04Merge pull request #13 from kbarber/issue/master/8925-user_ssl_certsJames Turnbull
(#8925) Added new function called 'get_certificate' for retrieving
2011-10-03Merge branch 'ticket/master/9859_add_root_home_fact_to_stdlib'Jeff McCune
* ticket/master/9859_add_root_home_fact_to_stdlib: (#9859) Add root_home fact and tests
2011-10-03(#9859) Add root_home fact and testsJeff McCune
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.
2011-08-18Merge pull request #16 from nfagerlund/docs/v2.0.0/XXXX_function_doc_updatesJeff McCune
Docs/v2.0.0/xxxx function doc updates
2011-08-18Docs: Clarify the use case for the anchor typenfagerlund
This commit tweaks the docs for the anchor resource type to give more context for its existence.
2011-08-18Docs: Remove author emails from stdlib functionsnfagerlund
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.
2011-08-18Docs: Copyedit function doc stringsnfagerlund
This commit makes several minor consistency and wording edits to the doc strings of the stdlib functions.
2011-08-18Docs: Correct indentation of markdown code examplesnfagerlund
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.
2011-08-18Docs: Update documentation of stdlib classesnfagerlund
This commit edits the puppetdoc text of the stdlib and stdlib::stages classes to remove redundancy and add additional information.
2011-08-18Docs: Update file_line documentationJeff McCune
This commit clarifies the behavior of the file_line resource type.
2011-08-18Docs: Improve example in merge functionJeff McCune
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.
2011-08-18Merge branch 'v2.x'Jeff McCune
* v2.x: Update CHANGELOG, README and Modulefile for v2.1.1
2011-08-18Update CHANGELOG, README and Modulefile for v2.1.1Jeff McCune
2011-08-18Merge branch 'ticket/v2.x/9080_match_facts.d_to_facter2dot0' into v2.xJeff McCune
* ticket/v2.x/9080_match_facts.d_to_facter2dot0: (#9080) Make facts.d match Facter 2.0
2011-08-18Update CHANGELOG, README and Modulefile for v2.1.1Jeff McCune
2011-08-18Merge branch 'ticket/v2.x/9080_match_facts.d_to_facter2dot0'Jeff McCune
* ticket/v2.x/9080_match_facts.d_to_facter2dot0: (#9080) Make facts.d match Facter 2.0
2011-08-18(#9080) Make facts.d match Facter 2.0Jeff McCune
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
2011-08-17Merge branch 'v2.x'Jeff McCune
* v2.x: Update CHANGELOG, Modulefile and README for 2.1.0 (#9080) Add facts from /etc/puppetlabs/facts.d
2011-08-17Update CHANGELOG, Modulefile and README for 2.1.0Jeff McCune
2011-08-17Merge branch 'ticket/v2.x/9080_add_static_facts' into v2.xJeff McCune
* ticket/v2.x/9080_add_static_facts: (#9080) Add facts from /etc/puppetlabs/facts.d
2011-08-17(#9080) Add facts from /etc/puppetlabs/facts.dJeff McCune
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.
2011-08-17(#8925) Added new function called 'get_certificate' for retrievingKen Barber
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.
2011-08-08Merge branch 'issue/master/8797_puppetlabs-functions_merge'Jeff McCune
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. ...
2011-08-08Merge pull request #11 from jeffmccune/ticket/master/8793_cut_version_2.0.0Jeff McCune
Update CHANGELOG and Modulefile for 2.0.0 release Reviewed-by: Dan Bode
2011-08-08Update CHANGELOG and Modulefile for 2.0.0 releaseJeff McCune
2011-08-08Merge pull request #10 from ↵Ken Barber
jeffmccune/ticket/master/8792_rename_whole_line_to_file_line (#8792) Rename whole_line type to file_line.
2011-08-08(#8792) Rename basic smoke test to reflect file_line renameJeff McCune
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.