payout/rester

View on GitHub
lib/rester/client.rb

Summary

Maintainability
A
45 mins
Test Coverage

Method _process_response has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def _process_response(start_time, verb, path, status, headers, body)
Severity: Minor
Found in lib/rester/client.rb - About 45 mins to fix

    Avoid parameter lists longer than 5 parameters. [6/5]
    Open

        def _process_response(start_time, verb, path, status, headers, body)
    Severity: Minor
    Found in lib/rester/client.rb by rubocop

    This cop checks for methods with too many parameters. The maximum number of parameters is configurable. Keyword arguments can optionally be excluded from the total count.

    Unused method argument - verb. If it's necessary, use _ or _verb as an argument name to indicate that it won't be used.
    Open

        def _process_response(start_time, verb, path, status, headers, body)
    Severity: Minor
    Found in lib/rester/client.rb by rubocop

    This cop checks for unused method arguments.

    Example:

    # bad
    
    def some_method(used, unused, _unused_but_allowed)
      puts used
    end

    Example:

    # good
    
    def some_method(used, _unused, _unused_but_allowed)
      puts used
    end

    Method Rester::Client#logger is defined at both lib/rester/client.rb:16 and lib/rester/client.rb:52.
    Open

        def logger
    Severity: Minor
    Found in lib/rester/client.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError?
    Open

        rescue Exception => e
          logger.error("Connection Error: #{e.inspect}")
          false
    Severity: Minor
    Found in lib/rester/client.rb by rubocop

    This cop checks for rescue blocks targeting the Exception class.

    Example:

    # bad
    
    begin
      do_something
    rescue Exception
      handle_exception
    end

    Example:

    # good
    
    begin
      do_something
    rescue ArgumentError
      handle_exception
    end

    There are no issues that match your filters.

    Category
    Status