#9 Active Storage - Webrick -> Puma

This commit is contained in:
Karel Pičman 2025-11-27 14:43:08 +01:00
parent 13b1e05c55
commit 9a4b9a5da3
2 changed files with 5 additions and 7 deletions

View File

@ -133,7 +133,6 @@ jobs:
# Install Redmine
run: |
cd /opt/redmine
echo "gem \"webrick\"" > Gemfile.local
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"

View File

@ -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