lib/firehose/rack/publisher.rb
Method call
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def call(env)
req = env['parsed_request'] ||= ::Rack::Request.new(env)
path = req.path
method = req.request_method
cache_control = {}
Use ==
if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. Open
Open
if deprecated = env["HTTP_X_FIREHOSE_DEPRECATED"]
- Read upRead up
- Exclude checks
This cop checks for assignments in the conditions of if/while/until.
Example:
# bad
if some_var = true
do_something
end
Example:
# good
if some_var == true
do_something
end
Use ==
if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. Open
Open
if persist = env["HTTP_X_FIREHOSE_PERSIST"]
- Read upRead up
- Exclude checks
This cop checks for assignments in the conditions of if/while/until.
Example:
# bad
if some_var = true
do_something
end
Example:
# good
if some_var == true
do_something
end
Use ==
if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. Open
Open
if cache_control_header = env['HTTP_CACHE_CONTROL']
- Read upRead up
- Exclude checks
This cop checks for assignments in the conditions of if/while/until.
Example:
# bad
if some_var = true
do_something
end
Example:
# good
if some_var == true
do_something
end
Use ==
if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. Open
Open
if buffer_size = env["HTTP_X_FIREHOSE_BUFFER_SIZE"]
- Read upRead up
- Exclude checks
This cop checks for assignments in the conditions of if/while/until.
Example:
# bad
if some_var = true
do_something
end
Example:
# good
if some_var == true
do_something
end