acts-as-taggable-on 6.5.0 → 7.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4120fe17937a900a8bbe921880f0e3e8c83a4355483bfbbb6eba6e99738b7fda
4
- data.tar.gz: 1b8924e2cb3a360e6be90986e5be0460652aac74225869f570200bde2a734cf2
3
+ metadata.gz: 3a719de5e742725a409d676059cc39e90875c07e1684f56fc6a00d970d4e1ffd
4
+ data.tar.gz: 8ae1467d822b80e8cd37a4e3e584d5e5467161625ab7b95ae4cc2db0de3cf6fb
5
5
  SHA512:
6
- metadata.gz: 28ea6660e352e3e025311ed9a3d470b941d3b4bca6108b3ce7eaadc0fd0aac3d8ba7508baf002ab2a8ac09ecd7bf2795e1b0a26158e1d636c305722e2bff9ad7
7
- data.tar.gz: 2ddf924977f9bdb6c0e6665186ce3de7d2624abb00b933b06194f64866bb39d3b98c0bb7a0f2de635c046a0b655ad084392120fbd12afb5ed06057579b38961d
6
+ metadata.gz: 67cb7da1b6efea8ce6652c60475b8977605577dd91efe4f7a07757a1a98c46ad024c57f47657a240690301927fe85f5dfb380411b20ddfa7860ef148536abe97
7
+ data.tar.gz: ffffd0d8a13f94fa8880914d20a165855dd9f019ea6c64d94439c44262b29a94381eb879c8e1273552b8856a7457a818364768c4a82740a6ff1dd7486eb67dc0
@@ -9,6 +9,7 @@ services:
9
9
  - postgresql
10
10
 
11
11
  rvm:
12
+ - 2.7.0
12
13
  - 2.6.5
13
14
  - 2.5.5
14
15
  - 2.4.6
@@ -24,6 +25,7 @@ gemfile:
24
25
  - gemfiles/activerecord_5.1.gemfile
25
26
  - gemfiles/activerecord_5.0.gemfile
26
27
  - gemfiles/activerecord_6.0.gemfile
28
+ - gemfiles/activerecord_6.1.gemfile
27
29
 
28
30
  bundler_args: '--without local_development --jobs 3 --retry 3'
29
31
 
@@ -41,3 +43,7 @@ matrix:
41
43
  gemfile: gemfiles/activerecord_6.0.gemfile
42
44
  - rvm: 2.4.6
43
45
  gemfile: gemfiles/activerecord_6.0.gemfile
46
+ - rvm: 2.3.7
47
+ gemfile: gemfiles/activerecord_6.1.gemfile
48
+ - rvm: 2.4.6
49
+ gemfile: gemfiles/activerecord_6.1.gemfile
data/Appraisals CHANGED
@@ -11,5 +11,9 @@ appraise 'activerecord-5.0' do
11
11
  end
12
12
 
13
13
  appraise 'activerecord-6.0' do
14
- gem 'activerecord', "~> 6.0.0.beta1"
14
+ gem 'activerecord', "~> 6.0.0"
15
+ end
16
+
17
+ appraise 'activerecord-6.1' do
18
+ gem 'activerecord', "~> 6.1.0"
15
19
  end
@@ -10,19 +10,28 @@ Each change should fall into categories that would affect whether the release is
10
10
 
11
11
  As such, _Breaking Changes_ are major. _Features_ would map to either major or minor. _Fixes_, _Performance_, and _Misc_ are either minor or patch, the difference being kind of fuzzy for the purposes of history. Adding _Documentation_ (including tests) would be patch level.
12
12
 
13
- ### [Master / Unreleased](https://github.com/mbleigh/acts-as-taggable-on/compare/v6.0.1...master)
13
+ ### [v7.0.0) / 2020-12-31](https://github.com/mbleigh/acts-as-taggable-on/compare/v6.5.0...v7.0.0)
14
+ * Features
15
+ * [@kvokka Rails 6.1 support](https://github.com/mbleigh/acts-as-taggable-on/pull/1013)
16
+ * Fixes
17
+ * [@nbulaj Add support for Ruby 2.7 and it's kwargs](https://github.com/mbleigh/acts-as-taggable-on/pull/910)
18
+ * [@Andythurlow @endorfin case sensitivity fix for tagged_with](https://github.com/mbleigh/acts-as-taggable-on/pull/965)
19
+
20
+ ### [6.5.0 / 2019-11-07](https://github.com/mbleigh/acts-as-taggable-on/compare/v6.0.0...v6.5.0)
21
+
14
22
  * Features
15
23
  * [@mizukami234 @junmoka Make table names configurable](https://github.com/mbleigh/acts-as-taggable-on/pull/910)
24
+ * [@damianlegawiec Rails 6.0.0.beta1 support](https://github.com/mbleigh/acts-as-taggable-on/pull/937)
16
25
  * Fixes
17
26
  * [@tonyta Avoid overriding user-defined columns cache methods](https://github.com/mbleigh/acts-as-taggable-on/pull/911)
27
+ * [@hengwoon tags_count only need to join on the taggable's table if using STI](https://github.com/mbleigh/acts-as-taggable-on/pull/904)
28
+ * [@bduran82 Avoid unnecessary queries when finding or creating tags](https://github.com/mbleigh/acts-as-taggable-on/pull/839)
29
+ * [@iiwo simplify relation options syntax](https://github.com/mbleigh/acts-as-taggable-on/pull/940)
18
30
  * Misc
19
31
  * [@gssbzn Remove legacy code for an empty query and replace it with ` ActiveRecord::none`](https://github.com/mbleigh/acts-as-taggable-on/pull/906)
32
+ * [@iiwo remove unneeded spec case](https://github.com/mbleigh/acts-as-taggable-on/pull/941)
20
33
  * Documentation
21
34
  * [@tonyta Cleanup CHANGELOG.md formatting and references](https://github.com/mbleigh/acts-as-taggable-on/pull/913)
22
- ### [6.0.1 / 2018-06-27](https://github.com/mbleigh/acts-as-taggable-on/compare/v6.0.0...v6.0.1)
23
-
24
- * Fixes
25
- * [@hengwoon tags_count only need to join on the taggable's table if using STI](https://github.com/mbleigh/acts-as-taggable-on/pull/904)
26
35
 
27
36
  ### [6.0.0 / 2018-06-19](https://github.com/mbleigh/acts-as-taggable-on/compare/v5.0.0...v6.0.0)
28
37
 
data/README.md CHANGED
@@ -103,8 +103,8 @@ Setup
103
103
 
104
104
  ```ruby
105
105
  class User < ActiveRecord::Base
106
- acts_as_taggable # Alias for acts_as_taggable_on :tags
107
- acts_as_taggable_on :skills, :interests
106
+ acts_as_taggable_on :tags
107
+ acts_as_taggable_on :skills, :interests #You can also configure multiple tag types per model
108
108
  end
109
109
 
110
110
  class UsersController < ApplicationController
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.post_install_message = File.read('UPGRADING.md')
23
23
  end
24
24
 
25
- gem.add_runtime_dependency 'activerecord', '>= 5.0', '< 6.1'
25
+ gem.add_runtime_dependency 'activerecord', '>= 5.0', '< 6.2'
26
26
 
27
27
  gem.add_development_dependency 'rspec-rails'
28
28
  gem.add_development_dependency 'rspec-its'
@@ -5,7 +5,7 @@ case ENV["DB"]
5
5
  when "postgresql"
6
6
  gem 'pg'
7
7
  when "mysql"
8
- gem 'mysql2', '~> 0.3'
8
+ gem 'mysql2', '~> 0.4'
9
9
  else
10
10
  gem 'sqlite3'
11
11
  end
@@ -0,0 +1,23 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.1.0"
6
+ case ENV["DB"]
7
+ when "postgresql"
8
+ gem 'pg'
9
+ when "mysql"
10
+ gem 'mysql2', '~> 0.5'
11
+ else
12
+ gem 'sqlite3'
13
+ end
14
+
15
+ group :local_development do
16
+ gem "guard"
17
+ gem "guard-rspec"
18
+ gem "appraisal"
19
+ gem "rake"
20
+ gem "byebug", platforms: [:mri]
21
+ end
22
+
23
+ gemspec path: "../"
@@ -58,7 +58,7 @@ module ActsAsTaggableOn
58
58
  def self.glue
59
59
  setting = @configuration.delimiter
60
60
  delimiter = setting.kind_of?(Array) ? setting[0] : setting
61
- delimiter.ends_with?(' ') ? delimiter : "#{delimiter} "
61
+ delimiter.end_with?(' ') ? delimiter : "#{delimiter} "
62
62
  end
63
63
 
64
64
  class Configuration
@@ -10,7 +10,7 @@ module ActsAsTaggableOn
10
10
  ### VALIDATIONS:
11
11
 
12
12
  validates_presence_of :name
13
- validates_uniqueness_of :name, if: :validates_name_uniqueness?
13
+ validates_uniqueness_of :name, if: :validates_name_uniqueness?, case_sensitive: true
14
14
  validates_length_of :name, maximum: 255
15
15
 
16
16
  # monkey patch this method if don't need name uniqueness validation
@@ -29,9 +29,9 @@ module ActsAsTaggableOn::Taggable::TaggedWithQuery
29
29
  matches_attribute = matches_attribute.lower unless ActsAsTaggableOn.strict_case_match
30
30
 
31
31
  if options[:wild].present?
32
- matches_attribute.matches("%#{escaped_tag(tag)}%", "!")
32
+ matches_attribute.matches("%#{escaped_tag(tag)}%", "!", ActsAsTaggableOn.strict_case_match)
33
33
  else
34
- matches_attribute.matches(escaped_tag(tag), "!")
34
+ matches_attribute.matches(escaped_tag(tag), "!", ActsAsTaggableOn.strict_case_match)
35
35
  end
36
36
  end
37
37
 
@@ -40,9 +40,9 @@ module ActsAsTaggableOn::Taggable::TaggedWithQuery
40
40
  matches_attribute = matches_attribute.lower unless ActsAsTaggableOn.strict_case_match
41
41
 
42
42
  if options[:wild].present?
43
- matches_attribute.matches_any(tag_list.map{|tag| "%#{escaped_tag(tag)}%"}, "!")
43
+ matches_attribute.matches_any(tag_list.map{|tag| "%#{escaped_tag(tag)}%"}, "!", ActsAsTaggableOn.strict_case_match)
44
44
  else
45
- matches_attribute.matches_any(tag_list.map{|tag| "#{escaped_tag(tag)}"}, "!")
45
+ matches_attribute.matches_any(tag_list.map{|tag| "#{escaped_tag(tag)}"}, "!", ActsAsTaggableOn.strict_case_match)
46
46
  end
47
47
  end
48
48
 
@@ -18,7 +18,7 @@ module ActsAsTaggableOn
18
18
  owned_taggings_scope = opts.delete(:scope)
19
19
 
20
20
  has_many :owned_taggings, owned_taggings_scope,
21
- opts.merge(
21
+ **opts.merge(
22
22
  as: :tagger,
23
23
  class_name: '::ActsAsTaggableOn::Tagging',
24
24
  dependent: :destroy
@@ -6,7 +6,7 @@ module ActsAsTaggableOn
6
6
  belongs_to :tag, class_name: '::ActsAsTaggableOn::Tag', counter_cache: ActsAsTaggableOn.tags_counter
7
7
  belongs_to :taggable, polymorphic: true
8
8
 
9
- belongs_to :tagger, { polymorphic: true, optional: true }
9
+ belongs_to :tagger, polymorphic: true, optional: true
10
10
 
11
11
  scope :owned_by, ->(owner) { where(tagger: owner) }
12
12
  scope :not_owned, -> { where(tagger_id: nil, tagger_type: nil) }
@@ -1,3 +1,3 @@
1
1
  module ActsAsTaggableOn
2
- VERSION = '6.5.0'
2
+ VERSION = '7.0.0'
3
3
  end
@@ -477,7 +477,7 @@ describe 'Taggable' do
477
477
 
478
478
  expect(TaggableModel.tagged_with(%w(bob tricia), wild: true, any: true).to_a.sort_by { |o| o.id }).to eq([bob, frank, steve])
479
479
  expect(TaggableModel.tagged_with(%w(bob tricia), wild: true, exclude: true).to_a).to eq([jim])
480
- expect(TaggableModel.tagged_with('ji', wild: true, any: true).to_a =~ [frank, jim])
480
+ expect(TaggableModel.tagged_with('ji', wild: true, any: true).to_a).to match_array([frank, jim])
481
481
  end
482
482
  end
483
483
 
@@ -10,7 +10,7 @@ if File.exist?(database_yml)
10
10
  ActiveRecord::Base.configurations = YAML.load_file(database_yml)
11
11
  ActiveRecord::Base.logger = Logger.new(File.join(File.dirname(__FILE__), '../debug.log'))
12
12
  ActiveRecord::Base.logger.level = ENV['TRAVIS'] ? ::Logger::ERROR : ::Logger::DEBUG
13
- config = ActiveRecord::Base.configurations[db_name]
13
+ config = ActiveSupport::HashWithIndifferentAccess.new(ActiveRecord::Base.configurations[db_name])
14
14
 
15
15
  begin
16
16
  ActiveRecord::Base.establish_connection(db_name.to_sym)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts-as-taggable-on
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.5.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
8
8
  - Joost Baaij
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-11-07 00:00:00.000000000 Z
12
+ date: 2020-12-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '5.0'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '6.1'
23
+ version: '6.2'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '5.0'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.1'
33
+ version: '6.2'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rspec-rails
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -133,6 +133,7 @@ files:
133
133
  - gemfiles/activerecord_5.1.gemfile
134
134
  - gemfiles/activerecord_5.2.gemfile
135
135
  - gemfiles/activerecord_6.0.gemfile
136
+ - gemfiles/activerecord_6.1.gemfile
136
137
  - lib/acts-as-taggable-on.rb
137
138
  - lib/acts_as_taggable_on.rb
138
139
  - lib/acts_as_taggable_on/default_parser.rb
@@ -223,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
224
  version: '0'
224
225
  requirements: []
225
226
  rubygems_version: 3.0.3
226
- signing_key:
227
+ signing_key:
227
228
  specification_version: 4
228
229
  summary: Advanced tagging for Rails.
229
230
  test_files: