dm-tags 1.0.0.rc2 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/README.rdoc +1 -1
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/dm-tags.gemspec +9 -9
- data/lib/dm-tags/tag.rb +1 -1
- data/spec/dm-tags/taggable_spec.rb +10 -10
- data/spec/dm-tags/tagging_spec.rb +2 -2
- data/spec/dm-tags/updating_spec.rb +3 -3
- data/spec/rcov.opts +1 -1
- data/tasks/spec.rake +3 -0
- metadata +11 -11
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -117,7 +117,7 @@ This package brings tagging to DataMapper. It is inspired by Acts As Taggable O
|
|
117
117
|
|
118
118
|
(The MIT License)
|
119
119
|
|
120
|
-
Copyright (c)
|
120
|
+
Copyright (c) 2010 Bobby Calderwood
|
121
121
|
|
122
122
|
Permission is hereby granted, free of charge, to any person obtaining
|
123
123
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -10,15 +10,15 @@ begin
|
|
10
10
|
gem.summary = "This package brings tagging to DataMapper. It is inspired by Acts As Taggable On by Michael Bleigh, github's mbleigh. Props to him for the contextual tagging based on Acts As Taggable on Steroids."
|
11
11
|
gem.description = gem.summary
|
12
12
|
gem.email = 'bobby_calderwood [a] me [d] com'
|
13
|
-
gem.homepage = 'http://github.com/datamapper
|
13
|
+
gem.homepage = 'http://github.com/datamapper/%s' % gem.name
|
14
14
|
gem.authors = [ 'Bobby Calderwood' ]
|
15
15
|
|
16
16
|
gem.rubyforge_project = 'datamapper'
|
17
17
|
|
18
|
-
gem.add_dependency 'dm-core',
|
18
|
+
gem.add_dependency 'dm-core', '~> 1.0.0.rc3'
|
19
19
|
|
20
20
|
gem.add_development_dependency 'rspec', '~> 1.3'
|
21
|
-
gem.add_development_dependency 'dm-validations', '~> 1.0.0.
|
21
|
+
gem.add_development_dependency 'dm-validations', '~> 1.0.0.rc3'
|
22
22
|
end
|
23
23
|
|
24
24
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.
|
1
|
+
1.0.0.rc3
|
data/dm-tags.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dm-tags}
|
8
|
-
s.version = "1.0.0.
|
8
|
+
s.version = "1.0.0.rc3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bobby Calderwood"]
|
12
|
-
s.date = %q{2010-05-
|
12
|
+
s.date = %q{2010-05-27}
|
13
13
|
s.description = %q{This package brings tagging to DataMapper. It is inspired by Acts As Taggable On by Michael Bleigh, github's mbleigh. Props to him for the contextual tagging based on Acts As Taggable on Steroids.}
|
14
14
|
s.email = %q{bobby_calderwood [a] me [d] com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
|
|
43
43
|
"tasks/yard.rake",
|
44
44
|
"tasks/yardstick.rake"
|
45
45
|
]
|
46
|
-
s.homepage = %q{http://github.com/datamapper/dm-
|
46
|
+
s.homepage = %q{http://github.com/datamapper/dm-tags}
|
47
47
|
s.rdoc_options = ["--charset=UTF-8"]
|
48
48
|
s.require_paths = ["lib"]
|
49
49
|
s.rubyforge_project = %q{datamapper}
|
@@ -63,18 +63,18 @@ Gem::Specification.new do |s|
|
|
63
63
|
s.specification_version = 3
|
64
64
|
|
65
65
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
66
|
-
s.add_runtime_dependency(%q<dm-core>, ["~> 1.0.0.
|
66
|
+
s.add_runtime_dependency(%q<dm-core>, ["~> 1.0.0.rc3"])
|
67
67
|
s.add_development_dependency(%q<rspec>, ["~> 1.3"])
|
68
|
-
s.add_development_dependency(%q<dm-validations>, ["~> 1.0.0.
|
68
|
+
s.add_development_dependency(%q<dm-validations>, ["~> 1.0.0.rc3"])
|
69
69
|
else
|
70
|
-
s.add_dependency(%q<dm-core>, ["~> 1.0.0.
|
70
|
+
s.add_dependency(%q<dm-core>, ["~> 1.0.0.rc3"])
|
71
71
|
s.add_dependency(%q<rspec>, ["~> 1.3"])
|
72
|
-
s.add_dependency(%q<dm-validations>, ["~> 1.0.0.
|
72
|
+
s.add_dependency(%q<dm-validations>, ["~> 1.0.0.rc3"])
|
73
73
|
end
|
74
74
|
else
|
75
|
-
s.add_dependency(%q<dm-core>, ["~> 1.0.0.
|
75
|
+
s.add_dependency(%q<dm-core>, ["~> 1.0.0.rc3"])
|
76
76
|
s.add_dependency(%q<rspec>, ["~> 1.3"])
|
77
|
-
s.add_dependency(%q<dm-validations>, ["~> 1.0.0.
|
77
|
+
s.add_dependency(%q<dm-validations>, ["~> 1.0.0.rc3"])
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
data/lib/dm-tags/tag.rb
CHANGED
@@ -15,7 +15,7 @@ describe "Taggable" do
|
|
15
15
|
@taggable.tag_taggings.new(:tag => Tag.create(:name => name))
|
16
16
|
end
|
17
17
|
|
18
|
-
@taggable.save.should
|
18
|
+
@taggable.save.should be(true)
|
19
19
|
|
20
20
|
@taggable = @taggable.model.get!(@taggable.key)
|
21
21
|
@taggable.tag_list.should == tag_names
|
@@ -38,15 +38,15 @@ describe "Taggable" do
|
|
38
38
|
tag3 = Tag.create(:name => 'tag3')
|
39
39
|
@taggable = TaggedModel.new
|
40
40
|
@taggable.tag_list = 'tag1, tag2, tag3'
|
41
|
-
@taggable.save.should
|
41
|
+
@taggable.save.should be(true)
|
42
42
|
@taggable.tags.sort_by{|tag| tag.id}.should == [tag1, tag2, tag3]
|
43
43
|
@taggable.tag_list = 'tag1, tag2'
|
44
|
-
@taggable.save.should
|
44
|
+
@taggable.save.should be(true) # Should dirty the model when changed.
|
45
45
|
pending do
|
46
46
|
@taggable.tags.sort_by{|tag| tag.id}.should == [tag1, tag2]
|
47
47
|
end
|
48
48
|
@taggable.tag_list = 'tag3, tag4'
|
49
|
-
@taggable.save.should
|
49
|
+
@taggable.save.should be(true)
|
50
50
|
@taggable = @taggable.model.get(*@taggable.key)
|
51
51
|
pending do
|
52
52
|
@taggable.tags.sort_by{|tag| tag.id}.should == [tag3, Tag.first(:name => 'tag4')]
|
@@ -74,8 +74,8 @@ describe "Taggable" do
|
|
74
74
|
@taggable.tags.size.should == 3
|
75
75
|
end
|
76
76
|
@taggable.add_tag("tag-4")
|
77
|
-
@taggable.tag_list.include?("tag-4").should
|
78
|
-
@taggable.tag_list.include?("tag-1").should
|
77
|
+
@taggable.tag_list.include?("tag-4").should be(true)
|
78
|
+
@taggable.tag_list.include?("tag-1").should be(true)
|
79
79
|
@taggable.save
|
80
80
|
@taggable.tags.size.should == 4
|
81
81
|
end
|
@@ -121,8 +121,8 @@ describe "Taggable" do
|
|
121
121
|
|
122
122
|
|
123
123
|
it "should have a class method .taggable? which returns true if tagging is defined, and false otherwise" do
|
124
|
-
UntaggedModel.taggable?.should
|
125
|
-
TaggedModel.taggable?.should
|
124
|
+
UntaggedModel.taggable?.should be(false)
|
125
|
+
TaggedModel.taggable?.should be(true)
|
126
126
|
end
|
127
127
|
|
128
128
|
it 'should return an empty list if tag is not present (should not continue on nil tag)' do
|
@@ -146,9 +146,9 @@ describe "Taggable" do
|
|
146
146
|
|
147
147
|
it "should have an instance method #taggable? which returns the same as the instance's class would" do
|
148
148
|
UntaggedModel.new.taggable?.should == UntaggedModel.taggable?
|
149
|
-
UntaggedModel.new.taggable?.should
|
149
|
+
UntaggedModel.new.taggable?.should be(false)
|
150
150
|
TaggedModel.new.taggable?.should == TaggedModel.taggable?
|
151
|
-
TaggedModel.new.taggable?.should
|
151
|
+
TaggedModel.new.taggable?.should be(true)
|
152
152
|
end
|
153
153
|
|
154
154
|
it 'should destroy associated taggings when destroyed' do
|
@@ -8,8 +8,8 @@ describe Tagging do
|
|
8
8
|
@tagged_resource = TaggedModel.create
|
9
9
|
end
|
10
10
|
|
11
|
-
it "should be a model which includes DataMapper::
|
12
|
-
Tagging.should
|
11
|
+
it "should be a model which includes DataMapper::Model" do
|
12
|
+
Tagging.should be_kind_of(DataMapper::Model)
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should validate the presence of tag_id, taggable_id, taggable_type and tag_context" do
|
@@ -9,7 +9,7 @@ describe "Tag", "when updating" do
|
|
9
9
|
it "should create itself" do
|
10
10
|
@tagged_model.tag_list = "abc, def, ghi"
|
11
11
|
@tagged_model.skill_list = "Casablanca, Morocco"
|
12
|
-
@tagged_model.save.should
|
12
|
+
@tagged_model.save.should be(true)
|
13
13
|
@tagged_model.should be_saved
|
14
14
|
|
15
15
|
@tagged_model.reload
|
@@ -18,7 +18,7 @@ describe "Tag", "when updating" do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
it "should update itself" do
|
21
|
-
@tagged_model.save.should
|
21
|
+
@tagged_model.save.should be(true)
|
22
22
|
@tagged_model.should be_saved
|
23
23
|
|
24
24
|
@tagged_model.reload
|
@@ -27,7 +27,7 @@ describe "Tag", "when updating" do
|
|
27
27
|
|
28
28
|
@tagged_model.tag_list = "abc, def, xyz, jkl"
|
29
29
|
@tagged_model.skill_list = "Sahara, Morocco"
|
30
|
-
@tagged_model.save.should
|
30
|
+
@tagged_model.save.should be(true)
|
31
31
|
|
32
32
|
@tagged_model.reload
|
33
33
|
pending do
|
data/spec/rcov.opts
CHANGED
data/tasks/spec.rake
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 977940572
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 1.0.0.
|
10
|
+
- rc3
|
11
|
+
version: 1.0.0.rc3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Bobby Calderwood
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-05-
|
19
|
+
date: 2010-05-27 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -27,13 +27,13 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 977940572
|
31
31
|
segments:
|
32
32
|
- 1
|
33
33
|
- 0
|
34
34
|
- 0
|
35
|
-
-
|
36
|
-
version: 1.0.0.
|
35
|
+
- rc3
|
36
|
+
version: 1.0.0.rc3
|
37
37
|
type: :runtime
|
38
38
|
version_requirements: *id001
|
39
39
|
- !ruby/object:Gem::Dependency
|
@@ -59,13 +59,13 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
hash:
|
62
|
+
hash: 977940572
|
63
63
|
segments:
|
64
64
|
- 1
|
65
65
|
- 0
|
66
66
|
- 0
|
67
|
-
-
|
68
|
-
version: 1.0.0.
|
67
|
+
- rc3
|
68
|
+
version: 1.0.0.rc3
|
69
69
|
type: :development
|
70
70
|
version_requirements: *id003
|
71
71
|
description: This package brings tagging to DataMapper. It is inspired by Acts As Taggable On by Michael Bleigh, github's mbleigh. Props to him for the contextual tagging based on Acts As Taggable on Steroids.
|
@@ -104,7 +104,7 @@ files:
|
|
104
104
|
- tasks/yard.rake
|
105
105
|
- tasks/yardstick.rake
|
106
106
|
has_rdoc: true
|
107
|
-
homepage: http://github.com/datamapper/dm-
|
107
|
+
homepage: http://github.com/datamapper/dm-tags
|
108
108
|
licenses: []
|
109
109
|
|
110
110
|
post_install_message:
|