diff options
author | James Turnbull <james@lovedthanlost.net> | 2008-02-24 09:32:44 +1100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-02-24 09:32:44 +1100 |
commit | f184228956fc4c2050a5901130fd506b8f069dd6 (patch) | |
tree | a5f0e7008f22b292fe524604c38ae01b1985e08e | |
parent | 5d35bc5904a09bc07a11039500c59021bafaee7e (diff) | |
download | puppet-f184228956fc4c2050a5901130fd506b8f069dd6.tar.gz puppet-f184228956fc4c2050a5901130fd506b8f069dd6.tar.xz puppet-f184228956fc4c2050a5901130fd506b8f069dd6.zip |
Fixes ticket #1079 - added . support for tags
-rw-r--r-- | lib/puppet/util/tagging.rb | 2 | ||||
-rwxr-xr-x | spec/unit/util/tagging.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/util/tagging.rb b/lib/puppet/util/tagging.rb index 9abb3fb2b..8a50f3458 100644 --- a/lib/puppet/util/tagging.rb +++ b/lib/puppet/util/tagging.rb @@ -34,6 +34,6 @@ module Puppet::Util::Tagging private def valid_tag?(tag) - tag =~ /^\w[-\w:]*$/ + tag =~ /^\w[-\w:.]*$/ end end diff --git a/spec/unit/util/tagging.rb b/spec/unit/util/tagging.rb index 91cbb213d..d61ee8ccb 100755 --- a/spec/unit/util/tagging.rb +++ b/spec/unit/util/tagging.rb @@ -61,6 +61,10 @@ describe Puppet::Util::Tagging, "when adding tags" do lambda { @tagger.tag("good_tag") }.should_not raise_error(Puppet::ParseError) end + it "should allow tags containing '.' characters" do + lambda { @tagger.tag("good.tag") }.should_not raise_error(Puppet::ParseError) + end + it "should provide a method for testing tag validity" do @tagger.metaclass.publicize_methods(:valid_tag?) { @tagger.should be_respond_to(:valid_tag?) } end |