Update Sinatra requirements#77
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
The test configuration that disables protection is duplicated in multiple files; consider abstracting this logic into a shared configuration helper to reduce redundancy.
| # TODO: be configurable | ||
| MAX_WORKER_RESERVABLE_SIZE = 5 | ||
| end | ||
| configure :test do |
There was a problem hiding this comment.
The test configuration block here is similar to that in job_worker; consolidating these common configurations could improve maintainability and reduce future duplication.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What will this PR change ?
https://chatgpt.com/codex/tasks/task_e_684119e5df048329aef06c3f2ebd59a7