gutentag 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Appraisals +1 -1
- data/CHANGELOG.md +7 -1
- data/gutentag.gemspec +2 -2
- data/lib/gutentag/active_record.rb +1 -1
- data/lib/gutentag/active_record/instance_methods_4_2.rb +12 -9
- data/spec/acceptance/tag_names_spec.rb +4 -0
- data/spec/internal/app/models/comment.rb +5 -0
- data/spec/internal/db/schema.rb +6 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e934d0f1e941db5003a28ee2dc0ca30592db0b594f5633eeac2374f6a0ee8f9f
|
4
|
+
data.tar.gz: 8972fd4264e0dad5499ddbd7c9642caf8b15052fa78b63bebec6de4c57f1b9b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55961186203575a716c658bd966102d344badbe8940f88523e6e4e76d795b8a9089be43320fd40735b749ed7f4507d3fe7d509bdd6f942dd9d2fabfb0d32e89b
|
7
|
+
data.tar.gz: 90f27936f1f5a96b522d26ad53ce8c74309fdc62c4409cb662112ee8603e610158ae379785646217b0cc61ea5a5e4150d31eaea77ea83033828c0d0af2db8771
|
data/.travis.yml
CHANGED
data/Appraisals
CHANGED
@@ -36,7 +36,7 @@ appraise "rails_5_2" do
|
|
36
36
|
end if RUBY_VERSION.to_f >= 2.2
|
37
37
|
|
38
38
|
appraise "rails_6_0" do
|
39
|
-
gem "rails", "~> 6.0.0.
|
39
|
+
gem "rails", "~> 6.0.0.rc1"
|
40
40
|
gem "pg", "~> 1.0", :platform => :ruby
|
41
41
|
gem "mysql2", "~> 0.5.0", :platform => :ruby
|
42
42
|
gem "sqlite3", "~> 1.4", :platform => :ruby
|
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.5.2 - 2019-07-08
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
* `tag_names` will no longer be referenced as a database column when tagged models are requested in joins in Rails 4.2 (as reported in [issue #67](https://github.com/pat/gutentag/issues/67)).
|
10
|
+
|
5
11
|
## 2.5.1 - 2019-05-10
|
6
12
|
|
7
13
|
### Fixed
|
@@ -10,7 +16,7 @@ All notable changes to this project (at least, from v0.5.0 onwards) will be docu
|
|
10
16
|
|
11
17
|
## 2.5.0 - 2019-03-15
|
12
18
|
|
13
|
-
**
|
19
|
+
**Please note this release ends official support of Rails 3.2 and Ruby (MRI) 2.2.** The code currently still works on Ruby 2.2, and all features except for the new `Gutentag::Tag.names_for_scope` method work in Rails 3.2, but they're no longer tested against, and cannot be guaranteed to work in future releases.
|
14
20
|
|
15
21
|
### Added
|
16
22
|
|
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.5.
|
5
|
+
s.version = "2.5.2"
|
6
6
|
s.authors = ["Pat Allan"]
|
7
7
|
s.email = ["pat@freelancing-gods.com"]
|
8
8
|
s.homepage = "https://github.com/pat/gutentag"
|
@@ -22,6 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_development_dependency "database_cleaner", "~> 1.6"
|
23
23
|
s.add_development_dependency "rails"
|
24
24
|
s.add_development_dependency "rspec-rails", "~> 3.1"
|
25
|
-
s.add_development_dependency "rubocop", "~> 0.
|
25
|
+
s.add_development_dependency "rubocop", "~> 0.72.0"
|
26
26
|
s.add_development_dependency "rubocop-performance", "~> 1"
|
27
27
|
end
|
@@ -8,22 +8,25 @@ module Gutentag::ActiveRecord::InstanceMethods
|
|
8
8
|
def reset_tag_names
|
9
9
|
# Update the underlying value rather than going through the setter, to
|
10
10
|
# ensure this update doesn't get marked as a 'change'.
|
11
|
-
|
11
|
+
@tag_names = nil
|
12
12
|
end
|
13
13
|
|
14
14
|
def tag_names
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
@tag_names ||= begin
|
16
|
+
raw = tags.pluck(:name)
|
17
|
+
raw_write_attribute "tag_names", raw
|
18
|
+
raw
|
19
19
|
end
|
20
|
-
|
21
|
-
# Use ActiveRecord's underlying implementation with change tracking.
|
22
|
-
super
|
23
20
|
end
|
24
21
|
|
25
22
|
def tag_names=(names)
|
26
|
-
|
23
|
+
new_names = Gutentag::TagNames.call names
|
24
|
+
return if new_names.sort == tag_names.sort
|
25
|
+
|
26
|
+
tag_names_will_change!
|
27
|
+
|
28
|
+
write_attribute "tag_names", new_names
|
29
|
+
@tag_names = new_names
|
27
30
|
end
|
28
31
|
|
29
32
|
private
|
data/spec/internal/db/schema.rb
CHANGED
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.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Allan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.72.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.72.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rubocop-performance
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,6 +183,7 @@ files:
|
|
183
183
|
- spec/gutentag/active_record_spec.rb
|
184
184
|
- spec/gutentag_spec.rb
|
185
185
|
- spec/internal/app/models/article.rb
|
186
|
+
- spec/internal/app/models/comment.rb
|
186
187
|
- spec/internal/app/models/thinkpiece.rb
|
187
188
|
- spec/internal/config/database.yml
|
188
189
|
- spec/internal/db/schema.rb
|