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 CHANGED
@@ -71,7 +71,7 @@
71
71
  source 'http://rubygems.org'
72
72
 
73
73
  DATAMAPPER = 'git://github.com/datamapper'
74
- DM_VERSION = '~> 1.0.0.rc2'
74
+ DM_VERSION = '~> 1.0.0.rc3'
75
75
 
76
76
  group :runtime do # Runtime dependencies (as in the gemspec)
77
77
 
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 Bobby Calderwood
1
+ Copyright (c) 2010 Bobby Calderwood
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
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) 2009 Bobby Calderwood
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/dm-more/tree/master/%s' % gem.name
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', '~> 1.0.0.rc2'
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.rc2'
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.rc2
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.rc2"
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-19}
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-more/tree/master/dm-tags}
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.rc2"])
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.rc2"])
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.rc2"])
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.rc2"])
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.rc2"])
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.rc2"])
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
@@ -2,7 +2,7 @@ class Tag
2
2
  include DataMapper::Resource
3
3
 
4
4
  property :id, Serial
5
- property :name, String, :required => true, :unique => true, :unique_index => true
5
+ property :name, String, :required => true, :unique => true
6
6
 
7
7
  has n, :taggings
8
8
 
@@ -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 be_true
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 be_true
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 be_true # Should dirty the model when changed.
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 be_true
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 be_true
78
- @taggable.tag_list.include?("tag-1").should be_true
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 be_false
125
- TaggedModel.taggable?.should be_true
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 be_false
149
+ UntaggedModel.new.taggable?.should be(false)
150
150
  TaggedModel.new.taggable?.should == TaggedModel.taggable?
151
- TaggedModel.new.taggable?.should be_true
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::Resource" do
12
- Tagging.should include(DataMapper::Resource)
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 be_true
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 be_true
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 be_true
30
+ @tagged_model.save.should be(true)
31
31
 
32
32
  @tagged_model.reload
33
33
  pending do
data/spec/rcov.opts CHANGED
@@ -1,4 +1,4 @@
1
- --exclude "spec"
1
+ --exclude "spec,^/"
2
2
  --sort coverage
3
3
  --callsites
4
4
  --xrefs
data/tasks/spec.rake CHANGED
@@ -35,4 +35,7 @@ rescue LoadError
35
35
  end
36
36
  end
37
37
 
38
+ task :spec => :check_dependencies
39
+ task :rcov => :check_dependencies
40
+
38
41
  task :default => :spec
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: 977940575
4
+ hash: 977940572
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 0
10
- - rc2
11
- version: 1.0.0.rc2
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 00:00:00 -07:00
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: 977940575
30
+ hash: 977940572
31
31
  segments:
32
32
  - 1
33
33
  - 0
34
34
  - 0
35
- - rc2
36
- version: 1.0.0.rc2
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: 977940575
62
+ hash: 977940572
63
63
  segments:
64
64
  - 1
65
65
  - 0
66
66
  - 0
67
- - rc2
68
- version: 1.0.0.rc2
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-more/tree/master/dm-tags
107
+ homepage: http://github.com/datamapper/dm-tags
108
108
  licenses: []
109
109
 
110
110
  post_install_message: