mongoid-simple-tags 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -7,7 +7,7 @@ mongoid-simple-tags is a basic and simple tagging system for mongoid using map-r
7
7
 
8
8
  Add the following to Gemfile:
9
9
 
10
- gem "mongoid-simple-tags", "0.0.9"
10
+ gem "mongoid-simple-tags", "0.1.1"
11
11
 
12
12
  == Usage
13
13
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -14,7 +14,7 @@ module Mongoid
14
14
 
15
15
  module InstanceMethods
16
16
  def tag_list=(tags)
17
- self.tags = tags.split(",").collect{ |t| t.strip }.delete_if{ |t| t.blank? }
17
+ self.tags = tags.to_s.split(",").collect{ |t| t.strip }.delete_if{ |t| t.blank? }
18
18
  end
19
19
 
20
20
  def tag_list
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "mongoid-simple-tags"
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["chebyte"]
8
8
  s.email = ["maurotorres@gmail.com"]
@@ -38,6 +38,12 @@ describe "A Taggable model" do
38
38
  user.tags.should_not be_nil
39
39
  user.tags.should eql([])
40
40
  end
41
+
42
+ it "returns an empty array even if tag_list is equal to nil" do
43
+ user.tag_list = nil
44
+ user.tags.should_not be_nil
45
+ user.tags.should eql([])
46
+ end
41
47
  end
42
48
 
43
49
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-simple-tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.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: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2013-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -88,4 +88,6 @@ rubygems_version: 1.8.23
88
88
  signing_key:
89
89
  specification_version: 3
90
90
  summary: MongoID simple tags for RAILS
91
- test_files: []
91
+ test_files:
92
+ - spec/mongoid-simple-tags_spec.rb
93
+ - spec/spec_helper.rb