Age | Commit message (Collapse) | Author |
|
|
|
(MODULES-1329) Allow member to look for array
|
|
Make the range function work with integers
|
|
Currently, the member function allows one to only find if a variable
is part of an array. Sometimes it is useful to find if an array is part
of a bigger array for validation purpose.
|
|
This is needed for the future parser which actually treats numbers as
numbers and strings as strings. With this patch you can use range(1,5)
instead of having to quote them like range('1','5').
|
|
|
|
And some other small formatting fixes that don't belong in this patch.
|
|
|
|
4.3.x
|
|
Added correct converstions for PB and EB.
|
|
MODULES-1413 Add ability for member to take numeric objects
|
|
|
|
|
|
3.7, previous version throw different exception. Wrapping in generic Exception catch all
|
|
|
|
succeed
|
|
|
|
that it was dealing with a string
|
|
* We were converting Exabytes to bytes as Petabytes.
* Updated tests to cover ever unit.
* Added note that we're going by the old, inaccurate definitions of
Kilobytes, Megabytes, etc, in that we treat them as powers of 2.
|
|
validate_augeas
|
|
|
|
Conflicts:
README.markdown
lib/puppet/parser/functions/has_interface_with.rb
|
|
Modules 707
|
|
not to return some interfaces
|
|
|
|
|
|
We need to use
unless value.is_a?(String) || value.is_a?(Array)
rather than
klass = value.class
unless [String, Array].include?(klass)
because the klass version enforces type checking which is too strict, and does
not allow us to accept objects wich have extended String (or Array).
For example, generate() function now returns Puppet::Util::Execution::ProcessOutput
which is just a very simple extension of String. While this in it's self was
not intentional (PUP-2306) it is not unreasonable to cope with objects which
extend Strings
|
|
versions of ruby
|
|
|
|
See: https://tickets.puppetlabs.com/browse/MODULES-457
|
|
|
|
|
|
This commit adds additional documentation to the file_line resource
explaining how it will autorequire file resources when present.
|
|
|
|
|
|
(MODULES-905) Narrow the confinement in bool2str
|
|
Previously, bool2str() accepted a broad array of boolean values and
bare strings, without any attempt to validate that the strings in any
way resembled "true" or "false" (or any of the other values bool2num()
accepts). This commit narrows the input confinement to TrueClass and
FalseClass, which means that bool2str() will only interpolate
strict boolean values now.
|
|
This reverts commit 8499ebdb7f892f2623295058649c67a5553d4732, reversing
changes made to 08b00d9229961d7b3c3cba997bfb35c8d47e4c4b.
|
|
(MODULES-905) Add bool2str() and camelcase() for string manipulation
|
|
file_line supports adding lines after a match, but there are use cases when
having "before" would be useful. For example, in Debian-based OS's, the last
line of /etc/rc.local is "exit 0" it's an incredible pain to deal with
that scenario today.
This commit adds a 'before' parameter to the file_line type, and implements
it for the ruby provider.
|
|
Python likes to have its constants Capitalized, and the capitalize
function only understands strings... so I shave a yak.
bool2str will convert a boolean to its equivalent string value,
and camelcase extends on uppercase & downcase to convert an underscore
delimited string into a camelcased string.
|
|
|
|
Allow concat to take non-array second parameters
|
|
(MODULES-603) Add defaults arguments to ensure_packages()
|
|
Previously this was incorrectly handling facts that were of the form
foo=1+1=2 due to the ='s in the actual fact contents. Fix this and
add tests to try and prevent regressions.
|
|
Without this patch one can not specify package resource specific
parameters. All the ensure_packages() function does it makes sure
the named packages are installed. This patch allows one to pass
default as a second argument and allow greater flexibility on
packages installations.
Use case like the following are now possible :
* ensure_packages(['r10k', 'serverspec'], {'provider' => 'gem'})
* ensure_packages(['ntp'], {'require' => 'Exec[foobar]'})
|
|
Also improve and extend concat tests to lock down functionality
|
|
Instead of modifying the first paramater of deep_merge due to the
use of the merge! function, instead use merge to return a copy of
the merged object. This allows one to continue to use the original
first parameter after the call to deep_merge.
|
|
|
|
This version of pick() does not error out, instead always returning at least
the last argument, even if that too has no "real" value.
|