Age | Commit message (Collapse) | Author |
|
This commit joins all strings that are split over two lines with a plus,
backslash, or double less than so that our magical i18n parser can wave
over the module and mark every ruby string with our i18n function.
|
|
|
|
|
|
|
|
This reverts commit 063c58a992c1b5441b7e7b2a2e4886531035bb25, which
actually removed non-dead code. Specifically, it removed the ability to
make calls such as `range('2..3')`, `range('2...3')`, and
`range('2-3')`.
cf. https://github.com/puppetlabs/puppetlabs-stdlib/pull/443#commitcomment-11055565
|
|
Since a ParseError is always thrown for zero arguments, the if and all
dependent code can be removed.
|
|
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').
|
|
|
|
|
|
Conflicts:
lib/puppet/parser/functions/range.rb
spec/unit/puppet/parser/functions/range_spec.rb
|
|
This patch adds an optional "step" argument to the stdlib range()
function. There is no change to the default behavior of the function;
however, passing a numeric "step" argument invokes the Ruby Range#step
method, e.g.
range("0", "9", "2")
returns
[0,2,4,6,8]
|
|
Without this patch the specified behavior of strings that are numeric
only and zero padded is unclear and untested in the spec tests. This is
a problem because it's not clear that range('00', '10') will actually
return [ "0", "1", ..., "10" ] instead of [ "00", "01", ..., "10" ]
This patch addresses the issue by providing explicit test coverage. If
the string conversion behavior of puppet changes, this test will begin
to fail.
|
|
|
|
|