gutentag 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b49f3b3dd099ef714f2b23fa1d0e1b08059c59c15447cdece6ee07ac1a0a1272
4
- data.tar.gz: c0ef3dd657f3c0b6fe216b80807f74bed2abbdefcbd2c6c467176a8ca16b38a2
3
+ metadata.gz: 4a57320061f9e3181385744a38c797564a7ce45c2fceb6e51ba3bc7a5e7a4d68
4
+ data.tar.gz: 86d6f5d761a18434e20919b1996234896f33f5764ed2f6032cca5dbe82164e2a
5
5
  SHA512:
6
- metadata.gz: ffeef43eb46712c0a261fc569db0571cc2ad66b68254cac89afbba58df15b8f41142b9401f170997608d692d81c353b744b1d71756520f7a80e4cb9c84caeb37
7
- data.tar.gz: 80996c6d6b7f8addfb86092b80c8ffed4c28f60629db98e126fab4303865b215c4efbf76de30e9d5c8ab74e7a76859fbdfb9fff5d1c16905153f9a91d1aa6e7c
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
@@ -4,10 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- gem "appraisal",
8
- :git => "https://github.com/marcotc/appraisal.git",
9
- :branch => "explicit-require-set"
10
-
11
7
  gem "test-unit", :platform => :ruby_22
12
8
 
13
9
  gem "mysql2", "~> 0.3", :platform => :ruby
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.0
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.5'
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-2015, Gutentag is developed and maintained by Pat Allan, and is released under the open MIT Licence.
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 GutentagTables < ActiveRecord::Migration
3
+ class GutentagTables < ActiveRecord::Migration[4.2]
4
4
  def up
5
5
  create_table :gutentag_taggings do |t|
6
6
  t.integer :tag_id, :null => false
@@ -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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class NoNullCounters < ActiveRecord::Migration
3
+ class NoNullCounters < ActiveRecord::Migration[4.2]
4
4
  def up
5
5
  change_column :gutentag_tags, :taggings_count, :integer,
6
6
  :default => 0,
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.0"
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
- # s.add_development_dependency "appraisal", "~> 2.3"
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
- puts "No changes required"
13
- else
14
- migration_files.each do |file|
15
- gsub_file file,
16
- /< ActiveRecord::Migration$/,
17
- "< ActiveRecord::Migration[#{rails_version}]"
18
- end
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.0
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-07-10 00:00:00.000000000 Z
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