acts-as-taggable-on 2.1.0 → 2.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.
- data/CHANGELOG +10 -0
- data/README.rdoc +10 -19
- data/lib/acts-as-taggable-on/version.rb +1 -1
- data/lib/generators/acts_as_taggable_on/migration/migration_generator.rb +9 -2
- metadata +3 -4
- data/VERSION +0 -1
data/CHANGELOG
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
== 2011-08-21
|
2
|
+
* escape _ and % for mysql and postgres (@tilsammans)
|
3
|
+
* Now depends on mysql2 gem
|
4
|
+
* tagged_with :any is chainable now (@jeffreyiacono)
|
5
|
+
* tagged_with(nil) returns scoped object
|
6
|
+
* Case-insensitivity for TaggedModel.tagged_with for PostgreSQL database
|
7
|
+
* tagged_with(' ') returns scoped object
|
8
|
+
* remove warning for rails 3.1 about class_inheritable_attribute
|
9
|
+
* use ActiveRecord migration_number to avoid clashs (@atd)
|
10
|
+
|
1
11
|
== 2010-02-17
|
2
12
|
* Converted the plugin to be compatible with Rails3
|
3
13
|
|
data/README.rdoc
CHANGED
@@ -17,7 +17,9 @@ was used.
|
|
17
17
|
|
18
18
|
=== Rails 2.3.x
|
19
19
|
|
20
|
-
|
20
|
+
The last version of gem that is compatible with Rails 2.3.x is 2.1.0.
|
21
|
+
|
22
|
+
We are planning no longer to support Rails 2, but if you want to contribute something only for Rails 2, we left rails2 branch for that.
|
21
23
|
|
22
24
|
==== Plugin
|
23
25
|
|
@@ -29,7 +31,7 @@ traditional plugin you can install like so:
|
|
29
31
|
Acts As Taggable On is also available as a gem plugin using Rails 2.1's gem dependencies.
|
30
32
|
To install the gem, add this to your config/environment.rb:
|
31
33
|
|
32
|
-
config.gem "acts-as-taggable-on", :source => "http://gemcutter.org", :version => '2.
|
34
|
+
config.gem "acts-as-taggable-on", :source => "http://gemcutter.org", :version => '2.1.0'
|
33
35
|
|
34
36
|
After that, you can run "rake gems:install" to install the gem if you don't already have it.
|
35
37
|
|
@@ -38,14 +40,11 @@ After that, you can run "rake gems:install" to install the gem if you don't alre
|
|
38
40
|
1. script/generate acts_as_taggable_on_migration
|
39
41
|
2. rake db:migrate
|
40
42
|
|
41
|
-
=== Rails 3.
|
42
|
-
|
43
|
-
Acts As Taggable On is now useable in Rails 3.0, thanks to the excellent work of Szymon Nowak
|
44
|
-
and Jelle Vandebeeck.
|
43
|
+
=== Rails 3.x
|
45
44
|
|
46
45
|
To use it, add it to your Gemfile:
|
47
46
|
|
48
|
-
gem 'acts-as-taggable-on'
|
47
|
+
gem 'acts-as-taggable-on', '~>2.1.0'
|
49
48
|
|
50
49
|
==== Post Installation
|
51
50
|
|
@@ -54,20 +53,11 @@ To use it, add it to your Gemfile:
|
|
54
53
|
|
55
54
|
== Testing
|
56
55
|
|
57
|
-
Acts As Taggable On uses RSpec for its test coverage. Inside the
|
58
|
-
directory, you can run the specs for RoR 3.
|
56
|
+
Acts As Taggable On uses RSpec for its test coverage. Inside the gem
|
57
|
+
directory, you can run the specs for RoR 3.x with:
|
59
58
|
|
60
59
|
rake spec
|
61
60
|
|
62
|
-
If you want to test the plugin for Rails 2.3.x, use:
|
63
|
-
|
64
|
-
rake rails2.3:spec
|
65
|
-
|
66
|
-
If you already have RSpec on your application, the specs will run while using:
|
67
|
-
|
68
|
-
rake spec:plugins
|
69
|
-
|
70
|
-
|
71
61
|
== Usage
|
72
62
|
|
73
63
|
class User < ActiveRecord::Base
|
@@ -203,6 +193,7 @@ CSS:
|
|
203
193
|
|
204
194
|
== Contributors
|
205
195
|
|
196
|
+
* Artem Kramarenko (artemk) - Maintainer
|
206
197
|
* TomEric (i76) - Maintainer
|
207
198
|
* Michael Bleigh - Original Author
|
208
199
|
* Szymon Nowak - Rails 3.0 compatibility
|
@@ -221,4 +212,4 @@ CSS:
|
|
221
212
|
* lawrencepit - cached tag work
|
222
213
|
* sobrinho - fixed tag_cloud helper
|
223
214
|
|
224
|
-
Copyright (c) 2007-
|
215
|
+
Copyright (c) 2007-2011 Michael Bleigh (http://mbleigh.com/) and Intridea Inc. (http://intridea.com/), released under the MIT license
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'rails/generators'
|
1
2
|
require 'rails/generators/migration'
|
2
3
|
|
3
4
|
module ActsAsTaggableOn
|
@@ -18,8 +19,14 @@ module ActsAsTaggableOn
|
|
18
19
|
[:active_record].include? orm
|
19
20
|
end
|
20
21
|
|
21
|
-
def self.next_migration_number(
|
22
|
-
ActiveRecord::
|
22
|
+
def self.next_migration_number(dirname)
|
23
|
+
if ActiveRecord::Base.timestamped_migrations
|
24
|
+
migration_number = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
|
25
|
+
migration_number += 1
|
26
|
+
migration_number.to_s
|
27
|
+
else
|
28
|
+
"%.3d" % (current_migration_number(dirname) + 1)
|
29
|
+
end
|
23
30
|
end
|
24
31
|
|
25
32
|
def create_migration_file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts-as-taggable-on
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 2.1.
|
9
|
+
- 1
|
10
|
+
version: 2.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Bleigh
|
@@ -136,7 +136,6 @@ files:
|
|
136
136
|
- MIT-LICENSE
|
137
137
|
- README.rdoc
|
138
138
|
- Rakefile
|
139
|
-
- VERSION
|
140
139
|
- acts-as-taggable-on.gemspec
|
141
140
|
- generators/acts_as_taggable_on_migration/acts_as_taggable_on_migration_generator.rb
|
142
141
|
- generators/acts_as_taggable_on_migration/templates/migration.rb
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.0.6
|