summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-11-27Merge branch '2.x' into 3.xJeff McCune
* 2.x: (Maint) Add spec/functions to rake test task Add example behaviors for ensure_packages() function Add an ensure_packages function. Conflicts: Rakefile
2012-11-27Merge branch 'metcalfc/2.x/ensure_packages' into 2.xJeff McCune
* metcalfc/2.x/ensure_packages: (Maint) Add spec/functions to rake test task Add example behaviors for ensure_packages() function Add an ensure_packages function.
2012-11-27(Maint) Add spec/functions to rake test taskJeff McCune
Without this patch the `test` rake task does not exercise the rspec-puppet behaviors located in spec/functions/ This is a self-evident problem. This patch fixes the problem by adding spec/functions to the list of directories scanned for spec tests.
2012-11-27Add example behaviors for ensure_packages() functionJeff McCune
Without this patch the ensure_packages() function has no rspec behavior examples. This patch fixes the problem by filling out a spec file with expected behaviors I could think of.
2012-11-27Add an ensure_packages function.Chad Metcalf
Its often the case that modules need to install a handful of packages. In some cases its worth breaking these dependencies out into their own modules (e.g., Java). In others it makes more sense to keep them in the module. This can be problematic when multiple modules depend on common packages (git, python ruby, etc). ensure_resource was a good first step towards solving this problem. ensure_resource does not handle arrays and for 3 or more packages stamping out ensure_resource declarations is tedious. ensure_packages is a convenience function that takes an array of packages and wraps calls to ensure_resource. Currently users cannot specify package versions. But the function could be extended to use a hash if that functionality would be useful.
2012-11-26Merge branch '2.x' into 3.xJeff McCune
* 2.x: (#17797) min() and max() functions
2012-11-26Merge branch 'fun/2.x/min_max' into 2.xJeff McCune
* fun/2.x/min_max: (#17797) min() and max() functions
2012-11-26(#17797) min() and max() functionsErik Dalén
returns the min or max of all arguments given to them
2012-11-26Merge branch '2.x' into 3.xJeff McCune
* 2.x: (#14670) Fixup file_line autorequire specs (#14670) autorequire a file_line resource's path
2012-11-26Merge branch 'fun/2.x/14670_file_line_autorequire' into 2.xJeff McCune
* fun/2.x/14670_file_line_autorequire: (#14670) Fixup file_line autorequire specs (#14670) autorequire a file_line resource's path
2012-11-26(#14670) Fixup file_line autorequire specsJeff McCune
Without this patch applied the file_line autorequire examples are failing. This is a problem because the failures are false positives and should be passing given the implementation. This patch fixes the problem by changing the examples to directly test the existence of the relationship by finding it in the list of autorequire relationships.
2012-11-26(#14670) autorequire a file_line resource's pathPeter Meier
If we manage a file we edit with file_line, it should be autorequired by file_line. Without this patch applied the relationship is not automatically setup and the user is forced to manually manage the relationship.
2012-11-20Merge branch '2.x' into 3.xJeff McCune
* 2.x: Add join_keys_to_values function
2012-11-20Merge branch 'lifton-feature/2.x/join_keys_to_values_function' into 2.xJeff McCune
* lifton-feature/2.x/join_keys_to_values_function: Add join_keys_to_values function
2012-11-20Add join_keys_to_values functionJoshua Harlan Lifton
This commit adds a function that joins each of a hash's keys with that key's corresponding value, separated by a separator string. The arguments are a hash and separator string. The return value is an array of joined key/value pairs.
2012-11-19Merge branch '2.x' into 3.xJeff McCune
* 2.x: Extend delete function for strings and hashes Fixed typo
2012-11-19Merge branch 'lifton-feature/2.x/extend_delete_function' into 2.xJeff McCune
* lifton-feature/2.x/extend_delete_function: Extend delete function for strings and hashes Fixed typo
2012-11-19Extend delete function for strings and hashesJoshua Harlan Lifton
Previous to this commit, the delete function only acted on arrays. This commit adds the same functionality for hashes and strings in the obvious way: delete(h, k) would delete the k key from the h hash and delete(s, sub) would delete all instances of the sub substring from the s string.
2012-11-19Fixed typoJoshua Harlan Lifton
2012-11-15Merge branch '2.x' into 3.xJeff McCune
* 2.x: Add the pick() function
2012-11-15Merge branch 'feature/2.x/pick' into 2.xJeff McCune
* feature/2.x/pick: Add the pick() function
2012-11-15Add the pick() functionGary Larizza
This function is similar to a coalesce function in SQL in that it will return the first value in a list of values that is not undefined or an empty string (two things in Puppet that will return a boolean false value). Typically, this function is used to check for a value in the Puppet Dashboard/Enterprise Console, and failover to a default value like the following: $real_jenkins_version = pick($::jenkins_version, '1.449') The value of $real_jenkins_version will first look for a top-scope variable called 'jenkins_version' (note that parameters set in the Puppet Dashboard/ Enterprise Console are brought into Puppet as top-scope variables), and, failing that, will use a default value of 1.449.
2012-11-07Merge branch '2.x' into 3.xJeff McCune
* 2.x: (#13974) Add predicate functions for interface facts
2012-11-07Merge branch 'add/2.x/13974-has_interface_with' into 2.xJeff McCune
* add/2.x/13974-has_interface_with: (#13974) Add predicate functions for interface facts
2012-11-07(#13974) Add predicate functions for interface factsWil Cooley
If one wishes to test if a host has a particular IP address (such as a floating virtual address) or has an interface on a particular network (such as a secondary management network), the facts that provide this information are difficult to use within Puppet. This patch addresses these needs by implementing functions ‘has_ip_address(value)’ and ‘has_ip_network(value)’. These functions look through all interfaces for ipaddress_<interface> and network_<interface> (respectively) having the requested <value>. These functions are implemented on top of a lower-level predicate function, ‘has_interface_with(kind, value)’, which iterates through the interfaces in the ‘interfaces’ fact and checks the facts <kind>_<interface> looking for <value>. Additionally, the existence of a particular named interface can be checked for by calling with only a single argument: has_interface_with(interface). A Boolean is returned in all cases.
2012-11-07Merge branch '2.x' into 3.xJeff McCune
* 2.x: Add function, uriescape, to URI.escape strings. Redmine #17459
2012-11-07Merge branch 'add/3.x/joejulian-add_uriescape' into 3.xJeff McCune
* add/3.x/joejulian-add_uriescape: Add function, uriescape, to URI.escape strings. Redmine #17459
2012-11-07Merge branch 'add/2.x/joejulian-add_uriescape' into 2.xJeff McCune
* add/2.x/joejulian-add_uriescape: Add function, uriescape, to URI.escape strings. Redmine #17459
2012-11-07Add function, uriescape, to URI.escape strings. Redmine #17459Joe Julian
2012-11-07Add function, uriescape, to URI.escape strings. Redmine #17459Joe Julian
2012-10-25Merge branch '3.1.x' into 3.xJeff McCune
* 3.1.x: Update CHANGELOG, Modulefile for 3.1.1
2012-10-25Update CHANGELOG, Modulefile for 3.1.1Jeff McCune
2012-10-25Merge branch '2.x' into 3.xJeff McCune
* 2.x: Update Modulefile, CHANGELOG for 2.5.1 Conflicts: CHANGELOG Modulefile
2012-10-25Merge branch '2.5.x' into 2.xJeff McCune
* 2.5.x: Update Modulefile, CHANGELOG for 2.5.1
2012-10-25Update Modulefile, CHANGELOG for 2.5.1Jeff McCune
2012-10-25Merge branch '3.1.x' into 3.xJeff McCune
* 3.1.x: Revert "Revert "Merge branch '2.5.x' into 3.0.x"" Revert "Merge branch '2.5.x' into 3.0.x" (maint) Fix spec failures resulting from Facter API changes
2012-10-25Merge branch '2.5.x' into 3.1.xJeff McCune
* 2.5.x: (maint) Fix spec failures resulting from Facter API changes
2012-10-25Revert "Revert "Merge branch '2.5.x' into 3.0.x""Jeff McCune
This reverts commit 9e8c60a8b73fd96393b08d690c7197e62aae623e. This was an error on my part. 3.1.x descends from 3.0.x _and_ 2.5.x, but 3.0.x does not descend from 2.5.x. I should not have merged 2.5.x into 3.0.x, instead I should have merged 2.5.x into 3.1.x skipping over the 3.0.x merge up. I'm slowly starting to understand the implications of semver on our branching strategy... =)
2012-10-25Merge branch '3.0.x' into 3.1.xJeff McCune
* 3.0.x: Revert "Merge branch '2.5.x' into 3.0.x"
2012-10-25Revert "Merge branch '2.5.x' into 3.0.x"Jeff McCune
This reverts commit c8c7afc7a00aaeeddea6514d9fe9508513e53a73, reversing changes made to 03ec16e291a70ac5ac412be36ae3b86a771b98af. This was a mistake on my part. 2.5 is a minor release and minor releases should never be merged into patch level branches. 2.5.x should have been merged into 3.1.x instead.
2012-10-25Merge branch '2.5.x' into 2.xJeff McCune
* 2.5.x: (maint) Fix spec failures resulting from Facter API changes
2012-10-25Merge branch 'fix/2.5.x/facter_loader' into 2.5.xJeff McCune
* fix/2.5.x/facter_loader: (maint) Fix spec failures resulting from Facter API changes
2012-10-25(maint) Fix spec failures resulting from Facter API changesJeff McCune
Without this patch stdlib tests fail against Facter 2.x and master but not 1.6.x. This patch fixes the problem by initializing the example group differently depending on the version of Facter integrating into the system. The adjusted methods are: 1.x - Facter.collection.loader.load 2.x - Facter.collection.load The collection actually implements the load method in both version, it's simply marked as private in 1.x.
2012-10-25Merge branch '3.1.x' into 3.xJeff McCune
* 3.1.x: Update Modulefile, CHANGELOG for 3.1.0 Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'""" Update Modulefile, CHANGELOG for 2.5.0 Explicitly load functions used by ensure_resource re-formatting Add better docs about duplicate resource failures Handle undef for parameter argument Add function ensure_resource and defined_with_params Revert "Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x"" Revert "Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x"" Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x" Prevent undefined method `split' for nil:NilClass with pe_foo_version facts (maint) Clear all facts before each example Add spec tests for pe_version facts Add PE facts to stdlib Fix some logical inconsistencies in README (#14422) Update README to include the bug tracker URL. Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'""
2012-10-25Merge branch '3.0.x' into 3.1.xJeff McCune
* 3.0.x: Conflicts: CHANGELOG Modulefile
2012-10-25Merge branch '2.5.x' into 3.0.xJeff McCune
* 2.5.x: Update Modulefile, CHANGELOG for 2.5.0 Explicitly load functions used by ensure_resource re-formatting Add better docs about duplicate resource failures Handle undef for parameter argument Add function ensure_resource and defined_with_params Revert "Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x"" Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x" Prevent undefined method `split' for nil:NilClass with pe_foo_version facts (maint) Clear all facts before each example Add spec tests for pe_version facts Add PE facts to stdlib Conflicts: CHANGELOG Modulefile spec/spec_helper.rb
2012-10-25Update Modulefile, CHANGELOG for 3.1.0Jeff McCune
2012-10-25Revert "Revert "Revert "Merge branch ↵Jeff McCune
'hkenney-ticket/master/2157_remove_facts_dot_d'""" This reverts commit 8fc00ea5b6b39b220ebc6391489915dbeeb364ab. I really wish we could get this right. Without this patch there is no branch that contains backwards-comaptible new functionality relative to the current 3.0.1. There are only branches that contain backwards-incompatible functionality relative to 3.0.1. This is a problem because I need to do a release of stdlib that contains backwards compatible facts but does not contain any breaking changes. This patch fixes the problem by establishing the 3.1.x branch. This branch will then revert the backwards incompatible changes from the 3.1.x branch and revert the revets in the 4.x and master branches. I'll review our merge process, but it seems wrong that there is no place to separate out incompatible from compatible changes when working beyond the most recent patch release.
2012-10-25Merge branch '2.5.x'Jeff McCune
* 2.5.x: Update Modulefile, CHANGELOG for 2.5.0 Conflicts: CHANGELOG Modulefile
2012-10-25Update Modulefile, CHANGELOG for 2.5.0Jeff McCune