puppet_stdlib.git
7 years agoMerge remote-tracking branch 'pr/56' into pull-56
Adrien Thebo [Tue, 28 May 2013 18:03:51 +0000 (11:03 -0700)]
Merge remote-tracking branch 'pr/56' into pull-56

Conflicts:
lib/puppet/parser/functions/range.rb
spec/unit/puppet/parser/functions/range_spec.rb

7 years agoMerge pull request #159 from fiddyspence/feature/base64
Adrien Thebo [Fri, 24 May 2013 16:40:50 +0000 (09:40 -0700)]
Merge pull request #159 from fiddyspence/feature/base64

Adding base64 function

7 years agoAdding base64 function
fiddyspence [Fri, 24 May 2013 15:33:24 +0000 (16:33 +0100)]
Adding base64 function

Adding base64 function and spec test.  Included a bonus fix to
validate_slength_spec.rb to put the expectation message in the right
place.

7 years agoMerge pull request #157 from rohanrns/master
Hailee Kenney [Mon, 20 May 2013 16:17:11 +0000 (09:17 -0700)]
Merge pull request #157 from rohanrns/master

Trivial documentation fix for upcase function.

7 years agoTrivial documentation fix
Rohan Sheth [Sat, 18 May 2013 18:48:41 +0000 (11:48 -0700)]
Trivial documentation fix

7 years agoMerge pull request #155 from AlexCline/feature/master/array_comparison_functions
Hailee Kenney [Wed, 15 May 2013 20:56:15 +0000 (13:56 -0700)]
Merge pull request #155 from AlexCline/feature/master/array_comparison_functions

(#20684) Add array comparison functions, difference, intersection and union

7 years agoMerge pull request #147 from mhellmic/master
Adrien Thebo [Wed, 15 May 2013 17:58:04 +0000 (10:58 -0700)]
Merge pull request #147 from mhellmic/master

don't fail on undef variable in merge

7 years ago(#20684) Add array comparison functions, difference, intersection and union.
Alex Cline [Mon, 13 May 2013 16:09:33 +0000 (12:09 -0400)]
(#20684) Add array comparison functions, difference, intersection and union.

Included is code, tests and documentation for the difference, intersection
and union functions for comparing arrays.

7 years agoMerge branch 'puppetlabs-release/four_one_oh'
Jeff McCune [Fri, 10 May 2013 21:23:58 +0000 (14:23 -0700)]
Merge branch 'puppetlabs-release/four_one_oh'

* puppetlabs-release/four_one_oh:
  Update Modulefile, CHANGELOG for version 4.1.0

closes #154

7 years agoUpdate Modulefile, CHANGELOG for version 4.1.0
Ryan Coleman [Fri, 10 May 2013 16:54:39 +0000 (09:54 -0700)]
Update Modulefile, CHANGELOG for version 4.1.0

This commit alters the module metadata to indicate a 4.1.0 version
release for the Puppet Forge. It contains backwards compatible
features, refactors and bug fixes.

CHANGELOG updated by JJM

7 years agoAdded rspec tests for the new behaviour of merge accepting empty strings
Martin Hellmich [Wed, 8 May 2013 16:20:56 +0000 (18:20 +0200)]
Added rspec tests for the new behaviour of merge accepting empty strings

added test that '' is accepted
changed a test that a number is correctly rejected with a type error

7 years agofix in merge.rb: refine the checking if an argument is an empty string
Martin Hellmich [Wed, 8 May 2013 15:14:28 +0000 (17:14 +0200)]
fix in merge.rb: refine the checking if an argument is an empty string

7 years agoMerge branch 'fix_facts_dot_d_with_pe'
Jeff McCune [Tue, 7 May 2013 19:10:06 +0000 (12:10 -0700)]
Merge branch 'fix_facts_dot_d_with_pe'

* fix_facts_dot_d_with_pe:
  (maint) Indent facter_dot_d with 2 spaces
  (#20582) Restore facter_dot_d to stdlib for PE users
  Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""
  (maint) Update Gemfile with GEM_FACTER_VERSION

closes #153

7 years ago(maint) Indent facter_dot_d with 2 spaces
Jeff McCune [Tue, 7 May 2013 16:44:43 +0000 (09:44 -0700)]
(maint) Indent facter_dot_d with 2 spaces

Whitespace only re-flow of facter_dot_d.rb

7 years ago(#20582) Restore facter_dot_d to stdlib for PE users
Jeff McCune [Mon, 6 May 2013 23:29:35 +0000 (16:29 -0700)]
(#20582) Restore facter_dot_d to stdlib for PE users

Without this patch Puppet Enterprise users who install the most recent
version of stdlib lose the ability to resolve certain facts critical to
the operation of Puppet Enterprise.  These facts are defined externally
in the file
`/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`.
As an example, Puppet Enterprise catalogs fail to compile if the
`fact_stomp_server`, and `fact_stomp_port` facts are not defined.

`facter_dot_d` was removed from stdlib version 4 because Facter version
1.7 now supports external facts defined in
`/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`.
Puppet Enterprise does not yet include Facter 1.7, however.  The most
recent PE release, 2.8.1, includes Facter 1.6.17.  With this version of
Facter, users who replace the version of stdlib that ships with PE with
the most recent version from the Forge will lose the ability to resolve
facts from
`/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`.

This patch addresses the problem by detecting if Facter version < 1.7 is
loaded.  If so, then the facter_dot_d.rb facts will be defined using the
stdlib custom fact.  If Facter >= 1.7 is being used then stdlib will not
define external facts.

7 years agoRevert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""
Jeff McCune [Mon, 6 May 2013 21:54:46 +0000 (14:54 -0700)]
Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""

This reverts commit 8fc00ea5b6b39b220ebc6391489915dbeeb364ab.

We're restoring facts_dot_d support to stdlib because users are pulling
in the latest version of stdlib while on Puppet Enterprise which breaks
the operation of PE itself when the fact_stomp_server and
fact_stomp_port facts are not defined.  They are not defined in PE
because PE runs with Facter 1.6.17 and Puppet 2.7.21

7 years ago(maint) Update Gemfile with GEM_FACTER_VERSION
Jeff McCune [Mon, 6 May 2013 23:22:59 +0000 (16:22 -0700)]
(maint) Update Gemfile with GEM_FACTER_VERSION

Without this patch we cannot explicitly set the version of Facter to
integrate using Bundler.  This patch addresses the problem by adding a
new environment variable, GEM_FACTER_VERSION which allows bundler to
install a specific version of Facter.  GEM_FACTER_VERSION is the
variable name instead of FACTER_GEM_VERSION to prevent the gem_version
fact from being defined.  In addition, GEM_PUPPET_VERSION is defined
based on PUPPET_GEM_VERSION in order to match the environment names and
provide backwards compatibility with CI jobs.

7 years agoMerge pull request #152 from AlexCline/feature/master/allow_arrays_in_ensure_resource
Adrien Thebo [Mon, 6 May 2013 23:54:17 +0000 (16:54 -0700)]
Merge pull request #152 from AlexCline/feature/master/allow_arrays_in_ensure_resource

(#20548) Allow an array of resource titles to be passed into the ensure_...

7 years agoTerser method of string to array conversion courtesy of ethooz.
Alex Cline [Mon, 6 May 2013 20:16:38 +0000 (16:16 -0400)]
Terser method of string to array conversion courtesy of ethooz.

7 years agoRefactor ensure_resource expectations
Alex Cline [Mon, 6 May 2013 19:30:35 +0000 (15:30 -0400)]
Refactor ensure_resource expectations

This splits out the ensure_resource expectations into separate
blocks for clarity.  Per adrienthebo's recommendation.

7 years agoChanged str-to-array conversion and removed abbreviation.
Alex Cline [Mon, 6 May 2013 17:52:57 +0000 (13:52 -0400)]
Changed str-to-array conversion and removed abbreviation.

7 years ago(#20548) Allow an array of resource titles to be passed into the ensure_resource...
Alex Cline [Fri, 3 May 2013 19:47:27 +0000 (15:47 -0400)]
(#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.

7 years agoMerge pull request #150 from raphink/dev/dirname_function
Adrien Thebo [Thu, 2 May 2013 22:17:32 +0000 (15:17 -0700)]
Merge pull request #150 from raphink/dev/dirname_function

Add a dirname function

7 years agoAdd a dirname function
Raphaël Pinson [Thu, 2 May 2013 13:10:59 +0000 (15:10 +0200)]
Add a dirname function

7 years agoMerge branch 'msmithgu-small-typo-fix'
Jeff McCune [Tue, 30 Apr 2013 00:18:09 +0000 (17:18 -0700)]
Merge branch 'msmithgu-small-typo-fix'

* msmithgu-small-typo-fix:
  (maint) Fix a small typo in hash() description

closes #148

7 years ago(maint) Fix a small typo in hash() description
Mark Smith-Guerrero [Mon, 29 Apr 2013 13:19:07 +0000 (09:19 -0400)]
(maint) Fix a small typo in hash() description

7 years agocheck if an argument supposed to be merged is empty to
Martin Hellmich [Mon, 22 Apr 2013 21:26:22 +0000 (23:26 +0200)]
check if an argument supposed to be merged is empty to
pass over undefs without failing

7 years agoMerge branch 'master' of git://github.com/puppetlabs/puppetlabs-stdlib
Martin Hellmich [Mon, 22 Apr 2013 21:24:38 +0000 (23:24 +0200)]
Merge branch 'master' of git://github.com/puppetlabs/puppetlabs-stdlib

7 years agoMerge branch 'update_gemspec' for 4.0.2
Jeff McCune [Fri, 12 Apr 2013 17:12:16 +0000 (10:12 -0700)]
Merge branch 'update_gemspec' for 4.0.2

* update_gemspec:
  Update gemspec, Modulefile, CHANGELOG for 4.0.2

closes #145
[ci skip]

7 years agoUpdate gemspec, Modulefile, CHANGELOG for 4.0.2
Jeff McCune [Fri, 12 Apr 2013 16:23:34 +0000 (09:23 -0700)]
Update gemspec, Modulefile, CHANGELOG for 4.0.2

Without this patch the information displayed on rubygems.org does not
clearly convey the intent of the Gem format of stdlib from the official
puppet module format of stdlib.  This is a problem because end users
might get confused and start installing stdlib from rubygems.org

This patch addresses the problem by making it clear that the gem version
of stdlib is not intended for end users, but rather is specifically
intended to make it easier for other module authors to depend on stdlib
and have that dependency automatically resolved using a Gemfile.

[ci skip]

7 years agoMerge pull request #144 from ghoneycutt/compat_matrix
Jeff McCune [Fri, 12 Apr 2013 16:40:24 +0000 (09:40 -0700)]
Merge pull request #144 from ghoneycutt/compat_matrix

adds compatibility matrix

7 years agoadds compatibility matrix
Garrett Honeycutt [Fri, 12 Apr 2013 11:04:15 +0000 (13:04 +0200)]
adds compatibility matrix

7 years agoMerge branch 'philandstuff-master'
Jeff McCune [Fri, 12 Apr 2013 00:57:27 +0000 (17:57 -0700)]
Merge branch 'philandstuff-master'

* philandstuff-master:
  Add behavior example for anchor refresh propagation
  Make the anchor type propagate refresh events

closes #78

7 years agoAdd behavior example for anchor refresh propagation
Jeff McCune [Fri, 12 Apr 2013 00:55:40 +0000 (17:55 -0700)]
Add behavior example for anchor refresh propagation

Without this patch we don't have a spec test to make sure the anchor
resource type passes notify events along.  This patch addresses the
problem by using RSpec Puppet to build a catalog, apply the catalog,
then pull a resource out of the transaction and make sure the resource
was triggered.

7 years agoMake the anchor type propagate refresh events
Philip Potter [Thu, 12 Jul 2012 16:05:23 +0000 (17:05 +0100)]
Make the anchor type propagate refresh events

Without this patch the anchor resource does not propogate refresh
events, making it difficult to subscribe to a class which has been
notified by another resource.

7 years agoMerge branch 'cprice-puppet-ticket/master/13695-readme-about-puppetlabs-spec-helper'
Jeff McCune [Thu, 11 Apr 2013 23:42:58 +0000 (16:42 -0700)]
Merge branch 'cprice-puppet-ticket/master/13695-readme-about-puppetlabs-spec-helper'

* cprice-puppet-ticket/master/13695-readme-about-puppetlabs-spec-helper:
  (#13695) add README about puppetlabs_spec_helper

[ci skip]
closes #63

7 years ago(#13695) add README about puppetlabs_spec_helper
Chris Price [Fri, 13 Apr 2012 22:35:43 +0000 (15:35 -0700)]
(#13695) add README about puppetlabs_spec_helper

7 years agoUpdate gemspec, CHANGELOG, Modulefile for 4.0.1
Jeff McCune [Thu, 11 Apr 2013 21:31:29 +0000 (14:31 -0700)]
Update gemspec, CHANGELOG, Modulefile for 4.0.1

7 years agoFix README function documentation
Jeff McCune [Thu, 11 Apr 2013 21:29:56 +0000 (14:29 -0700)]
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.

7 years agoMerge branch stdlib 4.0.0 release
Jeff McCune [Thu, 11 Apr 2013 21:16:57 +0000 (14:16 -0700)]
Merge branch stdlib 4.0.0 release

* v4:
  Update gemspec for 4.0.0
  Update function documentation for 4.0.0
  Update Modulefile, README, CHANGELOG for stdlib-4.0.0

7 years agoUpdate gemspec for 4.0.0
Jeff McCune [Thu, 11 Apr 2013 21:14:02 +0000 (14:14 -0700)]
Update gemspec for 4.0.0

7 years agoUpdate function documentation for 4.0.0
Jeff McCune [Thu, 11 Apr 2013 21:04:31 +0000 (14:04 -0700)]
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.

7 years agoUpdate Modulefile, README, CHANGELOG for stdlib-4.0.0
Jeff McCune [Thu, 11 Apr 2013 20:44:05 +0000 (13:44 -0700)]
Update Modulefile, README, CHANGELOG for stdlib-4.0.0

7 years agoAdd ability to use puppet from git via bundler
Jeff McCune [Thu, 11 Apr 2013 16:49:53 +0000 (09:49 -0700)]
Add ability to use puppet from git via bundler

Without this patch the Gemfile can only satisfy dependencies using
officially release gem versions.  This is a problem because we want to
test stdlib against the latest HEAD of the puppet git repository.

This patch addresses the problem by copying over the location_for method
from the Puppet Gemfile, which will parse out git://, file:// or Gem
version specifications.

This, in turn, allows jobs to be configured to run with different
dependency integrations.

7 years agoMerge branch 'dalen-count'
Jeff McCune [Wed, 10 Apr 2013 21:40:13 +0000 (14:40 -0700)]
Merge branch 'dalen-count'

* dalen-count:
  (maint) Make stdlib usable as a Ruby GEM
  (maint) Add the behavior for count() with arrays and hashes
  Add a count function

closes #143

7 years ago(maint) Make stdlib usable as a Ruby GEM
Jeff McCune [Wed, 10 Apr 2013 21:35:42 +0000 (14:35 -0700)]
(maint) Make stdlib usable as a Ruby GEM

Without this patch it is inconvenient to use the functions included in
stdlib in a development setting.  The Puppet modulepath must be
explicitly set for the functions to be automatically loaded.

This patch addresses the problem by adding a gem specification and
dependency Gemfile.  This makes it possible to directly use stdlib and
all of the components it depends upon, like so:

    $ bundle install --path .bundle/gems/
    $ bundle exec puppet apply -e 'notice count([1, 2, 3])'

The first command will install all of the dependencies, including Puppet
and Facter, into the local project directory.  The second command will
make stdlib avaialable as a Gem, which will be picked up by Puppet since
(#7788) was merged into Puppet in the 3.0 release.

7 years ago(maint) Add the behavior for count() with arrays and hashes
Jeff McCune [Wed, 10 Apr 2013 21:33:08 +0000 (14:33 -0700)]
(maint) Add the behavior for count() with arrays and hashes

Without this patch the expected behavior of the count() function when
dealing with an out of bound array index and with a hash key that does
not exist is implicitly encoded in the spec examples.  This is a problem
because the expected behavior is not clear for something similar to the
following example:

    node default {
      $ary = [ 1, 2, 3 ]
      $ary_undef = $ary[100]
      $hsh = { 'one' => 1 }
      $hsh_undef = $hsh['dne']
      $count = count(['hi', $ary_undef, $hsh_undef])
      notice "Count is ${count}"
    }

This patch addresses the problem by making the expected behavior
explicit in the examples.

7 years agoAdd a count function
Erik Dalén [Wed, 10 Apr 2013 12:38:14 +0000 (14:38 +0200)]
Add a count function

Similar to the ruby count method on arrays.

7 years agoMerge branch '4.x'
Adrien Thebo [Mon, 8 Apr 2013 17:06:17 +0000 (10:06 -0700)]
Merge branch '4.x'

7 years agoMerge branch '3.x' into 4.x
Adrien Thebo [Mon, 8 Apr 2013 17:06:08 +0000 (10:06 -0700)]
Merge branch '3.x' into 4.x

7 years agoMerge branch '2.x' into 3.x
Adrien Thebo [Mon, 8 Apr 2013 17:05:29 +0000 (10:05 -0700)]
Merge branch '2.x' into 3.x

This ignores the 2.x .travis.yml when merging up since that version is
only applicable to the 2.x branch.

Conflicts:
.travis.yml

7 years agoMerge branch '2.x-backport_gemfile' into 2.x
Adrien Thebo [Mon, 8 Apr 2013 17:04:43 +0000 (10:04 -0700)]
Merge branch '2.x-backport_gemfile' into 2.x

7 years ago(maint) Backport Gemfile and .travis.yml to 2.x
Adrien Thebo [Mon, 25 Feb 2013 22:00:20 +0000 (14:00 -0800)]
(maint) Backport Gemfile and .travis.yml to 2.x

This is a partial backport and update of 03c5c4a434c2290c021034dbfed82cb0f97e0e87
to add travis-ci support and a Gemfile to 2.x. Right now we're not
testing 2.x in travis-ci and we're experiencing spec failures because we
have to install rspec-puppet from git. The best resolution for this is
to consistently use a Gemfile for running tests.

This commit also rewrites the .travis.yml for 2.x to only test 2.x
versions against ruby 1.8.7 and Puppet < 3.0

Conflicts:
.travis.yml

7 years agoMerge branch 'amosshapira-any2array'
Jeff McCune [Wed, 3 Apr 2013 21:05:52 +0000 (14:05 -0700)]
Merge branch 'amosshapira-any2array'

* amosshapira-any2array:
  Remove resundant code
  (#19998) fix name of function in a comment
  (#19998) Implement any2array

closes #140

7 years agoRemove resundant code
Amos Shapira [Mon, 1 Apr 2013 03:52:07 +0000 (14:52 +1100)]
Remove resundant code

7 years ago(#19998) fix name of function in a comment
Amos Shapira [Sun, 31 Mar 2013 12:47:11 +0000 (23:47 +1100)]
(#19998) fix name of function in a comment

7 years ago(#19998) Implement any2array
Amos Shapira [Sun, 31 Mar 2013 12:37:30 +0000 (23:37 +1100)]
(#19998) Implement any2array

This change is to implement a new function "any2array", which will take any
argument or arguments and create an array which contains it. If the argument
is a single array then it will be returned as-is. If the argument is a single
hash then it will be converted into an array. Otherwise (if there are more than
one argument, or the only argument is not an array or a hash) the function will
return an array containing all the arguments.

7 years agoMerge pull request #139 from hakamadare/19864_num2bool_match_fix
Adrien Thebo [Mon, 1 Apr 2013 16:37:15 +0000 (09:37 -0700)]
Merge pull request #139 from hakamadare/19864_num2bool_match_fix

(19864) num2bool match fix

7 years agoCleanup per adrianthebo suggestions
Steve Huff [Mon, 1 Apr 2013 15:44:09 +0000 (11:44 -0400)]
Cleanup per adrianthebo suggestions

* use Float() to process string arguments
* get rid of doubly nested arrays
* removing needless ternary operator
* improving error message handling

7 years ago(19864) num2bool match fix
Steve Huff [Fri, 29 Mar 2013 19:06:36 +0000 (15:06 -0400)]
(19864) num2bool match fix

This is a bit more heavy-handed than I might like, but it does appear to
do the right things:

* accepts numeric input appropriately, truncating floats
* matches string input against a regex, then coerces number-looking
  strings to int
* makes a best effort to coerce anything else to a string, then subjects
  it to the same treatment
* raises an error in the event of incorrect number of arguments or
  non-number-looking strings

I've also included some additional unit tests.

7 years agoReworked number-handling logic
Steve Huff [Fri, 29 Mar 2013 16:03:33 +0000 (12:03 -0400)]
Reworked number-handling logic

No more coercing to String and regex matching.  Instead, we now coerce
to Integer at the beginning or raise an error if we cannot coerce to
Integer.

A consequence of this change is that the function will now accept
blatantly non-numeric strings as input, and return false.  This seems a
bit goofy to me, but it's how String#to_i works.  If we really don't
like this, then I'm open to suggestions.

7 years agoEnable num2bool to accept numeric input
Steve Huff [Fri, 29 Mar 2013 14:04:05 +0000 (10:04 -0400)]
Enable num2bool to accept numeric input

Also ignore rspec fixtures directory

7 years agoMerge branch '4.x'
Adrien Thebo [Wed, 27 Mar 2013 21:04:19 +0000 (14:04 -0700)]
Merge branch '4.x'

7 years agoMerge branch '3.x' into 4.x
Adrien Thebo [Wed, 27 Mar 2013 21:04:12 +0000 (14:04 -0700)]
Merge branch '3.x' into 4.x

7 years agoMerge branch '2.x' into 3.x
Adrien Thebo [Wed, 27 Mar 2013 21:04:00 +0000 (14:04 -0700)]
Merge branch '2.x' into 3.x

7 years agoMerge branch 'pull-136' into 2.x
Adrien Thebo [Wed, 27 Mar 2013 21:03:40 +0000 (14:03 -0700)]
Merge branch 'pull-136' into 2.x

7 years agoAllow comparisons of Numeric and number as String
Erik Dalén [Wed, 20 Mar 2013 15:36:20 +0000 (16:36 +0100)]
Allow comparisons of Numeric and number as String

Puppet passes numbers as String to functions, but it makes more sense to
compare them as Numeric.
But sometimes Puppet passes them as the wrong type, see:
https://projects.puppetlabs.com/issues/19812

7 years agoMerge branch 'pull-138'
Adrien Thebo [Wed, 27 Mar 2013 20:40:29 +0000 (13:40 -0700)]
Merge branch 'pull-138'

This closes GH-138.

7 years ago(maint) better error reporting for prefix and suffix
Adrien Thebo [Wed, 27 Mar 2013 20:37:25 +0000 (13:37 -0700)]
(maint) better error reporting for prefix and suffix

When prefix and suffix did error checking with positional arguments,
they would not report the position of the argument that failed to
validate. This commit changes the messages to indicate which argument
failed.

7 years agoprefix: fix doc typo Examles -> Examples
Richard Soderberg [Tue, 26 Mar 2013 22:49:09 +0000 (15:49 -0700)]
prefix: fix doc typo Examles -> Examples

7 years agoadd suffix function to accompany the prefix function
Richard Soderberg [Tue, 26 Mar 2013 22:45:40 +0000 (15:45 -0700)]
add suffix function to accompany the prefix function

7 years agoMerge pull request #135 from willaerk/master
Adrien Thebo [Tue, 19 Mar 2013 17:58:55 +0000 (10:58 -0700)]
Merge pull request #135 from willaerk/master

Add floor function implementation and unit tests

7 years agoAdd floor function implementation and unit tests
Kristof Willaert [Tue, 19 Mar 2013 09:00:57 +0000 (10:00 +0100)]
Add floor function implementation and unit tests

7 years agoMerge branch 'pull-59'
Adrien Thebo [Mon, 18 Mar 2013 22:46:41 +0000 (15:46 -0700)]
Merge branch 'pull-59'

This closes GH-59

7 years ago(#13610) Add is_function_available to stdlib
Eric Shamow [Wed, 4 Apr 2012 02:30:46 +0000 (22:30 -0400)]
(#13610) Add is_function_available to stdlib

This function provides a simple wrapper around
Puppet::Parser::Functions.function for access within Puppet manifests.
This will allow users to check whether or not a plugin or functionality
such as hiera is installed on the server.

7 years agoMerge branch '4.x'
Adrien Thebo [Mon, 18 Mar 2013 22:38:14 +0000 (15:38 -0700)]
Merge branch '4.x'

7 years agoMerge branch '3.x' into 4.x
Adrien Thebo [Mon, 18 Mar 2013 22:38:07 +0000 (15:38 -0700)]
Merge branch '3.x' into 4.x

7 years agoMerge branch '2.x' into 3.x
Adrien Thebo [Mon, 18 Mar 2013 22:37:56 +0000 (15:37 -0700)]
Merge branch '2.x' into 3.x

7 years agoMerge branch 'pull-115' into 2.x
Adrien Thebo [Mon, 18 Mar 2013 22:37:46 +0000 (15:37 -0700)]
Merge branch 'pull-115' into 2.x

7 years agostr2bool should return a boolean if called with a boolean
Justin Lambert [Mon, 17 Dec 2012 13:22:36 +0000 (06:22 -0700)]
str2bool should return a boolean if called with a boolean

7 years agoFix number of arguments check in flatten()
Uwe Stuehler [Tue, 23 Oct 2012 14:43:03 +0000 (16:43 +0200)]
Fix number of arguments check in flatten()

The function only uses the first argument, so raise an error with
too few arguments *and* with too many arguments.

7 years agoMerge branch '3.x' into 4.x
Adrien Thebo [Mon, 18 Mar 2013 22:06:33 +0000 (15:06 -0700)]
Merge branch '3.x' into 4.x

7 years agoMerge branch '2.x' into 3.x
Adrien Thebo [Mon, 18 Mar 2013 22:06:07 +0000 (15:06 -0700)]
Merge branch '2.x' into 3.x

7 years agoMerge branch 'pull-98' into 2.x
Adrien Thebo [Mon, 18 Mar 2013 22:05:23 +0000 (15:05 -0700)]
Merge branch 'pull-98' into 2.x

7 years agoFix number of arguments check in flatten()
Uwe Stuehler [Tue, 23 Oct 2012 14:43:03 +0000 (16:43 +0200)]
Fix number of arguments check in flatten()

The function only uses the first argument, so raise an error with
too few arguments *and* with too many arguments.

7 years agoAdd contributing document
Jeff McCune [Mon, 11 Mar 2013 18:06:33 +0000 (11:06 -0700)]
Add contributing document

Copied from the same one included in Puppet and Facter.

[ci skip]

7 years agoMerge pull request #132 from raphink/dev/missing_doc
Adrien Thebo [Mon, 4 Mar 2013 23:25:53 +0000 (15:25 -0800)]
Merge pull request #132 from raphink/dev/missing_doc

Add missing documentation for validate_augeas and validate_cmd to README.markdown

7 years agoAdd missing documentation for validate_augeas and validate_cmd to README.markdown
Raphaël Pinson [Mon, 4 Mar 2013 22:37:57 +0000 (23:37 +0100)]
Add missing documentation for validate_augeas and validate_cmd to README.markdown

7 years agoMerge branch '4.x'
Jeff McCune [Mon, 25 Feb 2013 22:19:13 +0000 (14:19 -0800)]
Merge branch '4.x'

* 4.x:
  (maint) Add Ruby 2.0.0 to Travis build matrix

Conflicts:
.gitignore
.travis.yml
Gemfile

7 years agoMerge branch '3.x' into 4.x
Jeff McCune [Mon, 25 Feb 2013 22:11:18 +0000 (14:11 -0800)]
Merge branch '3.x' into 4.x

* 3.x:
  (maint) Add Ruby 2.0.0 to Travis build matrix

7 years agoMerge branch 'maint/3.x/ruby_two_travis' into 3.x
Jeff McCune [Mon, 25 Feb 2013 22:11:07 +0000 (14:11 -0800)]
Merge branch 'maint/3.x/ruby_two_travis' into 3.x

* maint/3.x/ruby_two_travis:
  (maint) Add Ruby 2.0.0 to Travis build matrix

7 years ago(maint) Add Ruby 2.0.0 to Travis build matrix
Jeff McCune [Mon, 25 Feb 2013 22:00:20 +0000 (14:00 -0800)]
(maint) Add Ruby 2.0.0 to Travis build matrix

Without this patch we're not testing against Ruby 2.0.0 which has recently been
released.  This is a problem because we'd like a way to be notified if a change
set breaks compatibility with future supported versions of Ruby.

This patch should not be taken as an indication that we fully support Ruby 2.0,
just as an indication that we plan to in the future.

This patch also tightens up the specifications of the build matrix.  In
addition to testing against the specific Puppet dependency versions, we're also
testing against the latest 2.7.x release and the latest release.

7 years agoMerge branch '4.x'
Jeff McCune [Mon, 18 Feb 2013 20:22:27 +0000 (12:22 -0800)]
Merge branch '4.x'

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

closes #131

7 years agoMerge branch '3.x' into 4.x
Jeff McCune [Mon, 18 Feb 2013 20:22:18 +0000 (12:22 -0800)]
Merge branch '3.x' into 4.x

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

7 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

7 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

7 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

7 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

7 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

7 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