Peter Souter
b3d007f1da
(MODULES-1582) Improve % detection
...
Avoids any validate commands that have %'s in them other than "... % ..."
2014-12-18 23:35:24 +00:00
Peter Souter
165caa8be1
(MODULES-1582) Initial spike for % placeholder
...
This simply `gsub`'s the file path into where the % placeholder is.
2014-12-18 23:08:33 +00:00
Morgan Haskel
696c89de99
Merge pull request #372 from poikilotherm/feature/master/validate_absolute_path_allow_arrays
...
Allow array of pathes in validate_absolute_path
2014-12-17 14:19:30 -08:00
Morgan Haskel
841b0df210
Merge pull request #368 from rfugina/basename
...
Basename implementation
2014-12-17 11:00:23 -08:00
Rob Fugina
ef3d42f7bb
Added basename() based on Ruby's File.basename
...
Based on dirname code. Includes RSpec tests and docs.
2014-12-17 12:39:40 -06:00
Peter Souter
84bd98645f
(MODULES-444) - Real meat of the change
...
This is the core change, we now go through the array and add it to the first element, instead of just two arguments.
2014-12-04 14:34:25 +00:00
Peter Souter
594c2dd38d
(MODULES-444) Change argument restriction to < 2
2014-12-04 14:33:23 +00:00
Peter Souter
75a6186512
(MODULES-444) Update docs with new functionality
2014-12-04 14:32:39 +00:00
Oliver Bertuch
89995e4db0
Allow array of pathes in validate_absolute_path
2014-11-25 12:45:23 +01:00
Morgan Haskel
c5467cc507
Need to convert strings and fixnums to arrays
2014-11-17 12:27:05 -08:00
Hunter Haugen
fb42396c75
Merge pull request #319 from Spredzy/member_array_in_array
...
(MODULES-1329) Allow member to look for array
2014-11-13 12:27:14 -08:00
Hunter Haugen
b6830f1ade
Merge pull request #365 from dalen/range-integers
...
Make the range function work with integers
2014-11-13 10:16:21 -08:00
Yanis Guenane
c9f906f803
(MODULES-1329) Allow member function to look for array
...
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.
2014-11-12 14:40:34 -05:00
Erik Dalén
ce995e15d5
Make the range function work with integers
...
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').
2014-11-12 16:02:05 +01:00
Erik Dalén
e61f402283
(maint) Fix indentation of range function
2014-11-12 15:52:33 +01:00
Hunter Haugen
4949cfd21c
Fix breaking out of .each loop
...
And some other small formatting fixes that don't belong in this patch.
2014-11-10 16:37:53 -08:00
Travis Fields
c52e262a17
Catch :undefined_variable thrown when Future Parser is enabled with 3.7.x
2014-11-10 16:33:18 -08:00
Morgan Haskel
850297b560
Merge pull request #354 from puppetlabs/4.3.x
...
4.3.x
2014-11-10 11:10:41 -08:00
Travis Fields
406e9dbda2
Merge pull request #343 from zacharyalexstern/fix_to_bytes
...
Added correct converstions for PB and EB.
2014-11-07 13:42:48 -08:00
Morgan Haskel
03f0ecd128
Merge pull request #350 from cyberious/modules1413
...
MODULES-1413 Add ability for member to take numeric objects
2014-11-04 15:29:25 -08:00
Travis Fields
f19aea5a75
MODULES-1413 Ability to for future parser to use member with FixNum types
2014-11-04 14:33:34 -08:00
Travis Fields
35c2dc7ca3
Merge branch '4.3.x'
2014-10-30 10:23:12 -07:00
Travis Fields
6c7da72c0f
Fix validate_cmd, previous addition of SystemCallError only works for Puppet 3.7, previous version throw different exception. Wrapping in generic Exception catch all
2014-10-29 20:03:07 -07:00
Travis Fields
12f734476c
Merge remote-tracking branch 'origin/4.3.x'
2014-10-29 12:52:52 -07:00
Travis Fields
328aae223f
Add proper exception catching of Windows errors when CreateProcess does not succeed
2014-10-29 11:47:57 -07:00
Travis Fields
a6f3f781d1
Merge remote-tracking branch 'origin/4.3.x' back to master
2014-10-28 15:31:37 -07:00
Travis Fields
51f1d574d9
Fix testcases for Future Parser and resolve issue with values_at in assuming that it was dealing with a string
2014-10-28 15:27:24 -07:00
Zachary Alex Stern
9295d0d5ca
Added correct converstions for PB and EB.
...
* 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.
2014-10-28 13:14:06 -07:00
Travis Fields
9dea092979
Merge branch '4.3.x', add tempfile back for resource validate_cmd and validate_augeas
2014-10-24 16:41:05 -07:00
Travis Fields
624ccbd22c
add require 'tempfile' to resolve a previously autorequired resource
2014-10-24 16:35:34 -07:00
Travis Fields
f0b207c035
Merge branch '4.3.x'
...
Conflicts:
README.markdown
lib/puppet/parser/functions/has_interface_with.rb
2014-10-24 14:30:01 -07:00
Morgan Haskel
0c0f7e13cd
Merge pull request #262 from tremble/MODULES-707
...
Modules 707
2014-10-09 13:33:06 -04:00
Travis Fields
8ad7f68eca
ENTERPRISE-281 fixes issue with has_interfaces and case mismatch causing us not to return some interfaces
2014-10-08 10:14:10 -07:00
Tomas Doran
032f93af1d
Fix strict_variables = true
2014-09-22 14:43:27 -07:00
Mark Chappell
23bc7d51bd
Re-use existing str2bool code rather than doing a copy and paste
2014-09-22 19:49:50 +02:00
Mark Chappell
e2d7f3bb89
(MODULES-707) chomp() fails because generate() no longer returns a string
...
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
2014-09-22 19:49:50 +02:00
Travis Fields
acf435d1ce
MODULES-1248 Fix issue with not properly counting regex matches with legacy versions of ruby
2014-09-16 13:41:39 -07:00
Alexander Pánek
6631934df8
Note that also future parser does not work
2014-09-16 19:03:02 +02:00
Alexander Pánek
448e66b8bb
Updated docs of validate_string to reflect bug
...
See: https://tickets.puppetlabs.com/browse/MODULES-457
2014-09-16 17:55:26 +02:00
Hunter Haugen
2ba0e375e2
Merge branch '4.3.x'
2014-08-05 10:55:58 -07:00
Colleen Murphy
85d5eadbab
Concatenate arrays without modifying the first array
2014-07-31 11:22:18 -07:00
Thomas Linkin
9fd13be825
(MODULES-1221) Add file_line autorequire documentation
...
This commit adds additional documentation to the file_line resource
explaining how it will autorequire file resources when present.
2014-07-16 11:45:36 -04:00
Travis Fields
64f0ae2269
Increase resilience if lookup var comes back with nil object
2014-06-23 22:47:03 -07:00
Raphaël Pinson
2062f9734b
Add private() function
2014-06-11 16:35:32 +02:00
Ashley Penney
0cda858744
Merge pull request #258 from mckern/enhancement/master/camelcasedembools
...
(MODULES-905) Narrow the confinement in bool2str
2014-05-15 21:48:40 -04:00
Ryan McKern
93c4151edf
(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.
2014-05-15 15:01:14 -07:00
Ashley Penney
c5b06f9bbc
Revert "Merge pull request #256 from stbenjam/2571-before"
...
This reverts commit 8499ebdb7f
, reversing
changes made to 08b00d9229
.
2014-05-15 17:28:59 -04:00
Ashley Penney
430d821ad3
Merge pull request #255 from mckern/enhancement/master/camelcasedembools
...
(MODULES-905) Add bool2str() and camelcase() for string manipulation
2014-05-15 17:03:18 -04:00
Stephen Benjamin
6eaa592cd8
(PUP-2571) add 'before' functionality to file_line
...
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.
2014-05-14 20:33:57 +02:00
Ryan McKern
42743614cb
(MODULES-905) Add bool2str() and camelcase() for string manipulation
...
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.
2014-05-13 15:46:40 -07:00