mongoid-tags-arent-hard 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -97,4 +97,5 @@ Again, notice that you can use either a string, an array, or a splatted list as
97
97
  ## Contributers
98
98
 
99
99
  * Mark Bates
100
+ * Luke Bergen
100
101
  * Carsten Block
@@ -13,7 +13,7 @@ module Mongoid
13
13
  end
14
14
 
15
15
  def normalize(*tag_list)
16
- x = tag_list.flatten.map {|s| s.split(self.options[:separator]).map {|x| x.strip}}.flatten
16
+ x = tag_list.flatten.compact.map {|s| s.split(self.options[:separator]).map {|x| x.strip}}.flatten
17
17
  return x
18
18
  end
19
19
 
@@ -2,7 +2,7 @@ module Mongoid
2
2
  module Tags
3
3
  module Arent
4
4
  module Hard
5
- VERSION = "1.1.0"
5
+ VERSION = "1.1.1"
6
6
  end
7
7
  end
8
8
  end
@@ -52,6 +52,11 @@ describe Mongoid::TagsArentHard::Tags do
52
52
  tags.should eql(["foo", "bar", "baz"])
53
53
  end
54
54
 
55
+ it "does not raise exception on nil tags" do
56
+ lambda {tags << nil}.should_not raise_exception
57
+ lambda {tags << ["1", "2", nil, "3"]}.should_not raise_exception
58
+ end
59
+
55
60
  end
56
61
 
57
62
  describe '+' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-tags-arent-hard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-09 00:00:00.000000000 Z
12
+ date: 2012-11-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid