Age | Commit message (Collapse) | Author | |
---|---|---|---|
2016-05-13 | Add a delete_regex function | Joseph Yaworski | |
To maintain backwards compatibility, add a delete_regex function instead of modifying delete itself. | |||
2016-05-04 | Use reject instead of delete_if | Joseph Yaworski | |
2016-04-25 | Revert "Add support for regular expressions to delete" | Hunter Haugen | |
This reverts commit 0d46515b57cea60d4d5f1e4d81a75a448a7a73a8. It introduced backwards-incompatible functionality. | |||
2016-04-12 | Add support for regular expressions to delete | Joseph Yaworski | |
2014-12-19 | Update docs to reflect new behavior of delete function taking array in ↵ | Travis Fields | |
second argument | |||
2014-12-19 | MODULES-1606 add ability to pass array to delete for items to delete | Travis Fields | |
2013-09-16 | bug # 20681 delete() function should not remove elements from original list | Leonardo Rodrigues de Mello | |
The setup: list with 3 elements, delete one: $test_list = [‘a’, ‘b’, ‘c’] $test_deleted = delete($test_list, ‘a’) Print out the elements in ‘test_deleted’: notify { ‘group_output2’: withpath => true, name => “$cfeng::test_deleted”, } Notice: /Stage[main]/Syslog/Notify[group_output2]/message: bc Good! Run-on output shows that ‘a’ was deleted Print out the elements in ‘test_list’: notify { ‘group_output1’: withpath => true, name => “$cfeng::test_list”, } Notice: /Stage[main]/Syslog/Notify[group_output1]/message: bc WHAT!? 'a' was deleted from ‘test_list’ as well! Expected abc as output! This behaviour is confirmed for string, hash and array. This is fixed on this commit, I had added two spec tests to cover that cases. bug #20681 spec test for delete() function. I had forgot in the last commit the spec test for hash in the delete function. bug # 20681 delete() function change aproach. Instead of rejecting elements from the original list, we use collection = arguments[0].dup . then latter we could continue to use delete and gsub! on collection without impact on original argument. this is a better solution than the previous one, and works on ruby 1.8.7, 1.9.3 and 2.0.0. The previous solution does not work on ruby 1.8.7. delete function remove typo whitespace. fix typo whitespaces. | |||
2012-11-19 | Extend delete function for strings and hashes | Joshua Harlan Lifton | |
Previous to this commit, the delete function only acted on arrays. This commit adds the same functionality for hashes and strings in the obvious way: delete(h, k) would delete the k key from the h hash and delete(s, sub) would delete all instances of the sub substring from the s string. | |||
2011-07-29 | (#3) Provide documentation for remaining functions. | Ken Barber | |
2011-06-29 | Add some more functional tests. | Ken Barber | |
2011-06-29 | Added tests for each function, fixing functions as we hit bugs. | Ken Barber | |
2011-04-30 | Moved more functions into lib/puppet/parser/functions/ | Ken Barber | |