]> gitweb.fluxo.info Git - puppet-stdlib.git/log
puppet-stdlib.git
13 years agoAdd validate_cmd function
Raphaël Pinson [Thu, 6 Dec 2012 10:01:19 +0000 (11:01 +0100)]
Add validate_cmd function

13 years agoMerge branch 'DavidS-master'
Jeff McCune [Tue, 15 Jan 2013 05:50:28 +0000 (21:50 -0800)]
Merge branch 'DavidS-master'

Closes: GH-124
* DavidS-master:
  Add geppetto project definition

13 years agoAdd geppetto project definition
David Schmitt [Mon, 14 Jan 2013 15:05:49 +0000 (16:05 +0100)]
Add geppetto project definition

13 years agoMerge branch 'fix/master/getparam_failure'
Jeff McCune [Tue, 15 Jan 2013 02:41:55 +0000 (18:41 -0800)]
Merge branch 'fix/master/getparam_failure'

* fix/master/getparam_failure:
  (maint) Fix getparam() spec failure on MRI 1.8

13 years ago(maint) Fix getparam() spec failure on MRI 1.8
Jeff McCune [Tue, 15 Jan 2013 02:37:16 +0000 (18:37 -0800)]
(maint) Fix getparam() spec failure on MRI 1.8

Without this patch applied we're getting the following spec failure, but
only in the MRI 1.8 matrix cells.

    Failures:

      1) getparam when compared against a resource with params
         Failure/Error: should run.with_params('User[dan]', '').and_return('')
         ArgumentError:
           interning empty string
         # ./vendor/ruby/1.8/gems/puppet-3.0.2/lib/puppet/parser/resource.rb:42:in `intern'
         # ./vendor/ruby/1.8/gems/puppet-3.0.2/lib/puppet/parser/resource.rb:42:in `[]'
         # ./lib/puppet/parser/functions/getparam.rb:29:in `real_function_getparam'
         # ./vendor/ruby/1.8/gems/puppet-3.0.2/lib/puppet/parser/functions.rb:63:in `send'
         # ./vendor/ruby/1.8/gems/puppet-3.0.2/lib/puppet/parser/functions.rb:63:in `function_getparam'
         # ./vendor/ruby/1.8/gems/rspec-puppet-0.1.5/lib/rspec-puppet/matchers/run.rb:8:in `call'
         # ./vendor/ruby/1.8/gems/rspec-puppet-0.1.5/lib/rspec-puppet/matchers/run.rb:8
         # ./vendor/ruby/1.8/gems/rspec-puppet-0.1.5/lib/rspec-puppet/matchers/run.rb:24:in `call'
         # ./vendor/ruby/1.8/gems/rspec-puppet-0.1.5/lib/rspec-puppet/matchers/run.rb:24
         # ./vendor/ruby/1.8/gems/rspec-expectations-2.11.3/lib/rspec/matchers/extensions/instance_eval_with_args.rb:11:in `instance_exec'
         # ./vendor/ruby/1.8/gems/rspec-expectations-2.11.3/lib/rspec/matchers/extensions/instance_eval_with_args.rb:11:in `instance_eval_with_args'
         # ./vendor/ruby/1.8/gems/rspec-expectations-2.11.3/lib/rspec/matchers/matcher.rb:60:in `matches?'
         # ./vendor/ruby/1.8/gems/rspec-expectations-2.11.3/lib/rspec/expectations/handler.rb:9:in `handle_matcher'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/subject.rb:64:in `should'
         # ./spec/functions/getparam_spec.rb:29
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:113:in `instance_eval'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:113:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:253:in `with_around_each_hooks'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:110:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:378:in `run_examples'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in `map'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in `run_examples'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:360:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `map'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `map'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb:34:in `report'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:25:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
         # ./vendor/ruby/1.8/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `autorun'
         # ./vendor/ruby/1.8/bin/rspec:23

This patch addresses the problem by explicitly returning an empty string if the
string itself is empty.  This avoids trying to convert an empty string to a
symbol which is the root cause of the problem.

13 years agoIgnore bundler turds
Jeff McCune [Thu, 10 Jan 2013 02:02:34 +0000 (18:02 -0800)]
Ignore bundler turds

13 years agoMerge branch 'offlinehacker-feature/master/getparam_function'
Jeff McCune [Thu, 10 Jan 2013 01:52:41 +0000 (17:52 -0800)]
Merge branch 'offlinehacker-feature/master/getparam_function'

* offlinehacker-feature/master/getparam_function:
  Add getparam function to get defined resource parameters

13 years agoAdd getparam function to get defined resource parameters
Jaka Hudoklin [Wed, 2 Jan 2013 12:10:43 +0000 (12:10 +0000)]
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": }

13 years agoMerge pull request #123 from jeffmccune/feature/master/travis_webhook
Jeff McCune [Thu, 10 Jan 2013 00:12:47 +0000 (16:12 -0800)]
Merge pull request #123 from jeffmccune/feature/master/travis_webhook

Tell Travis CI to notify the PDC WebHook

13 years ago(maint) Update puppet version in Travis configuration
Jeff McCune [Mon, 7 Jan 2013 22:48:30 +0000 (14:48 -0800)]
(maint) Update puppet version in Travis configuration

Without this patch we'll test against all Puppet 3.0 versions, but not
4.  This is a problem because the travis configuration should be
relatively future proof to minimize surprises.

This patch addresses the problem by using >= instead of ~> in the
dependency specification.  The patch also combines two different
notification sections into a single entry.

13 years agoTell Travis CI to notify the PDC WebHook
Jeff McCune [Mon, 7 Jan 2013 02:45:43 +0000 (18:45 -0800)]
Tell Travis CI to notify the PDC WebHook

Without this patch the so-called "puppet development community" hook
service isn't being notified when Travis CI accepts jobs.  This is a
problem because we want the ability for Travis Bot to comment on pull
requests as a result of CI build results.  For example, if the build
fails, then Gepetto Bot could make some helpful suggestions on how to
re-run the build by amending a commit and force-pushing the branch.

This patch uses the notifications section of the travis.yml
configuration file, as documented at:
http://about.travis-ci.org/docs/user/notifications/#Webhook-notification

13 years agoMerge pull request #122 from jeffmccune/fix/master/travis
Jeff McCune [Mon, 7 Jan 2013 18:19:21 +0000 (10:19 -0800)]
Merge pull request #122 from jeffmccune/fix/master/travis

Fix typo in travis configuration

13 years agoFix typo in travis configuration
Jeff McCune [Sun, 6 Jan 2013 05:11:53 +0000 (21:11 -0800)]
Fix typo in travis configuration

The exclude keyword was accidentally specified twice.

13 years agoMerge pull request #121 from jeffmccune/fix/master/travis
Jeff McCune [Sun, 6 Jan 2013 05:31:53 +0000 (21:31 -0800)]
Merge pull request #121 from jeffmccune/fix/master/travis

Future proof travis build matrix

13 years agoFuture proof travis build matrix
Jeff McCune [Sun, 6 Jan 2013 05:11:53 +0000 (21:11 -0800)]
Future proof travis build matrix

Without this patch we're not building against ruby head.  This is a
problem because we need to know if standard lib works with the latest
version of MRI.

This patch builds against ruby head but also allows the build to pass if
there are failures with ruby-head.

13 years agoMerge branch 'feature/master/travis_ci'
Jeff McCune [Sat, 5 Jan 2013 23:37:15 +0000 (15:37 -0800)]
Merge branch 'feature/master/travis_ci'

* feature/master/travis_ci:
  (maint) Add Travis CI Support

13 years ago(maint) Add Travis CI Support
Jeff McCune [Sat, 5 Jan 2013 23:01:56 +0000 (15:01 -0800)]
(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.

13 years agoMerge branch '4.x'
Jeff McCune [Thu, 3 Jan 2013 21:39:42 +0000 (13:39 -0800)]
Merge branch '4.x'

* 4.x:
  Add test/validation for is_float if created from an arithmetical operation
  Add test/validation for is_integer if created from an arithmetical operation
  Add test/validation for is_numeric if created from an arithmetical operation

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Thu, 3 Jan 2013 21:39:05 +0000 (13:39 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  Add test/validation for is_float if created from an arithmetical operation
  Add test/validation for is_integer if created from an arithmetical operation
  Add test/validation for is_numeric if created from an arithmetical operation

13 years agoMerge branch '3.2.x' into 3.x
Jeff McCune [Thu, 3 Jan 2013 21:38:36 +0000 (13:38 -0800)]
Merge branch '3.2.x' into 3.x

* 3.2.x:
  Add test/validation for is_float if created from an arithmetical operation
  Add test/validation for is_integer if created from an arithmetical operation
  Add test/validation for is_numeric if created from an arithmetical operation

13 years agoMerge branch 'stephenrjohnson-bug/3.x/18157_arithmetical_operations' into 3.2.x
Jeff McCune [Thu, 3 Jan 2013 21:38:16 +0000 (13:38 -0800)]
Merge branch 'stephenrjohnson-bug/3.x/18157_arithmetical_operations' into 3.2.x

* stephenrjohnson-bug/3.x/18157_arithmetical_operations:
  Add test/validation for is_float if created from an arithmetical operation
  Add test/validation for is_integer if created from an arithmetical operation
  Add test/validation for is_numeric if created from an arithmetical operation

13 years agoAdd test/validation for is_float if created from an arithmetical operation
stephen [Thu, 3 Jan 2013 14:05:29 +0000 (14:05 +0000)]
Add test/validation for is_float if created from an arithmetical operation

13 years agoAdd test/validation for is_integer if created from an arithmetical operation
stephen [Thu, 3 Jan 2013 14:02:58 +0000 (14:02 +0000)]
Add test/validation for is_integer if created from an arithmetical operation

13 years agoAdd test/validation for is_numeric if created from an arithmetical operation
stephen [Thu, 3 Jan 2013 13:53:03 +0000 (13:53 +0000)]
Add test/validation for is_numeric if created from an arithmetical operation

13 years agoMerge branch 'maint/master/update_readme'
Jeff McCune [Tue, 4 Dec 2012 23:09:35 +0000 (15:09 -0800)]
Merge branch 'maint/master/update_readme'

* maint/master/update_readme:
  Clarify that stdlib 3 supports Puppet 3

13 years agoClarify that stdlib 3 supports Puppet 3
Jeff McCune [Tue, 4 Dec 2012 23:07:46 +0000 (15:07 -0800)]
Clarify that stdlib 3 supports Puppet 3

Minor clarification to the compatibility section of the README.

13 years agoMerge branch 'dalen-style_fixes'
Jeff McCune [Fri, 30 Nov 2012 16:19:34 +0000 (08:19 -0800)]
Merge branch 'dalen-style_fixes'

* dalen-style_fixes:
  maint: style guideline fixes

13 years agomaint: style guideline fixes
Erik Dalén [Fri, 30 Nov 2012 10:02:02 +0000 (11:02 +0100)]
maint: style guideline fixes

13 years agoMerge branch '4.x'
Jeff McCune [Wed, 28 Nov 2012 22:45:26 +0000 (14:45 -0800)]
Merge branch '4.x'

* 4.x:
  Update Modulefile, CHANGELOG for 3.2.0

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Wed, 28 Nov 2012 22:45:03 +0000 (14:45 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  Update Modulefile, CHANGELOG for 3.2.0

13 years agoUpdate Modulefile, CHANGELOG for 3.2.0
Jeff McCune [Wed, 28 Nov 2012 22:44:27 +0000 (14:44 -0800)]
Update Modulefile, CHANGELOG for 3.2.0

13 years agoMerge branch '4.x'
Jeff McCune [Wed, 28 Nov 2012 22:39:39 +0000 (14:39 -0800)]
Merge branch '4.x'

* 4.x:
  Update Modulefile, CHANGELOG for 2.6.0

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Wed, 28 Nov 2012 22:39:34 +0000 (14:39 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  Update Modulefile, CHANGELOG for 2.6.0

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Wed, 28 Nov 2012 22:39:29 +0000 (14:39 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  Update Modulefile, CHANGELOG for 2.6.0

Conflicts:
CHANGELOG
Modulefile

13 years agoUpdate Modulefile, CHANGELOG for 2.6.0
Jeff McCune [Wed, 28 Nov 2012 22:38:27 +0000 (14:38 -0800)]
Update Modulefile, CHANGELOG for 2.6.0

13 years agoMerge branch '4.x'
Jeff McCune [Wed, 28 Nov 2012 22:29:39 +0000 (14:29 -0800)]
Merge branch '4.x'

* 4.x:
  Add reject() function

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Wed, 28 Nov 2012 22:29:32 +0000 (14:29 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  Add reject() function

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Wed, 28 Nov 2012 22:29:14 +0000 (14:29 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  Add reject() function

13 years agoMerge branch 'duritong-fun/2.x/reject' into 2.x
Jeff McCune [Wed, 28 Nov 2012 22:29:01 +0000 (14:29 -0800)]
Merge branch 'duritong-fun/2.x/reject' into 2.x

* duritong-fun/2.x/reject:
  Add reject() function

13 years agoAdd reject() function
Peter Meier [Wed, 28 Nov 2012 18:13:57 +0000 (19:13 +0100)]
Add reject() function

Like the grep function, but we can now reject members of an array
based on a pattern.

13 years agoMerge branch '4.x'
Jeff McCune [Wed, 28 Nov 2012 01:09:25 +0000 (17:09 -0800)]
Merge branch '4.x'

* 4.x:
  Revert "(Maint) Add spec/functions to rake test task"

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Wed, 28 Nov 2012 01:08:20 +0000 (17:08 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  Revert "(Maint) Add spec/functions to rake test task"

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Wed, 28 Nov 2012 01:08:12 +0000 (17:08 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  Revert "(Maint) Add spec/functions to rake test task"

Conflicts:
Rakefile

13 years agoRevert "(Maint) Add spec/functions to rake test task"
Jeff McCune [Wed, 28 Nov 2012 01:06:29 +0000 (17:06 -0800)]
Revert "(Maint) Add spec/functions to rake test task"

This reverts commit dbe3c8ecf6379963f583ea11e51e403e5ad55002.

Because testing these against Puppet 2.6.x is causing failures.  These
need to be cleaned up, but I want to leave and this was the behavior
before I tried to "fix" it.

13 years agoMerge branch '4.x'
Jeff McCune [Wed, 28 Nov 2012 00:22:26 +0000 (16:22 -0800)]
Merge branch '4.x'

* 4.x:
  (Maint) Add spec/functions to rake test task
  Add example behaviors for ensure_packages() function
  Add an ensure_packages function.

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Wed, 28 Nov 2012 00:22:18 +0000 (16:22 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  (Maint) Add spec/functions to rake test task
  Add example behaviors for ensure_packages() function
  Add an ensure_packages function.

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Wed, 28 Nov 2012 00:22:11 +0000 (16:22 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  (Maint) Add spec/functions to rake test task
  Add example behaviors for ensure_packages() function
  Add an ensure_packages function.

Conflicts:
Rakefile

13 years agoMerge branch 'metcalfc/2.x/ensure_packages' into 2.x
Jeff McCune [Wed, 28 Nov 2012 00:19:52 +0000 (16:19 -0800)]
Merge branch 'metcalfc/2.x/ensure_packages' into 2.x

* 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.

13 years ago(Maint) Add spec/functions to rake test task
Jeff McCune [Wed, 28 Nov 2012 00:18:07 +0000 (16:18 -0800)]
(Maint) Add spec/functions to rake test task

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.

13 years agoAdd example behaviors for ensure_packages() function
Jeff McCune [Wed, 28 Nov 2012 00:15:32 +0000 (16:15 -0800)]
Add example behaviors for ensure_packages() function

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.

13 years agoAdd an ensure_packages function.
Chad Metcalf [Tue, 18 Sep 2012 18:43:30 +0000 (11:43 -0700)]
Add an ensure_packages function.

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.

13 years agoMerge branch '4.x'
Jeff McCune [Tue, 27 Nov 2012 00:34:23 +0000 (16:34 -0800)]
Merge branch '4.x'

* 4.x:
  (#17797) min() and max() functions

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Tue, 27 Nov 2012 00:34:15 +0000 (16:34 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  (#17797) min() and max() functions

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Tue, 27 Nov 2012 00:34:04 +0000 (16:34 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  (#17797) min() and max() functions

13 years agoMerge branch 'fun/2.x/min_max' into 2.x
Jeff McCune [Tue, 27 Nov 2012 00:33:56 +0000 (16:33 -0800)]
Merge branch 'fun/2.x/min_max' into 2.x

* fun/2.x/min_max:
  (#17797) min() and max() functions

13 years ago(#17797) min() and max() functions
Erik Dalén [Fri, 23 Nov 2012 16:00:04 +0000 (17:00 +0100)]
(#17797) min() and max() functions

returns the min or max of all arguments given to them

13 years agoMerge branch '4.x'
Jeff McCune [Mon, 26 Nov 2012 19:41:34 +0000 (11:41 -0800)]
Merge branch '4.x'

* 4.x:
  (#14670) Fixup file_line autorequire specs
  (#14670) autorequire a file_line resource's path

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Mon, 26 Nov 2012 19:41:25 +0000 (11:41 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  (#14670) Fixup file_line autorequire specs
  (#14670) autorequire a file_line resource's path

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Mon, 26 Nov 2012 19:41:01 +0000 (11:41 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  (#14670) Fixup file_line autorequire specs
  (#14670) autorequire a file_line resource's path

13 years agoMerge branch 'fun/2.x/14670_file_line_autorequire' into 2.x
Jeff McCune [Mon, 26 Nov 2012 19:39:26 +0000 (11:39 -0800)]
Merge branch 'fun/2.x/14670_file_line_autorequire' into 2.x

* fun/2.x/14670_file_line_autorequire:
  (#14670) Fixup file_line autorequire specs
  (#14670) autorequire a file_line resource's path

13 years ago(#14670) Fixup file_line autorequire specs
Jeff McCune [Mon, 26 Nov 2012 19:37:08 +0000 (11:37 -0800)]
(#14670) Fixup file_line autorequire specs

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.

13 years ago(#14670) autorequire a file_line resource's path
Peter Meier [Wed, 23 May 2012 19:42:07 +0000 (21:42 +0200)]
(#14670) autorequire a file_line resource's path

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.

13 years agoMerge branch '4.x'
Jeff McCune [Tue, 20 Nov 2012 21:17:08 +0000 (16:17 -0500)]
Merge branch '4.x'

* 4.x:
  Add join_keys_to_values function

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Tue, 20 Nov 2012 21:16:59 +0000 (16:16 -0500)]
Merge branch '3.x' into 4.x

* 3.x:
  Add join_keys_to_values function

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Tue, 20 Nov 2012 21:16:50 +0000 (16:16 -0500)]
Merge branch '2.x' into 3.x

* 2.x:
  Add join_keys_to_values function

13 years agoMerge branch 'lifton-feature/2.x/join_keys_to_values_function' into 2.x
Jeff McCune [Tue, 20 Nov 2012 21:16:37 +0000 (16:16 -0500)]
Merge branch 'lifton-feature/2.x/join_keys_to_values_function' into 2.x

* lifton-feature/2.x/join_keys_to_values_function:
  Add join_keys_to_values function

13 years agoAdd join_keys_to_values function
Joshua Harlan Lifton [Tue, 20 Nov 2012 03:23:27 +0000 (19:23 -0800)]
Add join_keys_to_values function

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.

13 years agoMerge branch 'jfryman-master'
Jeff McCune [Mon, 19 Nov 2012 16:23:50 +0000 (11:23 -0500)]
Merge branch 'jfryman-master'

* jfryman-master:
  puppet-lint cleanup

13 years agoMerge branch '4.x'
Jeff McCune [Mon, 19 Nov 2012 13:45:48 +0000 (08:45 -0500)]
Merge branch '4.x'

* 4.x:
  Extend delete function for strings and hashes
  Fixed typo

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Mon, 19 Nov 2012 13:45:39 +0000 (08:45 -0500)]
Merge branch '3.x' into 4.x

* 3.x:
  Extend delete function for strings and hashes
  Fixed typo

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Mon, 19 Nov 2012 13:45:31 +0000 (08:45 -0500)]
Merge branch '2.x' into 3.x

* 2.x:
  Extend delete function for strings and hashes
  Fixed typo

13 years agoMerge branch 'lifton-feature/2.x/extend_delete_function' into 2.x
Jeff McCune [Mon, 19 Nov 2012 13:45:18 +0000 (08:45 -0500)]
Merge branch 'lifton-feature/2.x/extend_delete_function' into 2.x

* lifton-feature/2.x/extend_delete_function:
  Extend delete function for strings and hashes
  Fixed typo

13 years agoExtend delete function for strings and hashes
Joshua Harlan Lifton [Sun, 18 Nov 2012 06:27:15 +0000 (22:27 -0800)]
Extend delete function for strings and hashes

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.

13 years agoFixed typo
Joshua Harlan Lifton [Sun, 18 Nov 2012 06:26:57 +0000 (22:26 -0800)]
Fixed typo

13 years agopuppet-lint cleanup
James Fryman [Fri, 9 Nov 2012 17:08:24 +0000 (11:08 -0600)]
puppet-lint cleanup

13 years agoMerge branch '4.x'
Jeff McCune [Thu, 15 Nov 2012 13:57:40 +0000 (08:57 -0500)]
Merge branch '4.x'

* 4.x:
  Add the pick() function

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Thu, 15 Nov 2012 13:57:28 +0000 (08:57 -0500)]
Merge branch '3.x' into 4.x

* 3.x:
  Add the pick() function

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Thu, 15 Nov 2012 13:57:21 +0000 (08:57 -0500)]
Merge branch '2.x' into 3.x

* 2.x:
  Add the pick() function

13 years agoMerge branch 'feature/2.x/pick' into 2.x
Jeff McCune [Thu, 15 Nov 2012 13:56:52 +0000 (08:56 -0500)]
Merge branch 'feature/2.x/pick' into 2.x

* feature/2.x/pick:
  Add the pick() function

13 years agoAdd the pick() function
Gary Larizza [Fri, 3 Aug 2012 22:46:26 +0000 (15:46 -0700)]
Add the pick() function

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.

13 years agoMerge branch '4.x'
Jeff McCune [Wed, 7 Nov 2012 22:03:44 +0000 (14:03 -0800)]
Merge branch '4.x'

* 4.x:
  (#13974) Add predicate functions for interface facts

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Wed, 7 Nov 2012 22:03:31 +0000 (14:03 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  (#13974) Add predicate functions for interface facts

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Wed, 7 Nov 2012 22:03:22 +0000 (14:03 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  (#13974) Add predicate functions for interface facts

13 years agoMerge branch 'add/2.x/13974-has_interface_with' into 2.x
Jeff McCune [Wed, 7 Nov 2012 22:03:08 +0000 (14:03 -0800)]
Merge branch 'add/2.x/13974-has_interface_with' into 2.x

* add/2.x/13974-has_interface_with:
  (#13974) Add predicate functions for interface facts

13 years ago(#13974) Add predicate functions for interface facts
Wil Cooley [Wed, 21 Mar 2012 05:21:53 +0000 (22:21 -0700)]
(#13974) Add predicate functions for interface facts

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.

13 years agoMerge branch '4.x'
Jeff McCune [Wed, 7 Nov 2012 17:44:51 +0000 (09:44 -0800)]
Merge branch '4.x'

* 4.x:
  Add function, uriescape, to URI.escape strings. Redmine #17459
  Add function, uriescape, to URI.escape strings. Redmine #17459
  Add function, uriescape, to URI.escape strings. Redmine #17459
  Update CHANGELOG, Modulefile for 3.1.1

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Wed, 7 Nov 2012 17:44:35 +0000 (09:44 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  Add function, uriescape, to URI.escape strings. Redmine #17459
  Add function, uriescape, to URI.escape strings. Redmine #17459
  Update CHANGELOG, Modulefile for 3.1.1

13 years agoMerge branch 'add/4.x/joejulian-add_uriescape' into 4.x
Jeff McCune [Wed, 7 Nov 2012 17:44:31 +0000 (09:44 -0800)]
Merge branch 'add/4.x/joejulian-add_uriescape' into 4.x

* add/4.x/joejulian-add_uriescape:
  Add function, uriescape, to URI.escape strings. Redmine #17459

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Wed, 7 Nov 2012 17:43:52 +0000 (09:43 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  Add function, uriescape, to URI.escape strings. Redmine #17459

13 years agoMerge branch 'add/3.x/joejulian-add_uriescape' into 3.x
Jeff McCune [Wed, 7 Nov 2012 17:43:47 +0000 (09:43 -0800)]
Merge branch 'add/3.x/joejulian-add_uriescape' into 3.x

* add/3.x/joejulian-add_uriescape:
  Add function, uriescape, to URI.escape strings. Redmine #17459

13 years agoMerge branch 'add/2.x/joejulian-add_uriescape' into 2.x
Jeff McCune [Wed, 7 Nov 2012 17:40:37 +0000 (09:40 -0800)]
Merge branch 'add/2.x/joejulian-add_uriescape' into 2.x

* add/2.x/joejulian-add_uriescape:
  Add function, uriescape, to URI.escape strings. Redmine #17459

13 years agoAdd function, uriescape, to URI.escape strings. Redmine #17459
Joe Julian [Wed, 7 Nov 2012 00:17:57 +0000 (16:17 -0800)]
Add function, uriescape, to URI.escape strings. Redmine #17459

13 years agoAdd function, uriescape, to URI.escape strings. Redmine #17459
Joe Julian [Wed, 7 Nov 2012 00:17:57 +0000 (16:17 -0800)]
Add function, uriescape, to URI.escape strings. Redmine #17459

13 years agoAdd function, uriescape, to URI.escape strings. Redmine #17459
Joe Julian [Wed, 7 Nov 2012 00:17:57 +0000 (16:17 -0800)]
Add function, uriescape, to URI.escape strings. Redmine #17459

13 years agoMerge branch '3.1.x' into 3.x
Jeff McCune [Thu, 25 Oct 2012 23:06:29 +0000 (16:06 -0700)]
Merge branch '3.1.x' into 3.x

* 3.1.x:
  Update CHANGELOG, Modulefile for 3.1.1

13 years agoUpdate CHANGELOG, Modulefile for 3.1.1
Jeff McCune [Thu, 25 Oct 2012 23:06:25 +0000 (16:06 -0700)]
Update CHANGELOG, Modulefile for 3.1.1

13 years agoMerge branch '4.x'
Jeff McCune [Thu, 25 Oct 2012 22:55:11 +0000 (15:55 -0700)]
Merge branch '4.x'

* 4.x:
  Update Modulefile, CHANGELOG for 2.5.1

13 years agoMerge branch '3.x' into 4.x
Jeff McCune [Thu, 25 Oct 2012 22:55:04 +0000 (15:55 -0700)]
Merge branch '3.x' into 4.x

* 3.x:
  Update Modulefile, CHANGELOG for 2.5.1

13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Thu, 25 Oct 2012 22:54:51 +0000 (15:54 -0700)]
Merge branch '2.x' into 3.x

* 2.x:
  Update Modulefile, CHANGELOG for 2.5.1

Conflicts:
CHANGELOG
Modulefile

13 years agoMerge branch '2.5.x' into 2.x
Jeff McCune [Thu, 25 Oct 2012 22:53:40 +0000 (15:53 -0700)]
Merge branch '2.5.x' into 2.x

* 2.5.x:
  Update Modulefile, CHANGELOG for 2.5.1