| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
To improve performance and specify fields explicitly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby 3.2 will provide `Exception#detailed_message` which returns more
informative message including hints for debugging.
https://bugs.ruby-lang.org/issues/18564
The did_you_mean gem and error_highlight gem is planned to use the
method to add their hints in Ruby 3.2. So using `Exception#message` will
not include did_you_mean and error_highlight hints.
This changeset uses `Exception#detailed_message` if available to show
exceptions.
|
|
|
|
| |
... to allow automatic line wrapping for very long lines.
|
|
|
|
|
|
|
| |
Ruby 3.1's error_highlight feature prints a code snippet with a
underline. To make it readable, an exception message should be rendered
by a monospace font and in "pre" format, i.e., whitespaces are preserved
and newlines are respected.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add test:separate task to test run each test file separately.
This is to test that directly requiring a rack component will work.
With test:separate, the test helper will not require rack, and each
test file should call separate_testing with a block that uses
require_relative to only require that component being tested.
Add the appropriate relative requires to get all tests passing
when run separately.
Note that this isn't foolproof. In many cases, the tests use
Rack components that are not under test (such as lint and mock),
and both of those other other rack components, so it's possible
the tests are loading hidden dependencies. I attempted to check
each component to try to find the hidden dependencies, but it is
certainly possible I missed something.
Implements #1621.
|
|
|
|
| |
That warning is still raised on latest Ruby.
|
|
|
|
|
| |
- Use safe navigation operator
- Cleanup old "unused variable" comments and hack, this doesn't seem to warn on 2.3 onwards
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This does a better job of testing the autoloads work, and ensures
files are loaded from the current rack directory.
Some files required rack.rb, and in those cases I didn't remove
the require, just replaced it with require_relative, since the
intent is to make sure all of rack is loaded if a file under
rack is loaded.
This has the potential to break code that does:
require 'rack/content_type'
Rack::ContentType.new(app)
If the rack library itself is never required. This is because
the autoloads that rack.rb sets up would not be loaded. I'm not
sure if we want to support that, but if so we would want to keep
the requires and convert them to require_relative.
For core_ext/regexp, move the requires into the if < 2.4 block,
so that the file isn't loaded unless it is necessary.
|
|
|
|
|
|
| |
Otherwise you get an exception trying to render the exception page.
Fixes #991
|
| |
|
| |
|
|
|
|
|
|
| |
* Renamed COPYING to MIT-LICENSE since that's used by most gems.
* Updated README and add a license section instead of copyright.
* Updated author url.
* Updated copyright years.
|
| |
|
|\
| |
| |
| |
| |
| | |
* 'patch-1' of https://github.com/jkowens/rack:
Override template using #template method
Allow subclasses to override TEMPLATE constant
|
| | |
|
| | |
|
| |
| |
| |
| | |
See https://github.com/rack/rack/issues/1243 for history of this task
|
|/ |
|
|
|
|
| |
showexceptions-lazy-erb-template
|
|
If a class is named NullLogger, it’s file would be named null_logger.rb
|