Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rack/rack-test
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.0
Choose a base ref
...
head repository: rack/rack-test
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.0
Choose a head ref
Loading
22 changes: 0 additions & 22 deletions .github/stale.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Development

on: [push, pull_request]

permissions:
contents: read

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04 ]
ruby: [ 2.0.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, jruby-9.3 ]
gemfile: [ Gemfile, Gemfile.rack-1.x ]
exclude:
- ruby: 2.0.0
gemfile: Gemfile
- ruby: 2.1
gemfile: Gemfile
runs-on: ${{ matrix.os }}
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- run: bundle exec rake spec
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -5,5 +5,6 @@ coverage
VERSION
*.rbc
*.swp
/rack-test-*.gem
/.bundle
/.idea
31 changes: 0 additions & 31 deletions .rubocop.yml

This file was deleted.

97 changes: 0 additions & 97 deletions .rubocop_todo.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -3,4 +3,8 @@ source 'https://rubygems.org'
gemspec

# Runtime dependency
gem 'rack', '~> 2.0'
if RUBY_VERSION >= '3.1'
gem 'rack', github: 'rack/rack'
else
gem 'rack', '~> 2.0'
end
6 changes: 5 additions & 1 deletion Gemfile.rack-1.x
Original file line number Diff line number Diff line change
@@ -3,4 +3,8 @@ source 'https://rubygems.org'
gemspec

# Runtime dependency
gem 'rack', '< 2'
if RUBY_VERSION < '2.1'
gem 'rack', '< 1.4'
else
gem 'rack', '< 2'
end
83 changes: 82 additions & 1 deletion History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,84 @@
## 2.0.0 / 2022-06-24

* Breaking changes:
* Digest authentication support is now deprecated, as it relies on
digest authentication support in rack, which has been deprecated
(Jeremy Evans #294)
* `Rack::Test::Utils.build_primitive_part` no longer handles array
values (Jeremy Evans #292)
* `Rack::Test::Utils` module methods other than `build_nested_query`
and `build_multipart` are now private methods (Jeremy Evans #297)
* `Rack::MockSession` has been combined into `Rack::Test::Session`,
and remains as an alias to `Rack::Test::Session`, but to keep some
backwards compatibility, `Rack::Test::Session.new` will accept a
`Rack::Test::Session` instance and return it (Jeremy Evans #297)
* Previously protected methods in `Rack::Test::Cookie{,Jar}` are now
private methods (Jeremy Evans #297)
* `Rack::Test::Methods` no longer defines `build_rack_mock_session`,
but for backwards compatibility, `build_rack_test_session` will call
`build_rack_mock_session` if it is defined (Jeremy Evans #297)
* `Rack::Test::Methods::METHODS` is no longer defined
(Jeremy Evans #297)
* `Rack::Test::Methods#_current_session_names` has been removed
(Jeremy Evans #297)
* Headers used/accessed by rack-test are now lower case, for rack 3
compliance (Jeremy Evans #295)
* Frozen literal strings are now used internally, which may break
code that mutates static strings returned by rack-test, if any
(Jeremy Evans #304)

* Minor enhancements:
* rack-test now works with the rack main branch (what will be rack 3)
(Jeremy Evans #280 #292)
* rack-test only loads the parts of rack it uses when running on the
rack main branch (what will be rack 3) (Jeremy Evans #292)
* Development dependencies have been significantly reduced, and are
now a subset of the development dependencies of rack itself
(Jeremy Evans #292)
* Avoid creating multiple large copies of uploaded file data in
memory (Jeremy Evans #286)
* Specify HTTP/1.0 when submitting requests, to avoid responses with
Transfer-Encoding: chunked (Jeremy Evans #288)
* Support `:query_params` in rack environment for parameters that
are appended to the query string instead of used in the request
body (Jeremy Evans #150 #287)
* Reduce required ruby version to 2.0, since tests run fine on
Ruby 2.0 (Jeremy Evans #292)
* Support :multipart env key for request methods to force multipart
input (Jeremy Evans #303)
* Force multipart input for request methods if content type starts
with multipart (Jeremy Evans #303)
* Improve performance of Utils.build_multipart by using an
append-only design (Jeremy Evans #304)
* Improve performance of Utils.build_nested_query for array values
(Jeremy Evans #304)

* Bug fixes:
* The `CONTENT_TYPE` of multipart requests is now respected, if it
starts with `multipart/` (Tom Knig #238)
* Work correctly with responses that respond to `to_a` but not
`to_ary` (Sergio Faria #276)
* Raise an ArgumentError instead of a TypeError when providing a
StringIO without an original filename when creating an
UploadedFile (Nuno Correia #279)
* Allow combining both an UploadedFile and a plain string when
building a multipart upload (Mitsuhiro Shibuya #278)
* Fix the generation of filenames with spaces to use path
escaping instead of regular escaping, since path unescaping is
used to decode it (Muir Manders, Jeremy Evans #275 #284)
* Rewind tempfile used for multipart uploads before it is
submitted to the application
(Jeremy Evans, Alexander Dervish #261 #268 #286)
* Fix Rack::Test.encoding_aware_strings to be true only on rack
1.6+ (Jeremy Evans #292)
* Make Rack::Test::CookieJar#valid? return true/false
(Jeremy Evans #292)
* Cookies without a domain attribute no longer are submitted to
requests for subdomains of that domain, for RFC 6265
compliance (Jeremy Evans #292)
* Increase required rack version to 1.3, since tests fail on
rack 1.2 and below (Jeremy Evans #293)

## 1.1.0 / 2018-07-21

* Breaking changes:
@@ -8,7 +89,7 @@
* follow_direct: Include rack.session.options (Mark Edmondson #233)
* [CI] Add simplecov (fatkodima #227)

Bug fixes:
* Bug fixes:
* Follow relative locations correctly. (Samuel Williams #230)

## 1.0.0 / 2018-03-27
1 change: 1 addition & 0 deletions MIT-LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2008-2009 Bryan Helmkamp, Engine Yard Inc.
Copyright (c) 2022 Jeremy Evans

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Loading