Skip to content
Open
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
60 changes: 60 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,63 @@ jobs:
- run: bundle exec rake test
env:
NODE_OPTIONS: --openssl-legacy-provider

test_connection_pool_v3:
needs: check_react_and_ujs
strategy:
fail-fast: false
matrix:
js_package_manager:
- name: npm
installer: npm
- name: yarn_classic
installer: yarn
- name: pnpm
installer: pnpm
- name: bun
installer: bun
ruby: [3.2]
gemfile: [connection_pool_3]
runs-on: ubuntu-latest
env:
# $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
# Workaround b/c upgrading Minitest broke some mocking expectations
# having to do with automatic kwarg splatting
MT_KWARGS_HACK: 1
PACKAGE_JSON_FALLBACK_MANAGER: ${{ matrix.js_package_manager.name }}
SHAKAPACKER_USE_PACKAGE_JSON_GEM: true
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v3
- run: sudo npm -g install yalc ${{ matrix.js_package_manager.installer }}
- run: yalc publish
- name: Save root node_modules to cache
uses: actions/cache@v3
with:
path: node_modules
key: package-node-modules-cache-${{ hashFiles('yarn.lock') }}
- name: Save test/dummy/node_modules to cache
uses: actions/cache@v3
with:
path: test/dummy/node_modules
key: dummy-app-node-modules-cache-${{ hashFiles('test/dummy/yarn.lock') }}
- uses: ruby/setup-ruby@v1
with:
bundler: 2.4.9
ruby-version: ${{ matrix.ruby }}
- run: bundle config set --local path 'test/dummy/vendor/bundle'
- run: ./test/bin/create-fake-js-package-managers ${{ matrix.js_package_manager.installer }}
- name: Save dummy app ruby gems to cache
uses: actions/cache@v3
with:
path: test/dummy/vendor/bundle
key: dummy-app-gem-cache-${{ hashFiles(format('{0}/gemfiles/{1}.gemfile.lock', github.workspace, matrix.gemfile)) }}
- name: Install Ruby Gems for dummy app
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=test/dummy/vendor/bundle || bundle _2.4.9_ install --frozen --path=test/dummy/vendor/bundle --jobs=4 --retry=3
- run: cd test/dummy && yalc add react_ujs && ${{ matrix.js_package_manager.installer }} install
- run: bundle exec rake test
env:
NODE_OPTIONS: --openssl-legacy-provider
4 changes: 4 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ end
appraise 'shakapacker' do
gem 'shakapacker', '7.2.0'
end

appraise 'connection_pool_3' do
gem 'connection_pool', '~> 3'
end
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ _Please add entries here for your pull requests that have not yet been released.

- Support for Propshaft server rendering. [PR 1345](https://github.com/reactjs/react-rails/pull/1345) by [elektronaut](https://github.com/elektronaut)

#### Fixed

- Support `connection_pool` v3 [PR 1367](https://github.com/reactjs/react-rails/pull/1367) by [G-Rath](https://github.com/G-Rath).

## [3.2.1] - 2024-05-16

#### Fixed
Expand Down
7 changes: 7 additions & 0 deletions gemfiles/connection_pool_3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "connection_pool", "~> 3"

gemspec path: "../"
278 changes: 278 additions & 0 deletions gemfiles/connection_pool_3.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
PATH
remote: ..
specs:
react-rails (3.2.1)
babel-transpiler (>= 0.7.0)
connection_pool
execjs
railties (>= 3.2)
tilt

GEM
remote: http://rubygems.org/
specs:
actioncable (7.0.8.1)
actionpack (= 7.0.8.1)
activesupport (= 7.0.8.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8.1)
actionpack (= 7.0.8.1)
actionview (= 7.0.8.1)
activejob (= 7.0.8.1)
activesupport (= 7.0.8.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8.1)
actionview (= 7.0.8.1)
activesupport (= 7.0.8.1)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8.1)
actionpack (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8.1)
activesupport (= 7.0.8.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8.1)
activesupport (= 7.0.8.1)
globalid (>= 0.3.6)
activemodel (7.0.8.1)
activesupport (= 7.0.8.1)
activerecord (7.0.8.1)
activemodel (= 7.0.8.1)
activesupport (= 7.0.8.1)
activestorage (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
activerecord (= 7.0.8.1)
activesupport (= 7.0.8.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
appraisal (2.4.1)
bundler
rake
thor (>= 0.14.0)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
builder (3.2.4)
byebug (11.0.1)
capybara (3.37.1)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
codeclimate-test-reporter (1.0.9)
simplecov (<= 0.13)
coderay (1.1.3)
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
railties (>= 5.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.10)
connection_pool (3.0.2)
crass (1.0.6)
date (3.4.1)
docile (1.1.5)
erubi (1.9.0)
es5-shim-rails (4.0.1)
actionpack (>= 3.1)
railties (>= 3.1)
execjs (2.7.0)
ffi (1.15.5)
formatador (1.1.0)
gem-release (2.2.2)
globalid (1.2.1)
activesupport (>= 6.1)
guard (2.18.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-minitest (2.4.6)
guard-compat (~> 1.2)
minitest (>= 3.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.9.1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.4)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.17.0)
minitest-retry (0.2.2)
minitest (>= 5.0)
nenv (0.3.0)
net-imap (0.4.11)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.7.3)
nokogiri (1.18.10-x86_64-linux-gnu)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
package_json (0.1.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.8.0)
byebug (~> 11.0)
pry (~> 0.10)
public_suffix (4.0.6)
racc (1.6.2)
rack (2.2.6.4)
rack-test (2.0.2)
rack (>= 1.3)
rails (7.0.8.1)
actioncable (= 7.0.8.1)
actionmailbox (= 7.0.8.1)
actionmailer (= 7.0.8.1)
actionpack (= 7.0.8.1)
actiontext (= 7.0.8.1)
actionview (= 7.0.8.1)
activejob (= 7.0.8.1)
activemodel (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
bundler (>= 1.15.0)
railties (= 7.0.8.1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.8.1)
actionpack (= 7.0.8.1)
activesupport (= 7.0.8.1)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.6.0)
rexml (3.2.5)
rubyzip (2.3.2)
selenium-webdriver (4.9.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shellany (0.0.1)
simplecov (0.13.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
test-unit (2.5.5)
thor (1.2.1)
tilt (2.1.0)
timeout (0.4.3)
turbo-rails (2.0.5)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
websocket (1.2.9)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.6)

PLATFORMS
x86_64-linux

DEPENDENCIES
appraisal
bundler (= 2.4.9)
capybara
codeclimate-test-reporter
coffee-rails
connection_pool (~> 3)
es5-shim-rails (>= 2.0.5)
gem-release
guard
guard-minitest
jbuilder
listen (~> 3.0.0)
minitest-retry
package_json
pry-byebug
rails (~> 7.0.7, >= 7.0.7.2)
react-rails!
selenium-webdriver
test-unit (~> 2.5)
turbo-rails

BUNDLED WITH
2.4.9
2 changes: 1 addition & 1 deletion lib/react/server_rendering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module ServerRendering
# @return [void]
def self.reset_pool
options = { size: pool_size, timeout: pool_timeout }
@pool = ConnectionPool.new(options) { renderer.new(renderer_options) }
@pool = ConnectionPool.new(**options) { renderer.new(renderer_options) }
end

# Check a renderer out of the pool and use it to render the component.
Expand Down