Skip to content

Commit

Permalink
DEV: Add compatibility with Rails 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Flink committed Aug 13, 2024
1 parent 3c3ee42 commit b16dbe9
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3"]
rails: ["6.1", "7.0", "7.1", "edge"]
ok_to_fail: [""]
ruby: ["3.1", "3.2", "3.3", "3.4"]
rails: ["6.1", "7.0", "7.1", "7.2", "edge"]
exclude:
- ruby: "3.4"
rails: "6.1"
- ruby: "3.4"
rails: "7.0"
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.1.0] - 2024-08-13

### Added

- Support for Rails 7.2+

## [6.0.0] - 2024-03-14

### Added
Expand Down
12 changes: 12 additions & 0 deletions gemfiles/rails_7.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true
source 'https://rubygems.org'

group :test do
gem 'activerecord', '~> 7.2.0'
gem 'railties', '~> 7.2.0'
gem 'rspec'
gem 'sqlite3', '~> 1.4'
gem 'byebug'
gem 'rubocop'
gem 'rubocop-discourse'
end
5 changes: 3 additions & 2 deletions lib/rails_multisite/connection_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,10 @@ def host(env)
request = Rack::Request.new(env)

host =
if request["__ws"] && self.class.asset_hostnames&.include?(request.host)
if request.params["__ws"] &&
self.class.asset_hostnames&.include?(request.host)
request.cookies.clear
request["__ws"]
request.params["__ws"]
else
request.host
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rails_multisite/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true
#
module RailsMultisite
VERSION = "6.0.0"
VERSION = "6.1.0"
end

0 comments on commit b16dbe9

Please sign in to comment.