Skip to content

Commit

Permalink
Merge pull request #1136 from matthewbjones/rails8.0
Browse files Browse the repository at this point in the history
feat!: support rails 8.0
  • Loading branch information
seuros authored Nov 9, 2024
2 parents 1890a97 + b54771d commit 5b66e47
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@ jobs:
ruby:
- 3.3
- 3.2
- 3.1
gemfile:
- gemfiles/activerecord_8.0.gemfile
- gemfiles/activerecord_7.2.gemfile
- gemfiles/activerecord_7.1.gemfile
- gemfiles/activerecord_7.0.gemfile
db:
- mysql
- postgresql
- sqlite3
include:
- ruby: truffleruby-head
db: postgresql
gemfile: gemfiles/activerecord_7.0.gemfile
gemfile: gemfiles/activerecord_8.0.gemfile
- ruby: truffleruby-head
db: postgresql
gemfile: gemfiles/activerecord_7.1.gemfile
Expand Down
19 changes: 10 additions & 9 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# frozen_string_literal: true

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

appraise 'activerecord-7.1' do
gem 'activerecord', '~> 7.1.0'
gem 'pg'
Expand All @@ -17,6 +10,14 @@ end
appraise 'activerecord-7.2' do
gem 'activerecord', '~> 7.2.0'
gem 'pg'
gem 'sqlite3', '~> 1.4'
gem 'sqlite3', '~> 2.2'
gem 'mysql2', '~> 0.5'
end
end

appraise 'activerecord-8.0' do
gem 'activerecord', '~> 8.0.0.beta1'
gem 'railties', '~> 8.0.0.beta1'
gem 'pg'
gem 'sqlite3', '~> 2.2'
gem 'mysql2', '~> 0.5'
end
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,10 @@ Versions >= 8.x are compatible with Ruby 2.3.7+ and Rails 5 and 6.

Versions >= 9.x are compatible with Ruby 2.5.0 and Rails 6 and 7.

Versions >= 11.x are compatible with Ruby 3.1.0 and Rails 7.

Versions >= 12.x are compatible with Ruby 3.2.0 and Rails 7.1 and 8.0.

For an up-to-date roadmap, see https://github.com/mbleigh/acts-as-taggable-on/milestones

## Testing
Expand Down
6 changes: 2 additions & 4 deletions acts-as-taggable-on.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@ 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 = '>= 3.0.0'
gem.required_ruby_version = '>= 3.2.0'

if File.exist?('UPGRADING.md')
gem.post_install_message = File.read('UPGRADING.md')
end

gem.add_runtime_dependency 'activerecord', '>= 7.0', '< 8.0'
gem.add_runtime_dependency 'activerecord', '>= 7.1', '< 8.1'
gem.add_runtime_dependency 'zeitwerk', '>= 2.4', '< 3.0'

gem.add_development_dependency 'rspec-rails'
gem.add_development_dependency 'rspec-its'
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'barrier'
gem.add_development_dependency 'database_cleaner'

gem.metadata['changelog_uri'] = gem.homepage + '/blob/master/CHANGELOG.md'
end
2 changes: 1 addition & 1 deletion gemfiles/activerecord_7.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "https://rubygems.org"

gem "activerecord", "~> 7.2.0"
gem "pg"
gem "sqlite3", "~> 1.4"
gem "sqlite3", "~> 2.1"
gem "mysql2", "~> 0.5"

group :local_development do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

source "https://rubygems.org"

gem "activerecord", "~> 7.0.1"
gem "activerecord", "~> 8.0.0.beta1"
gem "railties", "~> 8.0.0.beta1"
gem "pg"
gem "sqlite3", "~> 1.4"
gem "sqlite3", "~> 2.1"
gem "mysql2", "~> 0.5"

group :local_development do
Expand Down
2 changes: 1 addition & 1 deletion lib/acts-as-taggable-on/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def self.named(name)

def self.named_any(list)
clause = list.map do |tag|
sanitize_sql_for_named_any(tag).force_encoding('BINARY')
sanitize_sql_for_named_any(tag)
end.join(' OR ')
where(clause)
end
Expand Down

0 comments on commit 5b66e47

Please sign in to comment.