Commit graph

130 commits

Author SHA1 Message Date
Ken Barber
352bac3703 Moved type into pluginsync compat area. 2011-04-30 15:59:55 +02:00
Ken Barber
5c8f8f8edb Added Apache license. 2011-04-30 15:59:31 +02:00
Ken Barber
323cd874c5 Change README. 2011-04-30 15:59:31 +02:00
Ken Barber
99a93d366f Convert to module format. 2011-04-30 15:59:31 +02:00
Krzysztof Wilczynski
781a872057 Add number of stub code for future functions.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 14:36:25 +01:00
Krzysztof Wilczynski
d38e399b47 First version. Simple swapcase function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 14:35:10 +01:00
Krzysztof Wilczynski
8733a57ffb Making sure that the function hash will also work on older Rubies.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 03:44:59 +01:00
Krzysztof Wilczynski
b3be789b0d Add number of stub code for future functions.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 03:16:12 +01:00
Krzysztof Wilczynski
72b23cb2e5 First version. Simple hash function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 03:15:47 +01:00
Krzysztof Wilczynski
f74ab047cd Change boolean detecion from string to make entire function more robust.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:57:48 +01:00
Krzysztof Wilczynski
4da6d8222e Changed wording of the note in the comment.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:54:47 +01:00
Krzysztof Wilczynski
db7a27cf5b Small re-factor. Remove not needed complexity.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:51:17 +01:00
Krzysztof Wilczynski
872c7f3c42 Added body of the function flatten.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:50:38 +01:00
Krzysztof Wilczynski
9d0e244771 Moved to unless from if not to improve code clarity. Changed
wording of few error messages.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:49:15 +01:00
Krzysztof Wilczynski
3c4c1c7c20 Moved to unless from if not to improve code clarity. Added TODO
for future reference.  Changed wording of few error messages.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:48:25 +01:00
Krzysztof Wilczynski
9ec50e7968 Added TODO for future reference.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:47:20 +01:00
Krzysztof Wilczynski
5da2005d04 Moved to unless from if not to make code more clear. Plus a variable
name change for simplicity.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:46:03 +01:00
Krzysztof Wilczynski
4b2a0a9e1f Small change to code formatting.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:45:36 +01:00
Krzysztof Wilczynski
20a8892c09 Added comment line.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:45:04 +01:00
Krzysztof Wilczynski
55df5ac566 Added comment line.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:44:49 +01:00
Krzysztof Wilczynski
16eec26b0b Corrected function name from chop to strip. Moved to unless from if not
to improve code clarity.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:43:13 +01:00
Krzysztof Wilczynski
41798020d6 Function has now more robust error detection.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:41:09 +01:00
Krzysztof Wilczynski
b26d5b2f3b Now prefix will convert everything into string which is the same
as join would do.  Also function is now more robust in error detection.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 02:40:04 +01:00
Krzysztof Wilczynski
5fce8a7f54 Added ability to flatten the resulting array in the function zip.
This would allow for creating hashes on the fly from two arrays.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 01:47:41 +01:00
Krzysztof Wilczynski
3b55113c73 Moved to unless from if not and changed wording of few error messages.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 01:00:10 +01:00
Krzysztof Wilczynski
21e39aaeac Moved to unless from if not plus removed surplus empty lines.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 00:59:18 +01:00
Krzysztof Wilczynski
551f4ce95b Moved to unless from if not and removed TODO.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 00:58:37 +01:00
Krzysztof Wilczynski
555c50d735 Moved to unless from if not for code clarity and changed wording
of few error messages.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 00:57:24 +01:00
Krzysztof Wilczynski
0fabca9a65 Adding support for hash and string to the function count.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-30 00:56:12 +01:00
Krzysztof Wilczynski
0ff8b00a64 Small re-factor. Changed if not to unless for code clarity.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 23:30:32 +01:00
Krzysztof Wilczynski
726746649e Small re-factor. Changed if not to unless for code clarity.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 23:18:58 +01:00
Krzysztof Wilczynski
6d9e5efe38 Minor changes.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 23:16:26 +01:00
Krzysztof Wilczynski
f4f47f6d5f Changed wording in the error message.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 23:15:05 +01:00
Krzysztof Wilczynski
94db34684d Removing old file includes.rb
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 21:03:34 +01:00
Krzysztof Wilczynski
1e788e891b Renaming the file from includes.rb to member.rb.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 21:03:11 +01:00
Krzysztof Wilczynski
ab82eceba5 Renaming from includes to member in order to avoid confusion and
possibility of a clash with Puppet built-in function include.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 21:02:17 +01:00
Krzysztof Wilczynski
96777a0033 Minor change.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 20:58:49 +01:00
Krzysztof Wilczynski
8454622e32 Added check to ensure that given fact name is a string.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 20:58:28 +01:00
Krzysztof Wilczynski
b24c839f89 Minor changes.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 20:47:39 +01:00
Krzysztof Wilczynski
f3b6b11e85 First version. Simple str2bool function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 20:13:27 +01:00
Krzysztof Wilczynski
4c097b0a09 Reverting name back to bool2num.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 20:10:53 +01:00
Krzysztof Wilczynski
07847be9b9 Added proper handling of both FalseClass and TrueClass. We also
return real integer values now over string-encoded integers.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 20:07:56 +01:00
Krzysztof Wilczynski
5e9721983a Added FalseClass and TrueClass to be identified as Boolean to the type function.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 20:05:44 +01:00
Krzysztof Wilczynski
085874afc3 Adding TODO for future reference.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 18:42:54 +01:00
Krzysztof Wilczynski
e0559c174e Adding support for strings to the the function unique.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 18:40:07 +01:00
Krzysztof Wilczynski
aa2237bcb6 Make sure that we have string-encoded integer value.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 18:28:38 +01:00
Krzysztof Wilczynski
af1ba5ce8a Adding support for strings and hashes to the function empty.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 18:27:52 +01:00
Krzysztof Wilczynski
456a351ac2 First version. Simple chomp function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 18:10:04 +01:00
Krzysztof Wilczynski
020a2a23ee First version. Simple chop function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 18:09:57 +01:00
Krzysztof Wilczynski
a038f6a041 First version. Simple lstrip function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 18:09:39 +01:00