changed the regex so that tagmail allows . in tagname.
Signed-off-by: Dan Bode <[email protected]>
---
lib/puppet/reports/tagmail.rb | 2 +-
spec/unit/reports/tagmail_spec.rb | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/puppet/reports/tagmail.rb b/lib/puppet/reports/tagmail.rb
index 71bafb2..e17143e 100644
--- a/lib/puppet/reports/tagmail.rb
+++ b/lib/puppet/reports/tagmail.rb
@@ -84,7 +84,7 @@ Puppet::Reports.register_report(:tagmail) do
pos = []
neg = []
taglist.sub(/\s+$/,'').split(/\s*,\s*/).each do |tag|
- unless tag =~ /^!?[-\w]+$/
+ unless tag =~ /^!?[-\w\.]+$/
raise ArgumentError, "Invalid tag #{tag.inspect}"
end
case tag
diff --git a/spec/unit/reports/tagmail_spec.rb
b/spec/unit/reports/tagmail_spec.rb
index 4349e99..deeab81 100755
--- a/spec/unit/reports/tagmail_spec.rb
+++ b/spec/unit/reports/tagmail_spec.rb
@@ -31,6 +31,7 @@ describe tagmail do
{
"tag: [email protected]" => [%w{[email protected]}, %w{tag}, []],
+ "tag.localhost: [email protected]" => [%w{[email protected]},
%w{tag.localhost}, []],
"tag, other: [email protected]" => [%w{[email protected]}, %w{tag other},
[]],
"tag-other: [email protected]" => [%w{[email protected]}, %w{tag-other}, []],
"tag, !other: [email protected]" => [%w{[email protected]}, %w{tag},
%w{other}],
--
1.5.5.6
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.