jenkinsci/puppet-jenkins — pull request #111 by butlern (2014-03-06 20:12:54+00:00)
Title: Fix grep bug when plugin version specified

* The jenkins::plugin fact is a comma separated string of plugins. When
a plugin version is specified, the string to search is:
'myplugin 1.2.3,'

However, the last plugin in the jenkins::plugin fact doesn't end with
a comma. This results in that plugin not being found by grep() and so
puppet tries to install the plugin on each run.

Adding a simple regex alternation checking for comma or end-of-string
(,|$) fixes this.

* Added test cases.