]> gitweb.fluxo.info Git - puppet-stdlib.git/log
puppet-stdlib.git
13 years agoMerge branch '2.x' into 3.x
Jeff McCune [Mon, 18 Feb 2013 20:22:04 +0000 (12:22 -0800)]
Merge branch '2.x' into 3.x

* 2.x:
  changed .count to .size to support legacy ruby

13 years agoMerge branch 'mhellmic-2.x' into 2.x
Jeff McCune [Mon, 18 Feb 2013 20:21:49 +0000 (12:21 -0800)]
Merge branch 'mhellmic-2.x' into 2.x

* mhellmic-2.x:
  changed .count to .size to support legacy ruby

13 years agochanged .count to .size to support legacy ruby
Martin Hellmich [Mon, 18 Feb 2013 15:02:15 +0000 (16:02 +0100)]
changed .count to .size to support legacy ruby

13 years agochanged .count to .size to support legacy ruby
Martin Hellmich [Mon, 18 Feb 2013 15:02:15 +0000 (16:02 +0100)]
changed .count to .size to support legacy ruby

13 years agoRevert "Merge pull request #130 from jhoblitt/has_element"
Jeff McCune [Fri, 15 Feb 2013 19:56:16 +0000 (11:56 -0800)]
Revert "Merge pull request #130 from jhoblitt/has_element"

This reverts commit f7a18189ec338b01b0fc89d75def832753af3868, reversing
changes made to 36a7b29630a4d4de17af79b5dd4e9491ec20b123.

I'm reverting this change because of concerns raised by Peter Meier that
it duplicates the "in" operator in the DSL.  The "in" operator is new
information that I did not posses when I made the decision to merge.
Because of this new information I'm un-merging and continuing the
discussion in the comments of
https://projects.puppetlabs.com/issues/19272

Reference: GH-130

13 years agoMerge pull request #130 from jhoblitt/has_element
Jeff McCune [Fri, 15 Feb 2013 06:16:11 +0000 (22:16 -0800)]
Merge pull request #130 from jhoblitt/has_element

(#19272) Add has_element() function

13 years ago(#19272) Add has_element() function
Joshua Hoblitt [Thu, 14 Feb 2013 18:57:35 +0000 (11:57 -0700)]
(#19272) Add has_element() function

It is exceptionally difficult to determine if an array contains an element matching a specific value without an iteration or loop construct.

This function is the Puppet equivalent of Array.includes?(foo) in Ruby.  The implementation is a verbatim copy of has_key() with the minor modifications needed to support arrays instead of hashes.

13 years agoMerge branch 'pull-126'
Adrien Thebo [Tue, 12 Feb 2013 18:20:22 +0000 (10:20 -0800)]
Merge branch 'pull-126'

13 years agoMerge branch 'fatmcgav-feature_19201'
Jeff McCune [Tue, 12 Feb 2013 18:01:04 +0000 (10:01 -0800)]
Merge branch 'fatmcgav-feature_19201'

* fatmcgav-feature_19201:
  (#19201) Add concat function to join two arrays

closes #129

13 years ago(#19201) Add concat function to join two arrays
fatmcgav [Tue, 12 Feb 2013 15:07:18 +0000 (15:07 +0000)]
(#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>
13 years agovalidate_cmd(): Use Puppet::Util::Execution.execute when available
Raphaël Pinson [Thu, 7 Feb 2013 07:56:52 +0000 (08:56 +0100)]
validate_cmd(): Use Puppet::Util::Execution.execute when available

13 years agovalidate_cmd: Use Puppet::Util.execute
Raphaël Pinson [Tue, 5 Feb 2013 08:01:48 +0000 (09:01 +0100)]
validate_cmd: Use Puppet::Util.execute

13 years agoMerge branch 'stephenrjohnson-bug/master/15572_rspec_tests'
Jeff McCune [Wed, 6 Feb 2013 16:14:08 +0000 (08:14 -0800)]
Merge branch 'stephenrjohnson-bug/master/15572_rspec_tests'

* stephenrjohnson-bug/master/15572_rspec_tests:
  ammend .should raise_error to .to raise_error

closes #97

13 years agoammend .should raise_error to .to raise_error
stephen [Tue, 16 Oct 2012 10:54:14 +0000 (11:54 +0100)]
ammend .should raise_error to .to raise_error

13 years agoMerge branch 'raphink-validate_augeas'
Jeff McCune [Wed, 23 Jan 2013 21:30:56 +0000 (13:30 -0800)]
Merge branch 'raphink-validate_augeas'

* raphink-validate_augeas:
  Add an URL to a doc on how to activate augeas in puppet
  validate_augeas: requires augeas
  validate_augeas: Ensure tmpfile is closed and unlinked
  validate_augeas: Ensure augeas handler gets closed
  Add validate_augeas function

closes 114

13 years agoAdd an URL to a doc on how to activate augeas in puppet
Raphaël Pinson [Sun, 20 Jan 2013 12:15:22 +0000 (13:15 +0100)]
Add an URL to a doc on how to activate augeas in puppet

13 years agovalidate_augeas: requires augeas
Raphaël Pinson [Fri, 18 Jan 2013 20:59:47 +0000 (21:59 +0100)]
validate_augeas: requires augeas

13 years agovalidate_augeas: Ensure tmpfile is closed and unlinked
Raphaël Pinson [Fri, 18 Jan 2013 20:54:35 +0000 (21:54 +0100)]
validate_augeas: Ensure tmpfile is closed and unlinked

13 years agovalidate_augeas: Ensure augeas handler gets closed
Raphaël Pinson [Fri, 18 Jan 2013 20:42:54 +0000 (21:42 +0100)]
validate_augeas: Ensure augeas handler gets closed

13 years agoAdd validate_augeas function
Raphaël Pinson [Thu, 6 Dec 2012 10:33:43 +0000 (11:33 +0100)]
Add validate_augeas function

13 years agovalidate_cmd: Make sure tmpfile is always closed and unlinked
Raphaël Pinson [Fri, 18 Jan 2013 20:29:29 +0000 (21:29 +0100)]
validate_cmd: Make sure tmpfile is always closed and unlinked

13 years agoMerge branch 'raphink-validate_cmd'
Jeff McCune [Fri, 18 Jan 2013 17:06:23 +0000 (09:06 -0800)]
Merge branch 'raphink-validate_cmd'

* raphink-validate_cmd:
  Add validate_cmd function

This merge commit closes #113

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