Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix using rack v3 #188

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Fix using rack v3 #188

wants to merge 10 commits into from

Conversation

RichardVickerstaff
Copy link

@RichardVickerstaff RichardVickerstaff commented Feb 18, 2025

These changes get the Gem running locally again, with a few tune ups and one actual fix:

  • lobster is no longer part of Rack in newer versions. We can still refer to it via Rackup. Since it's only used for the specs, we can make this a dev dependency.
  • Requiring logger is important for specs. This will have been working elsewhere because logger is a fairly normal thing to include, and in a Rails-y environment it'll be zeitwerk'd.
  • GET requests to not have 'rack.input' in later versions of rack, so double check it's available before trying to rewind.

@@ -40,5 +40,6 @@ Gem::Specification.new do |spec|
spec.add_dependency "redis", "~> 4.1"
spec.add_dependency "google-protobuf", "~> 3"
spec.add_dependency "rack", ">= 2", "< 4"
spec.add_dependency "rackup", ">=2", "< 3"
Copy link
Member

Choose a reason for hiding this comment

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

This is only a dev/test dependency, so it can be moved to add_development_dependency.

@shamess
Copy link

shamess commented Mar 17, 2025

I have to admit some ignorance when working with rack, especially when it's being used inside a gem.

What's the purpose of the ruby/config.ru rackup configuration? Is this ever expected to be run by anyone? Is it just a demo (duplicating the content of the README)?

@PChambino
Copy link
Member

ruby/config.ru is only being used by that integration_spec.rb file. It is just for testing. It is not supposed to be used by any consumers of this gem. It could probably be moved into the spec directory for clarity.

@shamess shamess force-pushed the update-rack branch 3 times, most recently from 69ce4de to c2bc71d Compare March 17, 2025 16:22
@shamess shamess force-pushed the update-rack branch 3 times, most recently from 1fbed39 to 50237db Compare March 17, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants