| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Some methods were added to public API in
5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of
the public API.
|
|
|
|
|
|
|
|
| |
Scoring routes based on constraints repeated many type conversions that
could be performed in the outer loop. Determinations of score and
fitness also used Array operations that required allocations. Against
my benchmark with a large routeset, this reduced object allocations by
over 30x and wall time by over 3x.
|
|
|
|
|
|
|
| |
[ci skip]
- change a period to a comma
- add backticks for class + method
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|
|
|
| |
minitest 6."
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This commit changes `parameter_encoding` to `skip_parameter_encoding`.
`skip_parameter_encoding` will set encoding on all parameters to
ASCII-8BIT for a given action on a particular controller. This allows
the controller to handle data when the encoding of that data is unknown,
for example file systems or truly binary parameters.
|
|\
| |
| | |
Revise the "XML is not HTML" test
|
| |
| |
| |
| |
| |
| | |
It was depending on a side-effect of the old html-scanner, so was no
longer proving what it intended to. Instead, assert more directly about
the resulting observable difference.
|
|\ \
| | |
| | | |
Only default the response charset when it is first set
|
| |/
| |
| |
| |
| | |
If it is explicitly cleared (e.g., response.sending_file = true), then
we should not try to set it again.
|
|\ \
| |/
|/| |
Do not clear HTTP_COOKIES header after request
|
| | |
|
|/ |
|
|
|
|
|
| |
When content type header is blank we were raising an exception because
`empty?` was being called on nil.
|
|
|
|
|
| |
The rest of the helpers are better placed on Session -- and this is the
only one that cares which class it is defined on.
|
| |
|
|
|
|
| |
Follow up to 79a5ea9eadb4d43b62afacedc0706cbe88c54496
|
|
|
|
|
| |
`Gem.win_platform?` check if it is Windows more accurately.
Ref: https://github.com/ruby/ruby/blob/ruby_2_2/lib/rubygems.rb#L945..L952
|
|
|
|
| |
[ci skip]
|
|\
| |
| | |
use public Module#include instead of send :include
|
| |
| |
| |
| | |
Follow up to #18767
|
| |
| |
| |
| | |
Mention the Accept header and how that figures into the request format.
|
|/
|
|
| |
Wrongly added when fixing the request path wrangling.
|
|\
| |
| |
| |
| | |
supercaracal/fix-force-ssl-if-session-store-disabled
Fix a force ssl redirection bug that occur when session store disabled.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Don't want to add defensive programming to this fairly
simple thing.
Fixes #27060.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of appending a format to the request, it's much better
to just pass a more appropriate accept header. Rails will figure
out the format from that instead.
This allows devs to use `:as` on routes that don't have a format.
Introduce an `IdentityEncoder` to avoid `if request_encoder`,
essentially a better version of the purpose of the `WWWFormEncoder`.
One that makes conceptual sense on GET requests too.
Fixes #27144.
|
|
|
|
|
| |
The test runner was updated to make use of autorun. This caused the
`bin/test` scripts to run Minitest twice.
|
| |
|
|
|
|
| |
s/Constrains/Constraints
|
|
|
|
| |
Follow up to #27098
|
|\
| |
| |
| | |
Fix incorrect output from rails routes when using singular resources …
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
#26606
Rails routes (even rake routes in previous versions) output showed incorrect routes when an application use resource :controller, implying that edit_controller_path match with controller#show.
The order of the output has changed to correct this. View #26606 for more information.
Added a test case, change unit test in rake to expect the new output.
Since the output of resource :controller is changing, the string spected of the railties/test/application/rake_test.rb test_rails_routes_with_controller_environment had to be modified.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reset a new session directly after its creation in
`ActionDispatch::IntegrationTest#open_session`. Reset the session to a clean
state before making it available to the client's test code.
Issue #22742 reports unexpected behavior of integration tests that run multiple
sessions. For example an `ActionDispatch::Flash` instance is shared across
multiple sessions, though a client code will rightfully assume that each new
session has its own flash hash.
The following test failed due to this behavior:
class Issue22742Test < ActionDispatch::IntegrationTest
test 'issue #22742' do
integration_session # initialize first session
a = open_session
b = open_session
refute_same(a.integration_session, b.integration_session)
end
end
Instead of creating a new `ActionDispatch::Integration::Session` instance,
the same instance is shared across all newly opened test sessions. This is
due to the way how new test sessions are created in
`ActionDispatch::IntegrationTest#open_session`. The already existing
`ActionDispatch::IntegrationTest` instance is duplicated with `Object#dup`,
This approach was introduced in commit 15c31c7639b. `Object#dup` copies the
instance variables, but not the objects they reference. Therefore this issue
only occurred when the current test instance had been tapped in such a way that
the instance variable `@integration_session` was initialized before creating the
new test session.
Close #22742
[Tawan Sierek + Sina Sadeghian]
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
CONENT_LENGTH setted by string length, which is equal to number of
characters in string but StringIO.length is byte sequence and
when payload contains non-ASCII characters, stream's length will be
different. That's why real byte length should be used for CONTENT_LENGTH
header.
Add unit test for CONTENT_LENGTH header fix
It just passes non-ascii symbols as parameters and verifies that
"CONTENT_LENGTH" header has content bytes count as value.
|
| |
|
| |
|
|\
| |
| |
| | |
Don't error on an empty CONTENT_TYPE
|