From 9a4b9a5da35e199e071cff4a7ea71c2c16952108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Thu, 27 Nov 2025 14:43:08 +0100 Subject: [PATCH] #9 Active Storage - Webrick -> Puma --- .github/workflows/rubyonrails.yml | 11 +++++------ lib/redmine_dmsf/webdav/dmsf_resource.rb | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index f29600d4..0571c2cd 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -132,8 +132,7 @@ jobs: - name: Install Redmine # Install Redmine run: | - cd /opt/redmine - echo "gem \"webrick\"" > Gemfile.local + cd /opt/redmine bundle config set --local without 'development' bundle install bundle exec rake generate_secret_token @@ -165,17 +164,17 @@ jobs: bundle exec rubocop -c plugins/redmine_dmsf/.rubocop.yml plugins/redmine_dmsf/ - name: Litmus Prepare Redmine's environment for WebDAV testing - Run Webrick server + Run Puma server Run Litmus tests (Omit 'http' tests due to 'timeout waiting for interim response' and locks due to complex bogus conditional) - Shutdown Webrick + Shutdown Puma Clean up Redmine's environment from WebDAV testing run: | cd /opt/redmine bundle exec rake redmine:dmsf_webdav_test_on - bundle exec rails server -u webrick -e test -d + bundle exec rails server -u Puma -e test -d sleep 5 litmus http://localhost:3000/dmsf/webdav/dmsf_test_project admin admin - kill $(pgrep -f webrick) + kill $(pgrep -f puma) bundle exec rake redmine:dmsf_webdav_test_off env: TESTS: "basic copymove props" diff --git a/lib/redmine_dmsf/webdav/dmsf_resource.rb b/lib/redmine_dmsf/webdav/dmsf_resource.rb index 4cd723b5..39ca604a 100644 --- a/lib/redmine_dmsf/webdav/dmsf_resource.rb +++ b/lib/redmine_dmsf/webdav/dmsf_resource.rb @@ -633,7 +633,6 @@ module RedmineDmsf if request.body.respond_to?(:rewind) new_revision.copy_file_content request.body else # A workaround for Webrick that doesn't support rewind - Rails.logger.info ">>> A workaround for Webrick that doesn't support rewind" stream = StringIO.new while (buffer = request.body.read(8_192)) stream.write buffer