Skip to content

Commit

Permalink
prepare version v10
Browse files Browse the repository at this point in the history
chore: remove deprecated method
feat: convert tagger to recent syntax
  • Loading branch information
seuros committed Oct 14, 2023
1 parent e5e8de7 commit e261357
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ appraise 'activerecord-7.0' do
end

appraise 'activerecord-7.1' do
gem 'activerecord', '~> 7.1.0'
gem 'pg'
gem 'mysql2', '~> 0.5'
end
gem 'activerecord', '~> 7.1.0'
gem 'pg'
gem 'mysql2', '~> 0.5'
end
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Each change should fall into categories that would affect whether the release is

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.

### [v9.1.0) / unreleased](https://github.com/mbleigh/acts-as-taggable-on/compare/v9.0.1...master)
### [v10.0.0) / unreleased](https://github.com/mbleigh/acts-as-taggable-on/compare/v9.0.1...master)
* Features
* [@glampr Add support for prefix and suffix searches alongside previously supported containment (wildcard) searches](https://github.com/mbleigh/acts-as-taggable-on/pull/1082)
* [@donquxiote Add support for horizontally sharded databases](https://github.com/mbleigh/acts-as-taggable-on/pull/1079)
Expand Down
2 changes: 1 addition & 1 deletion acts-as-taggable-on.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split($/)
gem.test_files = gem.files.grep(%r{^spec/})
gem.require_paths = ['lib']
gem.required_ruby_version = '>= 2.5.0'
gem.required_ruby_version = '>= 2.7.0'

if File.exist?('UPGRADING.md')
gem.post_install_message = File.read('UPGRADING.md')
Expand Down
12 changes: 3 additions & 9 deletions lib/acts_as_taggable_on/tagger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ def tagger?
false
end

def is_tagger?
tagger?
end
alias is_tagger? tagger?
end

module InstanceMethods
Expand Down Expand Up @@ -75,19 +73,15 @@ def tagger?
self.class.is_tagger?
end

def is_tagger?
tagger?
end
alias is_tagger? tagger?
end

module SingletonMethods
def tagger?
true
end

def is_tagger?
tagger?
end
alias is_tagger? tagger?
end
end
end
4 changes: 0 additions & 4 deletions lib/acts_as_taggable_on/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ def like_operator
using_postgresql? ? 'ILIKE' : 'LIKE'
end

def legacy_activerecord?
ActiveRecord.version <= Gem::Version.new('5.3.0')
end

# escape _ and % characters in strings, since these are wildcards in SQL.
def escape_like(str)
str.gsub(/[!%_]/) { |x| "!#{x}" }
Expand Down
2 changes: 1 addition & 1 deletion lib/acts_as_taggable_on/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ActsAsTaggableOn
VERSION = '9.0.1'
VERSION = '10.0.0'
end

0 comments on commit e261357

Please sign in to comment.