firehoseio/firehose

View on GitHub
lib/firehose/rack/publisher.rb

Summary

Maintainability
A
1 hr
Test Coverage
B
80%

Method call has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def call(env)
        req           = env['parsed_request'] ||= ::Rack::Request.new(env)
        path          = req.path
        method        = req.request_method
        cache_control = {}
Severity: Minor
Found in lib/firehose/rack/publisher.rb - About 1 hr to fix

    Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
    Open

            if deprecated = env["HTTP_X_FIREHOSE_DEPRECATED"]
    Severity: Minor
    Found in lib/firehose/rack/publisher.rb by rubocop

    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

            if persist = env["HTTP_X_FIREHOSE_PERSIST"]
    Severity: Minor
    Found in lib/firehose/rack/publisher.rb by rubocop

    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

            if cache_control_header = env['HTTP_CACHE_CONTROL']
    Severity: Minor
    Found in lib/firehose/rack/publisher.rb by rubocop

    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

            if buffer_size = env["HTTP_X_FIREHOSE_BUFFER_SIZE"]
    Severity: Minor
    Found in lib/firehose/rack/publisher.rb by rubocop

    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

    There are no issues that match your filters.

    Category
    Status