Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
gemfile: ['rails_6.0', 'rails_6.1', 'rails_7.0']
gemfile: ['rails_6.0', 'rails_6.1', 'rails_7.0', 'rails_7.1']

ruby: ['3.0', '3.1', '3.2', '3.3']

Expand Down
8 changes: 8 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,11 @@ appraise "rails-7.0" do
gem "rails", "~> 7.0.0"
end
end

appraise "rails-7.1" do
gem "activesupport", "~> 7.1.0"

group :development do
gem "rails", "~> 7.1.0"
end
end
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**Merged pull requests:**

* Add support for FSM iOS badges [\#704](https://github.com/rpush/rpush/pull/704) ([WoutDev](https://github.com/WoutDev))
* Support for Rails 7.1 [\#675](https://github.com/rpush/rpush/pull/675) ([benlangfeld](https://github.com/benlangfeld))

[Full Changelog](https://github.com/rpush/rpush/compare/v9.0.0...HEAD)

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
rpush (9.0.0)
activesupport (>= 6.0, < 7.1.0)
activesupport (>= 6.0, < 7.2.0, != 7.1.4)
googleauth
jwt (>= 1.5.6)
multi_json (~> 1.0)
Expand Down
11 changes: 11 additions & 0 deletions gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activesupport", "~> 7.1.0"

group :development do
gem "rails", "~> 7.1.0"
end

gemspec path: "../"
2 changes: 2 additions & 0 deletions lib/rpush/client/active_record/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Notification < ::ActiveRecord::Base

self.table_name = 'rpush_notifications'

self.default_column_serializer = YAML if respond_to?(:default_column_serializer)

serialize :registration_ids
serialize :url_args

Expand Down
2 changes: 1 addition & 1 deletion rpush.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'net-http-persistent'
s.add_runtime_dependency 'net-http2', '~> 0.18', '>= 0.18.3'
s.add_runtime_dependency 'jwt', '>= 1.5.6'
s.add_runtime_dependency 'activesupport', '>= 6.0', '< 7.1.0'
s.add_runtime_dependency 'activesupport', '>= 6.0', '!= 7.1.4', '< 7.2.0' # https://github.com/rails/rails/issues/52820
s.add_runtime_dependency 'thor', ['>= 0.18.1', '< 2.0']
s.add_runtime_dependency 'railties'
s.add_runtime_dependency 'rainbow'
Expand Down
22 changes: 15 additions & 7 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ def client
require 'timecop'
require 'activerecord-jdbc-adapter' if defined? JRUBY_VERSION

require 'rpush'
require 'rpush/daemon'
require 'rpush/client/redis'
require 'rpush/client/active_record'
require 'rpush/daemon/store/active_record'
require 'rpush/daemon/store/redis'

def active_record?
client == :active_record
end
Expand All @@ -32,6 +25,21 @@ def redis?
client == :redis
end

if active_record?
require 'active_record'
if ActiveRecord::Base.respond_to?(:default_column_serializer)
# New default in Rails 7.1: https://github.com/rails/rails/pull/47422
ActiveRecord::Base.default_column_serializer = nil
end
end

require 'rpush'
require 'rpush/daemon'
require 'rpush/client/redis'
require 'rpush/client/active_record'
require 'rpush/daemon/store/active_record'
require 'rpush/daemon/store/redis'

require 'support/active_record_setup' if active_record?

RPUSH_ROOT = '/tmp/rails_root'
Expand Down