summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-08-20Merge branch '3.x'Jeff McCune
* 3.x: Disable tests that fail on 2.6.x due to #15912
2012-08-20Merge branch '3.0.x' into 3.xJeff McCune
* 3.0.x: Disable tests that fail on 2.6.x due to #15912
2012-08-20Merge branch '2.4.x' into 3.0.xJeff McCune
* 2.4.x: Disable tests that fail on 2.6.x due to #15912
2012-08-20Merge branch '2.3.x' into 2.4.xJeff McCune
* 2.3.x: Disable tests that fail on 2.6.x due to #15912
2012-08-20Merge branch '2.2.x' into 2.3.xJeff McCune
* 2.2.x: Disable tests that fail on 2.6.x due to #15912
2012-08-20Merge branch '2.1.x' into 2.2.xJeff McCune
* 2.1.x: Disable tests that fail on 2.6.x due to #15912 Conflicts: spec/unit/puppet/parser/functions/getvar_spec.rb spec/unit/puppet/parser/functions/has_key_spec.rb spec/unit/puppet/parser/functions/merge_spec.rb
2012-08-20Merge branch 'fix/2.1.x/disable_puppet26_failing_tests' into 2.1.xJeff McCune
* fix/2.1.x/disable_puppet26_failing_tests: Disable tests that fail on 2.6.x due to #15912
2012-08-20Disable tests that fail on 2.6.x due to #15912Jeff McCune
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. Conflicts: spec/unit/puppet/parser/functions/getvar_spec.rb spec/unit/puppet/parser/functions/has_key_spec.rb spec/unit/puppet/parser/functions/merge_spec.rb This patch was constructed by cherry-picking e27eccb and resolving the merge conflicts to only include the `pending` statements. This resolves the problem by disabling these tests in Puppet 2.6.
2012-08-20Merge branch '3.x'Jeff McCune
* 3.x: (Maint) Fix mis-use of rvalue functions as statements Add .rspec file to repo root
2012-08-20Merge branch '3.0.x' into 3.xJeff McCune
* 3.0.x: (Maint) Fix mis-use of rvalue functions as statements Add .rspec file to repo root
2012-08-20Merge branch '2.4.x' into 3.0.xJeff McCune
* 2.4.x: (Maint) Fix mis-use of rvalue functions as statements Add .rspec file to repo root
2012-08-20Merge branch '2.3.x' into 2.4.xJeff McCune
* 2.3.x: (Maint) Fix mis-use of rvalue functions as statements Add .rspec file to repo root
2012-08-20Merge branch '2.2.x' into 2.3.xJeff McCune
* 2.2.x: (Maint) Fix mis-use of rvalue functions as statements Add .rspec file to repo root
2012-08-20Merge branch '2.1.x' into 2.2.xJeff McCune
* 2.1.x: (Maint) Fix mis-use of rvalue functions as statements Add .rspec file to repo root Conflicts: spec/unit/puppet/parser/functions/getvar_spec.rb spec/unit/puppet/parser/functions/has_key_spec.rb spec/unit/puppet/parser/functions/merge_spec.rb
2012-08-20Merge branch 'fix/2.1.x/spec_failures' into 2.1.xJeff McCune
* fix/2.1.x/spec_failures: (Maint) Fix mis-use of rvalue functions as statements Add .rspec file to repo root
2012-08-20(Maint) Fix mis-use of rvalue functions as statementsJeff McCune
Without this patch applied the spec tests are invalid because they call rvalue functions as if they were statements. This is a problem because Puppet 2.7.x currently throws an exception if a rvalue function is invoked as if it were a statement function. This exception from Puppet is causing tests to fail. This patch fixes the problem by changing the tests to assign the return value of the functions to a variable. This fixes the problem by invoking the functions properly. Paired-with: Andrew Parker <andy@puppetlabs.com>
2012-08-20Add .rspec file to repo rootJeff McCune
Without this patch we don't get an opinionated rspec behavior. This patch makes the behavior of `rake test` and `rspec spec/` opinionated by including some default options.
2012-08-19Merge branch '3.x'Jeff McCune
* 3.x: (#14422) Update README to include the bug tracker URL.
2012-08-19Merge branch '3.0.x' into 3.xJeff McCune
* 3.0.x: (#14422) Update README to include the bug tracker URL.
2012-08-19Merge branch 'fix/3.0.x/14422_readme' into 3.0.xJeff McCune
* fix/3.0.x/14422_readme: (#14422) Update README to include the bug tracker URL.
2012-08-19(#14422) Update README to include the bug tracker URL.Eric Sorenson
As reported, it is indeed difficult to navigate directly to the correct part of Redmine for a particular sub-project. This commit puts the issue tracker URL front and center.
2012-08-19Merge pull request #90 from ahpook/14422_update_readmeJeff McCune
(#14422) Update README to include the bug tracker URL.
2012-08-17(#14422) Update README to include the bug tracker URL.Eric Sorenson
As reported, it is indeed difficult to navigate directly to the correct part of Redmine for a particular sub-project. This commit puts the issue tracker URL front and center.
2012-08-16Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'""Jeff McCune
This reverts commit d3e30bcdc64964bba82e05e5409c38faa7f2b700.
2012-08-16Update CHANGELOG, Modulefile for 3.0.1Jeff McCune
2012-08-16Merge branch 'fix/master/where_did_facts_dot_d_go'Jeff McCune
* fix/master/where_did_facts_dot_d_go: Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"
2012-08-16Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"Jeff McCune
This reverts commit cc414a422de0d773a1012ca57f41f15b4d6caf06, reversing changes made to 29f8f89c19b2189aa78ab430e94671669cb4716c. Conflicts: README.markdown Without this patch, there is no facts_dot_d functionality and we don't have it implemented in Facter 2.0. This is a problem because Puppet Enterprise and many users rely on facts.d support. We're also backwards compatible with Facter 1.6 in stdlib 3.0 so this is a bug fix.
2012-08-16Merge branch 'release/master/three_dot_oh_dot_oh'Jeff McCune
* release/master/three_dot_oh_dot_oh: Update CHANGELOG, Modulefile for 3.0.0 (Maint) Update README for 3.0.0
2012-08-16Update CHANGELOG, Modulefile for 3.0.0Jeff McCune
2012-08-16(Maint) Update README for 3.0.0Jeff McCune
This commit updates the README for 3.0.0 by taking a function list produced with `puppet doc -r function` _without_ stdlib in the `$LOAD_PATH` and then filtering out the native functions by executing `puppet doc -r function` _with_ stdlib/lib in the `$LOAD_PATH` and then running `comm -13 core_functions.txt all_functions.txt`
2012-08-16Merge branch 'bodepd-ensure_resource_attempt_2'Jeff McCune
* bodepd-ensure_resource_attempt_2: Explicitly load functions used by ensure_resource Revert "Revert "Merge pull request #86 from bodepd/ensure_resource""
2012-08-15Explicitly load functions used by ensure_resourceDan Bode
The ensure_resource function actually calls two other functions, create_resources and defined_with_param. When calling Puppet functions from Ruby, you sometimes have to load the functions manually if they have not been called before. This commit explicitly loads the functions that ensure_resource depends on from within the function.
2012-08-15Revert "Revert "Merge pull request #86 from bodepd/ensure_resource""Dan Bode
This reverts commit 1e0983362464e8f2832239b09cdbc9175a51e6ec.
2012-08-14Revert "Merge pull request #86 from bodepd/ensure_resource"Jeff McCune
This reverts commit 42ddd7fe54f37b84e34b4a005de2249e53f07469, reversing changes made to 53243605b28fc31618d079155c86b37b4e88a6ca.
2012-08-14Merge pull request #86 from bodepd/ensure_resourceJeff McCune
Add function ensure_resource and defined_with_params
2012-08-14Merge branch '2.4.x'Jeff McCune
* 2.4.x: Update Modulefile, CHANGELOG for 2.4.0
2012-08-14Update Modulefile, CHANGELOG for 2.4.0Jeff McCune
2012-08-14Merge branch '2.4.x'Jeff McCune
* 2.4.x: Add support for a 'match' parameter to file_line
2012-08-14Merge branch 'feature/2.4.x/backport_file_line_match_pr75' into 2.4.xJeff McCune
* feature/2.4.x/backport_file_line_match_pr75: Add support for a 'match' parameter to file_line
2012-08-14Add support for a 'match' parameter to file_lineChris Price
This commit adds a new parameter called "match" to the file_line resource type, and support for this new parameter to the corresponding ruby provider. This parameter is optional; file_line should work just as before if you do not specify this parameter... so this change should be backwards-compatible. If you do specify the parameter, it is treated as a regular expression that should be used when looking through the file for a line. This allows you to do things like find a line that begins with a certain prefix (e.g., "foo=.*"), and *replace* the existing line with the line you specify in your "line" parameter. Without this capability, if you already had a line "foo=bar" in your file and your "line" parameter was set to "foo=baz", you'd end up with *both* lines in the final file. In many cases this is undesirable.
2012-08-14Merge branch '2.4.x'Jeff McCune
* 2.4.x: (#15872) Add to_bytes function
2012-08-14Merge branch 'feature/2.4.x/to_bytes_function' into 2.4.xJeff McCune
* feature/2.4.x/to_bytes_function: (#15872) Add to_bytes function
2012-08-14(#15872) Add to_bytes functionErik Dalén
Converts a string like "2 MB" to the value in bytes. Useful for comparisons on facts that return a human readable number instead of machine readable.
2012-08-13re-formattingDan Bode
This commit refactors to ensure 80 character lines.
2012-08-13Add better docs about duplicate resource failuresDan Bode
This commit adds better inline documentation explaining how replicate resource definitions can occur if the resource exists and does not have matching parameters.
2012-08-13Handle undef for parameter argumentDan Bode
This commit adds better handling of the case where undef is passed as the parameter value. This works by converting '' into []
2012-08-13Add function ensure_resource and defined_with_paramsDan Bode
This commit adds 2 new functions with unit tests. defined_with_params works similarily to puppet's defined function, except it allows you to also specify a hash of params. defined_with_params will return true if a resource also exists that matches the specified type/title (just like with defined) as well as all of the specified params. ensure_resource is a function that basically combines defined_with_params with create_resources to conditionally create resources only if the specified resource (title, type, params) does not already exist. These functions are created to serve as an alternative to using defined as follows: if ! defined(Package['some_package']) { package { 'some_package': ensure => present, } The issue with this usage is that there is no guarentee about what parameters were set in the previous definition of the package that made its way into the catalog. ensure_resource could be used instead, as: ensure_resource('package', 'some_package', { 'ensure' => 'present' }) This will creat the package resources only if another resource does not exist with the specified parameters.
2012-08-10Merge branch '2.4.x'Patrick Carlisle
* 2.4.x: (Maint) use PuppetlabsSpec::PuppetInternals.scope (master) Disable tests that fail on 2.6.x due to #15912
2012-08-10(Maint) use PuppetlabsSpec::PuppetInternals.scope (master)Jeff McCune
This patch is the same approach as the one that want into 2.3.x. It covers the functions in master that do not exist in 2.3.x. 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::PuppetInternals.scope } This patch simply implements this across the board. Paired-with: Andrew Parker <andy@puppetlabs.com>
2012-08-10Merge branch '2.3.x' into 2.4.xPatrick Carlisle
* 2.3.x: Disable tests that fail on 2.6.x due to #15912