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

Rack 3 support #1857

Merged
merged 29 commits into from
Jan 5, 2024
Merged

Rack 3 support #1857

merged 29 commits into from
Jan 5, 2024

Commits on Jan 5, 2024

  1. Configuration menu
    Copy the full SHA
    eff32e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    482b157 View commit details
    Browse the repository at this point in the history
  3. Remove Rack 2 jobs

    Probably too hard to make Sinatra work with both Rack 2 and Rack 3 in
    the same version.
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    c5f9817 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a86a32b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5efc85e View commit details
    Browse the repository at this point in the history
  6. SERVER_PROTOCOL -> HTTP_VERSION

    Similar change as jeremyevans/roda@50f0ddf
    
    Good to know is that rack-test defaults to HTTP/1.0:
    https://github.com/rack/rack-test/blob/v2.0.2/lib/rack/test.rb#L277-L285
    (so Rack::Lint does not catch all usage of HTTP_VERSION)
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    c83b7f2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0b4622f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    943cfaa View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    26aeec7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1396f08 View commit details
    Browse the repository at this point in the history
  11. sinatra-contrib tests now pass

    Multiple response header values are encoded using an Array instead of
    newlines: https://github.com/rack/rack/blob/v3.0.3/UPGRADE-GUIDE.md#multiple-response-header-values-are-encoded-using-an-array
    
    Rack 3 does not remove cookies from the internal storage (because it
    doesn't make much sense), see rack/rack#1844, rack/rack#1840
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    0a9b043 View commit details
    Browse the repository at this point in the history
  12. Fix server registration

    Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
    dentarg and ioquatix committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    44377b2 View commit details
    Browse the repository at this point in the history
  13. Update routing test handles params without a value

    The behaviour changed in Rack 3 with
    
    - rack/rack#1989
    - rack/rack@ab1f1c1
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    8e6d11c View commit details
    Browse the repository at this point in the history
  14. Restore continue-on-error

    Revert "Run tests for sinatra-contrib and rack-protection"
    
    This reverts commit 13b5b0f.
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    217c5db View commit details
    Browse the repository at this point in the history
  15. Depend on rackup and rack-session >=2.0.0

    The 2.0 series of these games are the same as the 0.x series, as these
    gems were created for Rack 3.
    The 1.x series of these games are for Rack 2.
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    a4a786a View commit details
    Browse the repository at this point in the history
  16. Rack::File -> Rack::Files again

    Rebase gone wrong.
    
    Remove the old comment from 1dfae3d.
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    8da32a4 View commit details
    Browse the repository at this point in the history
  17. Support text/javascript as JavaScript MIME type

    Next Rack release (probably 3.1) will include this change:
    
    rack/rack@1bd0f15
    sinatra#1857 (comment)
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    c129d58 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    41d6063 View commit details
    Browse the repository at this point in the history
  19. Revert "Update routing test handles params without a value"

    Rack v3.0.7 rolled back this change with
    rack/rack#2059
    
    Other references:
    
    - rails/rails#47652
    - rack/rack#2052
    - rack/rack#2038
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    5b28218 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    d3dfc19 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    4ba8664 View commit details
    Browse the repository at this point in the history
  22. Test with rack head

    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    7a514e2 View commit details
    Browse the repository at this point in the history
  23. Fix typo in spec description

    Co-authored-by: Eloy Pérez <ej.perezgomez@gmail.com>
    dentarg and epergo committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    a378414 View commit details
    Browse the repository at this point in the history
  24. Require rack 3.0.0, not 3.0.0.beta1

    No point in using the beta version anymore.
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    e721af6 View commit details
    Browse the repository at this point in the history
  25. rack-protection depends on rack-session

    The tests shows this after dcdebe9
    
    Sinatra does not (yet?)
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    7a16094 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    1e37204 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    8a78d8b View commit details
    Browse the repository at this point in the history
  28. Skip "without rackup" test on rack head branch

    Tried adding the same code the regular Gemfile has for rack head, but
    than I ran into
    
        /usr/local/bundle/gems/bundler-2.4.22/lib/bundler/source/git/git_proxy.rb:354:in
        `allowed_with_path': The git source https://github.com/rack/rack.git
        is not yet checked out. Please run `bundle install` before trying to
        start your application (Bundler::GitError)
    
    So it seems we need to bundle before trying to start the app, and that
    just feels too complicated.
    
    The thought of using bundler/inline has crossed my mind, maybe I will
    try it at some point.
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    1377751 View commit details
    Browse the repository at this point in the history
  29. Fix test_app_start_without_rackup on JVM rubies

    truffleruby and jruby uses the childprocess with
    CHILDPROCESS_POSIX_SPAWN, and when doing so, the environment variables
    aren't cocered to strings until very late:
    https://github.com/enkessler/childprocess/blob/v4.1.0/lib/childprocess/unix/posix_spawn_process.rb#L109-L130
    
    On CRuby it seems symbol environment variables will overwrite any
    existing (string) ones but that does not happen on JVM rubies (I've only
    tested with TruffleRuby though, but JRuby builds also failed in CI)
    dentarg committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    985625d View commit details
    Browse the repository at this point in the history