Commit graph

29 commits

Author SHA1 Message Date
Alex Cline
e08734af5a (#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.
2013-05-03 15:47:27 -04:00
Raphaël Pinson
2ba9e4721b Add a dirname function 2013-05-02 15:17:35 +02:00
Mark Smith-Guerrero
928036ac53 (maint) Fix a small typo in hash() description 2013-04-29 17:17:46 -07:00
Garrett Honeycutt
5a2d4c4a68 adds compatibility matrix 2013-04-12 13:04:15 +02:00
Jeff McCune
ab3e30c025 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.
2013-04-11 14:29:57 -07:00
Jeff McCune
ddfafc4a85 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.
2013-04-11 14:04:31 -07:00
Jeff McCune
25b670e6f6 Update Modulefile, README, CHANGELOG for stdlib-4.0.0 2013-04-11 13:52:49 -07:00
Richard Soderberg
a83318d3ee prefix: fix doc typo Examles -> Examples 2013-03-26 15:49:09 -07:00
Richard Soderberg
88a93ac6cd add suffix function to accompany the prefix function 2013-03-26 15:46:55 -07:00
Kristof Willaert
05273419e1 Add floor function implementation and unit tests 2013-03-19 10:00:57 +01:00
Raphaël Pinson
a1510a1e71 Add missing documentation for validate_augeas and validate_cmd to README.markdown 2013-03-04 23:37:57 +01:00
fatmcgav
3cef5d9e33 (#19201) Add concat function to join two arrays
Without this patch applied there is no easy way to append one array to
another.  This is a problem because it is often desirable to join two
arrays without flattening the contents into a single, one dimensional
array.

This patch addresses the problem by adding a `concat()` function which
takes two arguments.  The arguments will be concatenated together and a
new array returned to the caller.

Reviewed-by: Jeff McCune <jeff@puppetlabs.com>
2013-02-12 10:00:09 -08:00
Jaka Hudoklin
20e0e07090 Add getparam function to get defined resource parameters
As far as i know there's no other puppet-dsl-like way to get parameter of
defined resource, so that's why i implemented getparam function, which takes
resource reference and parameter name and returns parameter value.

    Here's another example why this function is really useful:

    define config($path, $config_param1, $config_param2) { }

    define example_resource($config) {
        $path = getparam($config, "path")

        notice("Path is $path")
    }

    define example_resource2($example_resource, $config = getparam($example_resource, "config")) {
        $config_param1 = getparam($config, "config_param1")

        notice("Config parameter is $config_param1")
    }

    define example_resource3($example_resource, $config = getparam($example_resource, "config")) {
        $config_param2 = getparam($config, "config_param2")

        notice("Config parameter is $config_param2")
    }

    class test_getparam {

        config { "config_instance":
            path => "/some/config/path",
            config_param1 => "someconfigtext1",
            config_param2 => "someconfigtext2",
        }

        example_resource { "example_resource_instance":
            config => Config["config_instance"]
        }

        example_resource2 { "example_resource_instance":
            example_resource => Example_resource["example_resource_instance"]
        }

        example_resource3 { "example_resource_instance":
            example_resource => Example_resource2["example_resource_instance"]
        }
    }

    class { "test_getparam": }
2013-01-09 17:51:12 -08:00
Jeff McCune
d0820469b4 (maint) Add Travis CI Support
Without this patch stdlib has Travis CI configuration files, but they
don't seem to completely specify the dependency versions and the build
matrix.  This patch addresses the problem by putting the dependency
information in the conventional Gemfile location.

This patch should coincide with enabling Travis CI support for pull
requests.  A build status image is also included in the project README.
2013-01-05 15:32:43 -08:00
Jeff McCune
3a6085fa80 Clarify that stdlib 3 supports Puppet 3
Minor clarification to the compatibility section of the README.
2012-12-04 15:07:53 -08:00
Jeff McCune
6961179007 Merge branch '3.x'
* 3.x:
  (Maint) Remove core function documentation from README

Conflicts:
	README.markdown
2012-08-30 14:57:55 -07:00
Jeff McCune
c761b32e0a (Maint) Remove core function documentation from README
Without this patch the README contains the documentation for core
functions shipped in Puppet in addition to the functions shipped in
stdlib.

This is a problem because it's confusing for end users trying to get
started with puppet.

This patch makes it so only the stdlib functions are included.
2012-08-30 14:50:00 -07:00
Paul Tötterman
4169e77224 Fix some logical inconsistencies in README 2012-08-30 13:40:12 +03:00
Eric Sorenson
258287941b (#14422) Update README to include the bug tracker URL.
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-19 16:28:32 -07:00
Eric Sorenson
af22a40679 (#14422) Update README to include the bug tracker URL.
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-17 15:15:26 -07:00
Jeff McCune
436ba53168 (Maint) Update README for 3.0.0
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-16 10:59:31 -07:00
Jeff McCune
eb94e17635 (#2157) Update README about facts_dot_d 2012-07-12 17:51:55 -07:00
Jeff McCune
a8d4bbd9e2 (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.
2011-12-30 11:46:21 -08:00
Jeff McCune
ad5316f561 Update CHANGELOG, README and Modulefile for v2.1.1 2011-08-18 12:06:44 -07:00
Jeff McCune
06b549b028 Update CHANGELOG, Modulefile and README for 2.1.0 2011-08-17 16:37:20 -07:00
Jeff McCune
0466e1bc6f Update CHANGELOG and README for 1.0.0 2011-08-04 17:24:46 -07:00
Jeff McCune
0ea7a0ffde Update README with getvar() and validate_hash()
The README now provides quick examples of how to take advantage of the
getvar() and validate_hash() functions included in this release of the
stdlib.
2011-06-21 17:06:46 -07:00
Jeff McCune
6964d13b26 Update README with target versions
Also add the list of things this module will
likely contain.
2011-05-24 11:23:16 -07:00
Jeff McCune
6e9d0465bc Initial commit 2011-05-24 11:06:30 -07:00