-
Notifications
You must be signed in to change notification settings - Fork 275
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
Rack 3 compatibility #682
Rack 3 compatibility #682
Conversation
(I re-discovered I have privs to authorize you to run CI, so I have done so! I would not merge without hearing from @janko , and do not have rubygems release privs!) |
Looks like failing on jruby for some reason, I haven't looked into it. |
@jrochkind yes, I was thinking about running tests on both Rack 2 & 3 would be great. Feel free to update the PR accordingly. Thanks! |
I am not sure what time I have, but thank you, you also feel free of course! |
• drop Ruby 2.3 test
@jrochkind ok this was not too difficult. – added Appraisals for Rack 2 & 3 Can you please trigger the CI run? |
@jrochkind can you please run it again, we were missing |
I thought once I approved it once, you'd be able to keep running it, but apparently not! |
@jrochkind yeah :( sorry. Once more please, I forgot to ignore the appraisal lockfiles … |
@jrochkind ok, close, only the jruby tests fail now. I have no idea how to fix those errors though … |
Feels likely unrelated to this PR, a pre-existing jruby error? What do you think? We'll need SOME kind of communication or go-ahead from @janko to proceed regardless. While I have privs to "merge" from years ago, I've never used it before, so won't without hearing from janko. (Plus I don't actually have rubygems release rights anyway). |
Well, let's try to get the jruby fixed -- we can google around a bit. And indeed, we need @janko or a new maintainer. This gem is so great and I believe theres quite a few people invested in it with their apps (as much as I am). Even if we end up just maintaining it in its current scope. |
Apologies for my lack of activity, it's been harder to find time ever since I got a kid 👶🏻 This looks pretty good. One thing I would like remove is the duplication in how header values are resolved. Maybe we can extract the conditional downcasing of headers somewhere and apply it in different places. Or do something like: headers = headers.transform_keys(&:downcase) if Rack.release > "3" Also, Appraisal is probably not necessary here, we could just run the test suite with an environment variable, and read it in the |
BTW, after this PR I should really get rid of |
Thanks @janko, nice to see you! (I still offer my help as co-maintainer, to help support minimal maintenance and compatibility PR's! I am happy to have a phone call or chat to discuss some time) It was me that recommended appraisal -- From maintaining other gems that I test with multiple versions of dependencies, in which I started out trying to just use conditionals in the Gemfile, I have found that there can be a variety of weird edge case problems that occur when doing this the "brute" way that using Appraisal resolve, and I've been very happy with appraisal. BUT your call, if you prefer doing it the other way, sorry for misdirecting you @tomasc ! |
Another approach is a folder of |
Appraisal is fairly light implementation of API on top of that to do it in a standard and transparent way (while also combining your main |
I'm confirming that I've migrated off of my mutant branch on to this one and everything seems to be working as expected. Thank you for the time and effort to resolve these issues. |
refactor to `headers = headers.transform_keys(&:downcase) if Rack.release >= "3"`
@jrochkind @janko @hms I have:
@hms thanks for testing! I run this branch on several of my apps for the 3 or so weeks, and all seems good as well. @jrochkind can you please trigger the tests? @janko if you prefer something else than the In any case, it would be great to get this merged and released soon. Thanks everyone! |
@tomasc I appreciate the update 🙏🏻 It seems that JRuby is still failing, because of mismatch between Active Record versions. I will merge this, and correct that afterwards. I will also probably replace Appraisal with environment variables. |
Thanks @janko – fantastic! I am also very happy to see you around – Shrine is such a fantastic library (and the documentation!!), it would be such a pity to lose it. |
Thank you @janko , we really appreciate it! A release soon-ish including rack 3 support would be awesome too! |
Just released Shrine 3.6.0 with Rack 3 compatibility. |
Thank you!! |
Seems like this gem just got a breath of fresh air, glad we got this issue fixed. Hopefully my PRs provided some help in any way, thanks for the release! |
Add compatibility with Rack 3 (while maintaining Rack 2 support).
.bytesize
method support onRack::Files::Iterator
(if available) to determinecontent-length
Rack::TestApp
to avoid multiple calls tobody
Rack::SERVER_PROTOCOL
env toRack::TestApp
to passRack::Lint
supersedes #660 and #661