Skip to content

Commit

Permalink
chore: remove deprecated method
Browse files Browse the repository at this point in the history
feat: convert tagger to recent syntax
  • Loading branch information
seuros committed Oct 14, 2023
1 parent e5e8de7 commit bef3d54
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 23 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
10 changes: 5 additions & 5 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
appraise 'activerecord-6.1' do
gem 'activerecord', '~> 6.1.0'
gem 'pg'
gem 'mysql2', '~> 0.5'
# gem 'mysql2', '~> 0.5'
end

appraise 'activerecord-7.0' do
gem 'activerecord', '~> 7.0.1'
gem 'pg'
gem 'mysql2', '~> 0.5'
# gem 'mysql2', '~> 0.5'
end

appraise 'activerecord-7.1' do
gem 'activerecord', '~> 7.1.0'
gem 'pg'
gem 'mysql2', '~> 0.5'
gem 'activerecord', '~> 7.1.0'
gem 'pg'
# gem 'mysql2', '~> 0.5'
end
1 change: 0 additions & 1 deletion gemfiles/activerecord_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ source "https://rubygems.org"

gem "activerecord", "~> 6.1.0"
gem "pg"
gem "mysql2", "~> 0.5"

group :local_development do
gem "guard"
Expand Down
1 change: 0 additions & 1 deletion gemfiles/activerecord_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ source "https://rubygems.org"

gem "activerecord", "~> 7.0.1"
gem "pg"
gem "mysql2", "~> 0.5"

group :local_development do
gem "guard"
Expand Down
1 change: 0 additions & 1 deletion gemfiles/activerecord_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ source "https://rubygems.org"

gem "activerecord", "~> 7.1.0"
gem "pg"
gem "mysql2", "~> 0.5"

group :local_development do
gem "guard"
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 bef3d54

Please sign in to comment.