gutentag 2.6.0 → 2.6.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile +0 -4
- data/README.md +3 -3
- data/db/migrate/1_gutentag_tables.rb +1 -1
- data/db/migrate/2_gutentag_cache_counter.rb +1 -1
- data/db/migrate/3_no_null_counters.rb +1 -1
- data/gutentag.gemspec +2 -2
- data/lib/gutentag/generators/migration_versions_generator.rb +9 -7
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a57320061f9e3181385744a38c797564a7ce45c2fceb6e51ba3bc7a5e7a4d68
|
4
|
+
data.tar.gz: 86d6f5d761a18434e20919b1996234896f33f5764ed2f6032cca5dbe82164e2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45e211fdef9849824571e960dfe21d68eaa77ca2244375952e823e031bc112d797f55513aa7adf25c6469d399ba9f7e045c7714cf875c13a754823e91cea3f17
|
7
|
+
data.tar.gz: 86f48f5be03702882c074ff36d055ca735ca97ef0ae9befa1fd95e750cbcea7c44b0f00e52a4df19f8007fb361816661e7415035a083ed288fd01e4f003884b8
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project (at least, from v0.5.0 onwards) will be documented in this file.
|
4
4
|
|
5
|
+
## 2.6.1 - 2021-09-18
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
* The initially-generated migrations now work out of the box with Rails 5.0+, using the 4.2 version. The generator will now update that version to the latest, or remove it for Rails 4.2. See later discussion in [#80](https://github.com/pat/gutentag/issues/80).
|
10
|
+
|
5
11
|
## 2.6.0 - 2021-07-10
|
6
12
|
|
7
13
|
### Added
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -81,7 +81,7 @@ Article.tagged_with(:ids => [tag_a.id, tag_b.id], :match => :none)
|
|
81
81
|
These are the versions the test suite runs against. It's possible it may work on older versions of Ruby, but it definitely won't work on older versions of Rails.
|
82
82
|
|
83
83
|
* Ruby: MRI v2.3-v2.6, JRuby v9.2.5
|
84
|
-
* Rails/ActiveRecord: v4.0-v6.
|
84
|
+
* Rails/ActiveRecord: v4.0-v6.1
|
85
85
|
|
86
86
|
If you're using MRI v2.2 and/or ActiveRecord v3.2, the last version of Gutentag that fully supported those versions is v2.4.1.
|
87
87
|
|
@@ -90,7 +90,7 @@ If you're using MRI v2.2 and/or ActiveRecord v3.2, the last version of Gutentag
|
|
90
90
|
Get it into your Gemfile - and don't forget the version constraint!
|
91
91
|
|
92
92
|
```Ruby
|
93
|
-
gem 'gutentag', '~> 2.
|
93
|
+
gem 'gutentag', '~> 2.6'
|
94
94
|
```
|
95
95
|
|
96
96
|
Next: your tags get persisted to your database, so let's import the migrations, update them to your current version of Rails, and then migrate:
|
@@ -179,4 +179,4 @@ Please note that this project now has a [Contributor Code of Conduct](http://con
|
|
179
179
|
|
180
180
|
<h2 id="licence">Licence</h2>
|
181
181
|
|
182
|
-
Copyright (c) 2013-
|
182
|
+
Copyright (c) 2013-2021, Gutentag is developed and maintained by Pat Allan, and is released under the open MIT Licence.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class GutentagCacheCounter < ActiveRecord::Migration
|
3
|
+
class GutentagCacheCounter < ActiveRecord::Migration[4.2]
|
4
4
|
def up
|
5
5
|
add_column :gutentag_tags, :taggings_count, :integer, :default => 0
|
6
6
|
add_index :gutentag_tags, :taggings_count
|
data/gutentag.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "gutentag"
|
5
|
-
s.version = "2.6.
|
5
|
+
s.version = "2.6.1"
|
6
6
|
s.authors = ["Pat Allan"]
|
7
7
|
s.email = ["pat@freelancing-gods.com"]
|
8
8
|
s.homepage = "https://github.com/pat/gutentag"
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.add_runtime_dependency "activerecord", ">= 3.2.0"
|
18
18
|
|
19
|
-
|
19
|
+
s.add_development_dependency "appraisal", "~> 2.4.1"
|
20
20
|
s.add_development_dependency "bundler", ">= 1.17"
|
21
21
|
s.add_development_dependency "combustion", "~> 1.1"
|
22
22
|
s.add_development_dependency "database_cleaner", "~> 1.6"
|
@@ -8,14 +8,16 @@ module Gutentag
|
|
8
8
|
desc "Update the ActiveRecord version in Gutentag migrations"
|
9
9
|
|
10
10
|
def update_migration_versions
|
11
|
+
superclass = "ActiveRecord::Migration[#{rails_version}]"
|
12
|
+
|
11
13
|
if ::ActiveRecord::VERSION::MAJOR < 5
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
superclass = "ActiveRecord::Migration"
|
15
|
+
end
|
16
|
+
|
17
|
+
migration_files.each do |file|
|
18
|
+
gsub_file file,
|
19
|
+
/< ActiveRecord::Migration\[4\.2\]$/,
|
20
|
+
"< #{superclass}"
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gutentag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Allan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: appraisal
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.4.1
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.4.1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|