Class: Rack::Lint
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Exceptions:
| |
Inherits: | Object |
Defined in: | lib/rack/lint.rb |
Overview
Lint
validates your application and the requests and responses according to the ::Rack
spec.
Constant Summary
-
ALLOWED_SCHEMES =
# File 'lib/rack/lint.rb', line 14%w(https http wss ws).freeze
-
REQUEST_PATH_ABSOLUTE_FORM =
# File 'lib/rack/lint.rb', line 17/\A#{Utils::URI_PARSER.make_regexp}\z/
-
REQUEST_PATH_ASTERISK_FORM =
# File 'lib/rack/lint.rb', line 19'*'
-
REQUEST_PATH_AUTHORITY_FORM =
# File 'lib/rack/lint.rb', line 18/\A[^\/:]:\d\z/
-
REQUEST_PATH_ORIGIN_FORM =
# File 'lib/rack/lint.rb', line 16/\A\/[^#]*\z/
Class Method Summary
-
.new(app) ⇒ Lint
constructor
Internal use only
AUTHORS: n.b. The trailing whitespace between paragraphs is important and should not be removed.
Instance Method Summary
- #call(env = nil) Internal use only
Constructor Details
.new(app) ⇒ Lint
This method is for internal use only.
AUTHORS: n.b. The trailing whitespace between paragraphs is important and should not be removed. The whitespace creates paragraphs in the RDoc output.
This specification aims to formalize the ::Rack
protocol. You can (and should) use Lint
to enforce it.
When you develop middleware, be sure to add a Lint
before and after to catch all mistakes.
Rack applications
A Rack application is a Ruby object (not a class) that responds to #call.
Instance Method Details
#call(env = nil)
This method is for internal use only.
[ GitHub ]