gutentag 2.3.1 → 2.3.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 +5 -5
- data/Appraisals +2 -2
- data/CHANGELOG.md +6 -0
- data/gutentag.gemspec +1 -1
- data/lib/gutentag/tagged_with/id_query.rb +1 -1
- data/lib/gutentag/tagged_with/name_query.rb +1 -1
- data/spec/gutentag/active_record_spec.rb +9 -0
- data/spec/internal/app/models/thinkpiece.rb +5 -0
- data/spec/internal/db/schema.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b31660115c80a0a86d70ab6b0e77896e33b8dd81b51b4d841461a692f69b808
|
4
|
+
data.tar.gz: 4b3bcc20917350af7a07ec5186df2c23c6b6adee1f02700a9fcfc9c46ef9978c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 304828039b887d1f505e4ce68fbe6d0b8d3c5b70a5fa8f3cff4e26154c2a5fa278a3c3cd3a9cc3298f5609cb1b545da1ff001ddc8aa4f4af21566959562e1135
|
7
|
+
data.tar.gz: 68a753b3495279474106363deec171d8ba96d97621e1d131360cbb46f4d0e4d341b483b627d90f841c0b9bf44d66c84f75f5a42b7d5ea9d1e6d2a80dfa364c13
|
data/.travis.yml
CHANGED
data/Appraisals
CHANGED
@@ -31,7 +31,7 @@ appraise "rails_5_1" do
|
|
31
31
|
end if RUBY_VERSION.to_f >= 2.2 && RUBY_PLATFORM != "java"
|
32
32
|
|
33
33
|
appraise "rails_5_2" do
|
34
|
-
gem "rails", "~> 5.2.0
|
34
|
+
gem "rails", "~> 5.2.0"
|
35
35
|
gem "pg", "~> 1.0", :platform => :ruby
|
36
|
-
gem "mysql2", "~> 0.
|
36
|
+
gem "mysql2", "~> 0.5.0", :platform => :ruby
|
37
37
|
end if RUBY_VERSION.to_f >= 2.2 && RUBY_PLATFORM != "java"
|
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.3.2 - 2018-04-27
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
* The `tagged_with` method now finds tagged objects belonging to STI models (as discussed in [#53](https://github.com/pat/gutentag/issues/53)).
|
10
|
+
|
5
11
|
## 2.3.1 - 2018-04-05
|
6
12
|
|
7
13
|
### Fixed
|
data/gutentag.gemspec
CHANGED
@@ -11,7 +11,7 @@ class Gutentag::TaggedWith::NameQuery < Gutentag::TaggedWith::Query
|
|
11
11
|
|
12
12
|
def taggable_ids_query
|
13
13
|
Gutentag::Tagging.joins(:tag).select(:taggable_id).
|
14
|
-
where(:taggable_type => model.name).
|
14
|
+
where(:taggable_type => model.base_class.name).
|
15
15
|
where(Gutentag::Tag.table_name => {:name => values})
|
16
16
|
end
|
17
17
|
end
|
@@ -159,5 +159,14 @@ describe Gutentag::ActiveRecord do
|
|
159
159
|
it { is_expected.to include melbourne_article, melbourne_oregon_article }
|
160
160
|
it { is_expected.not_to include oregon_article }
|
161
161
|
end
|
162
|
+
|
163
|
+
it "should work on STI subclasses" do
|
164
|
+
thinkpiece = Thinkpiece.create! :tag_names => ["pancakes"]
|
165
|
+
|
166
|
+
expect(thinkpiece.tags.reload.collect(&:name)).to eq(["pancakes"])
|
167
|
+
expect(
|
168
|
+
Thinkpiece.tagged_with(:names => "pancakes", :match => :any).to_a
|
169
|
+
).to eq([thinkpiece])
|
170
|
+
end
|
162
171
|
end
|
163
172
|
end
|
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.3.
|
4
|
+
version: 2.3.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: 2018-04-
|
11
|
+
date: 2018-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -168,6 +168,7 @@ files:
|
|
168
168
|
- spec/gutentag/active_record_spec.rb
|
169
169
|
- spec/gutentag_spec.rb
|
170
170
|
- spec/internal/app/models/article.rb
|
171
|
+
- spec/internal/app/models/thinkpiece.rb
|
171
172
|
- spec/internal/config/database.yml
|
172
173
|
- spec/internal/db/schema.rb
|
173
174
|
- spec/internal/log/.gitignore
|