dm-taggings 1.0.1 → 1.0.2

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.
@@ -21,7 +21,7 @@ System-wide:
21
21
 
22
22
  Bundler:
23
23
 
24
- gem "dm-taggings", "~> 0.11"
24
+ gem "dm-taggings", "~> 1.0.0"
25
25
 
26
26
  == Schema
27
27
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-taggings}
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Piotr Solnica"]
12
- s.date = %q{2011-03-25}
12
+ s.date = %q{2011-03-28}
13
13
  s.description = %q{DataMapper plugin providing taggable and tagger models}
14
14
  s.email = %q{piotr.solnica@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -156,7 +156,7 @@ module DataMapper
156
156
  tags.dup
157
157
  end
158
158
 
159
- tags_to_remove.each { |tag| tags.delete(tag) }
159
+ tags.delete_if { |tag| tags_to_remove.include?(tag) }
160
160
  end
161
161
 
162
162
  # Same as untag but actually delete the tags from the datastore.
@@ -181,7 +181,8 @@ module DataMapper
181
181
  #
182
182
  # @api public
183
183
  def tag_list
184
- @tag_list ||= tags.collect { |tag| tag.name }.join("#{self.class.taggable_options[:tag_list_separator]} ")
184
+ @tag_list ||= tags.collect { |tag| tag.name }.join(
185
+ "#{model.taggable_options[:tag_list_separator]} ")
185
186
  end
186
187
 
187
188
  # Tag a resource using tag names from the give list separated by commas.
@@ -196,7 +197,7 @@ module DataMapper
196
197
  def tag_list=(list)
197
198
  @tag_list = list
198
199
 
199
- tag_names = list.split(self.class.taggable_options[:tag_list_separator]).map do |name|
200
+ tag_names = list.split(model.taggable_options[:tag_list_separator]).map do |name|
200
201
  name.strip!
201
202
  name.size == 0 ? nil : name
202
203
  end.compact
@@ -215,12 +216,12 @@ module DataMapper
215
216
 
216
217
  # @api public
217
218
  def taggings
218
- send(self.class.tagging_relationship_name)
219
+ send(model.tagging_relationship_name)
219
220
  end
220
221
 
221
222
  # @api public
222
223
  def taggings=(taggings)
223
- send("#{self.class.tagging_relationship_name}=", taggings)
224
+ send("#{model.tagging_relationship_name}=", taggings)
224
225
  end
225
226
 
226
227
  protected
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dm-taggings
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.1
5
+ version: 1.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Piotr Solnica
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-25 00:00:00 +01:00
13
+ date: 2011-03-28 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- hash: 837854607
145
+ hash: 521493491
146
146
  segments:
147
147
  - 0
148
148
  version: "0"