acts-as-taggable-on 3.1.0 → 3.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.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MjM0ZjVlNjhmY2MyOWIwYTBkYzUwMTFiODc0YzQxMDYyNWEzNDA1Nw==
5
- data.tar.gz: !binary |-
6
- NWYzMTZhOWNiYTEyZjcwNTBlMTIyYTcxMTVjZmRjMGEzMjgyZDljNw==
2
+ SHA1:
3
+ metadata.gz: 85958d35c84d713f07c8002b6d13076d545c66ef
4
+ data.tar.gz: 0886b4ccc2336cb4231c95a3ebfad17428bc2039
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NThiZDVmYTFjZGFiMTFkNTM4Y2Y1M2Y1OGI1ZWM5N2U4YzVhZWMzMjJjMTZl
10
- Y2ZlYzkwMjFlY2JlMDdkYzk3YmNmYjNhNDAzZDFjMDhkYmQxZGQ4MGJhM2Vi
11
- Mzg4MWMyNDNkZmVkNWMwYmI1ZDBkZDQxMzgyNWQzMTI2NTYwNmY=
12
- data.tar.gz: !binary |-
13
- OWZkOTMxM2ZiODMyYWQyOTBkN2MyMDQ5NmMzYTJlNjUyOWJkMzliZjFkZDg1
14
- YjU5M2M4Y2NmOWZhZDcxODUzODRjNzc2YjE0NWQ2ZjVkMDhjNWY1NGE2MzQy
15
- OWVmZTVkZWU2OTljNzMwZmVmZDY5YTkxMjY5YzRiOGZhZDgxOWM=
6
+ metadata.gz: 7aab69718b2ecca16126a6ccf094845c492bccbb56414721e39bd0a026639648df76d57bd0a89c70c320f16bbf382f2fb717aae885251d2e996113cf3fc6e466
7
+ data.tar.gz: e4d6bd119431386cb2329a496984b7d401494cc150796b6e7155b5533ab60cd1e82480c831034595377eba9d2226a4aebe7523628bbc69ff2954b64f2596285b
@@ -2,6 +2,7 @@ class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
2
2
  def self.up
3
3
  add_column :tags, :taggings_count, :integer, :default => 0
4
4
 
5
+ ActsAsTaggableOn::Tag.reset_column_information
5
6
  ActsAsTaggableOn::Tag.find_each do |tag|
6
7
  ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
7
8
  end
@@ -9,7 +9,7 @@ module ActsAsTaggableOn
9
9
  :tagger,
10
10
  :tagger_type,
11
11
  :tagger_id if defined?(ActiveModel::MassAssignmentSecurity)
12
- belongs_to :tag, :class_name => 'ActsAsTaggableOn::Tag'
12
+ belongs_to :tag, :class_name => 'ActsAsTaggableOn::Tag' , :counter_cache => true
13
13
  belongs_to :taggable, :polymorphic => true
14
14
  belongs_to :tagger, :polymorphic => true
15
15
 
@@ -20,20 +20,6 @@ module ActsAsTaggableOn
20
20
 
21
21
  after_destroy :remove_unused_tags
22
22
 
23
- # Conditionally adds a counter cache when cache column is present.
24
- # We just regenerate the association. It's the easiest way.
25
- # TODO: require the counter cache in release 4.0.0 and remove these methods
26
- # @see :columns in ActsAsTaggableOn::Taggable::Cache
27
- def self.columns
28
- @acts_as_taggable_on_counter_columns ||= begin
29
- db_columns = super
30
- belongs_to :tag, :class_name => 'ActsAsTaggableOn::Tag', :counter_cache => ActsAsTaggableOn::Tag.column_names.include?('taggings_count')
31
- db_columns
32
- end
33
- end
34
-
35
-
36
-
37
23
  private
38
24
 
39
25
  def remove_unused_tags
@@ -1,4 +1,4 @@
1
1
  module ActsAsTaggableOn
2
- VERSION = '3.1.0'
2
+ VERSION = '3.1.1'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts-as-taggable-on
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
@@ -9,108 +9,108 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-01 00:00:00.000000000 Z
12
+ date: 2014-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '3'
21
- - - <
21
+ - - "<"
22
22
  - !ruby/object:Gem::Version
23
23
  version: '5'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ! '>='
28
+ - - ">="
29
29
  - !ruby/object:Gem::Version
30
30
  version: '3'
31
- - - <
31
+ - - "<"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activesupport
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3'
41
- - - <
41
+ - - "<"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '5'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ! '>='
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
50
  version: '3'
51
- - - <
51
+ - - "<"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '5'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: actionpack
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ! '>='
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '3'
61
- - - <
61
+ - - "<"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '5'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ! '>='
68
+ - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '3'
71
- - - <
71
+ - - "<"
72
72
  - !ruby/object:Gem::Version
73
73
  version: '5'
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: sqlite3
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - ! '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  type: :development
82
82
  prerelease: false
83
83
  version_requirements: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  - !ruby/object:Gem::Dependency
89
89
  name: mysql2
90
90
  requirement: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - ~>
92
+ - - "~>"
93
93
  - !ruby/object:Gem::Version
94
94
  version: 0.3.7
95
95
  type: :development
96
96
  prerelease: false
97
97
  version_requirements: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - ~>
99
+ - - "~>"
100
100
  - !ruby/object:Gem::Version
101
101
  version: 0.3.7
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: pg
104
104
  requirement: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - ! '>='
106
+ - - ">="
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  type: :development
110
110
  prerelease: false
111
111
  version_requirements: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ! '>='
113
+ - - ">="
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  - !ruby/object:Gem::Dependency
@@ -131,28 +131,28 @@ dependencies:
131
131
  name: rspec
132
132
  requirement: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - ~>
134
+ - - "~>"
135
135
  - !ruby/object:Gem::Version
136
136
  version: '2.6'
137
137
  type: :development
138
138
  prerelease: false
139
139
  version_requirements: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ~>
141
+ - - "~>"
142
142
  - !ruby/object:Gem::Version
143
143
  version: '2.6'
144
144
  - !ruby/object:Gem::Dependency
145
145
  name: ammeter
146
146
  requirement: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - ! '>='
148
+ - - ">="
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  type: :development
152
152
  prerelease: false
153
153
  version_requirements: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - ! '>='
155
+ - - ">="
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  description: With ActsAsTaggableOn, you can tag a single model on several contexts,
@@ -164,9 +164,9 @@ executables: []
164
164
  extensions: []
165
165
  extra_rdoc_files: []
166
166
  files:
167
- - .gitignore
168
- - .rspec
169
- - .travis.yml
167
+ - ".gitignore"
168
+ - ".rspec"
169
+ - ".travis.yml"
170
170
  - Appraisals
171
171
  - CHANGELOG.md
172
172
  - CONTRIBUTING.md
@@ -223,20 +223,25 @@ homepage: https://github.com/mbleigh/acts-as-taggable-on
223
223
  licenses:
224
224
  - MIT
225
225
  metadata: {}
226
- post_install_message: ! "When upgrading\n\nRe-run the migrations generator\n\n rake
227
- acts_as_taggable_on_engine:install:migrations\n\nIt will create any new migrations
228
- and skip existing ones\n"
226
+ post_install_message: |
227
+ When upgrading
228
+
229
+ Re-run the migrations generator
230
+
231
+ rake acts_as_taggable_on_engine:install:migrations
232
+
233
+ It will create any new migrations and skip existing ones
229
234
  rdoc_options: []
230
235
  require_paths:
231
236
  - lib
232
237
  required_ruby_version: !ruby/object:Gem::Requirement
233
238
  requirements:
234
- - - ! '>='
239
+ - - ">="
235
240
  - !ruby/object:Gem::Version
236
241
  version: 1.9.3
237
242
  required_rubygems_version: !ruby/object:Gem::Requirement
238
243
  requirements:
239
- - - ! '>='
244
+ - - ">="
240
245
  - !ruby/object:Gem::Version
241
246
  version: '0'
242
247
  requirements: []
@@ -263,3 +268,4 @@ test_files:
263
268
  - spec/models.rb
264
269
  - spec/schema.rb
265
270
  - spec/spec_helper.rb
271
+ has_rdoc: