Skip to content

Update Sinatra requirements#77

Merged
serihiro merged 2 commits intomasterfrom
464ojp-codex/sinatraバージョンを4.1.0以上に移行
Jun 5, 2025

Hidden character warning

The head ref may contain hidden characters: "464ojp-codex/sinatra\u30d0\u30fc\u30b8\u30e7\u30f3\u30924.1.0\u4ee5\u4e0a\u306b\u79fb\u884c"
Merged

Update Sinatra requirements#77
serihiro merged 2 commits intomasterfrom
464ojp-codex/sinatraバージョンを4.1.0以上に移行

Conversation

@serihiro
Copy link
Owner

@serihiro serihiro commented Jun 5, 2025

What will this PR change ?

  • require Sinatra 4.1+ in the gemspec
  • disable Rack protection in tests
  • set Rack::Test default host
  • clarify setup docs

https://chatgpt.com/codex/tasks/task_e_684119e5df048329aef06c3f2ebd59a7

@serihiro serihiro requested a review from Copilot June 5, 2025 05:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Sinatra requirements and adjusts test configurations to align with the updated dependencies and desired test behaviors. Key changes include:

  • Updating the Sinatra version in the gemspec from 3.0 to 4.1
  • Disabling Rack protection and setting Rack::Test default host in test files
  • Minor documentation clarifications in the README

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
spec/spec_helper.rb Sets and resets Rack::Test::DEFAULT_HOST for tests
spec/server/worker_spec.rb Adds frozen_string_literal for improved string immutability
simple_map_reduce.gemspec Updates Sinatra and Sinatra-contrib dependency versions
lib/simple_map_reduce/server/job_worker.rb Disables Rack protection in the test environment for the job worker
lib/simple_map_reduce/server/job_tracker.rb Disables Rack protection in the test environment for the job tracker
README.md Updates setup instructions to include bundle install alongside bin/setup

configure do
use Rack::Lock
end
configure :test do
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test configuration that disables protection is duplicated in multiple files; consider abstracting this logic into a shared configuration helper to reduce redundancy.

Copilot uses AI. Check for mistakes.
# TODO: be configurable
MAX_WORKER_RESERVABLE_SIZE = 5
end
configure :test do
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test configuration block here is similar to that in job_worker; consolidating these common configurations could improve maintainability and reduce future duplication.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@serihiro serihiro marked this pull request as ready for review June 5, 2025 05:05
@serihiro serihiro merged commit e086408 into master Jun 5, 2025
1 check passed
@serihiro serihiro deleted the 464ojp-codex/sinatraバージョンを4.1.0以上に移行 branch June 5, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments