inertia186/radiator

View on GitHub
lib/radiator/api.rb

Summary

Maintainability
F
1 wk
Test Coverage

Class has too many lines. [658/100]
Open

  class Api
    include Utils
    
    DEFAULT_STEEM_URL = 'https://api.steemit.com'
    
Severity: Minor
Found in lib/radiator/api.rb by rubocop

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for method_missing is too high. [160.8/15]
Open

    def method_missing(m, *args, &block)
      super unless respond_to_missing?(m)
      
      current_rpc_id = rpc_id
      method_name = [api_name, m].join('.')
Severity: Minor
Found in lib/radiator/api.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method has too many lines. [149/10]
Open

    def method_missing(m, *args, &block)
      super unless respond_to_missing?(m)
      
      current_rpc_id = rpc_id
      method_name = [api_name, m].join('.')
Severity: Minor
Found in lib/radiator/api.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method method_missing has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
Open

    def method_missing(m, *args, &block)
      super unless respond_to_missing?(m)
      
      current_rpc_id = rpc_id
      method_name = [api_name, m].join('.')
Severity: Minor
Found in lib/radiator/api.rb - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File api.rb has 669 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'uri'
require 'base64'
require 'hashie'
require 'hashie/logger'
require 'openssl'
Severity: Major
Found in lib/radiator/api.rb - About 1 day to fix

    Method has too many lines. [68/10]
    Open

        def initialize(options = {})
          @user = options[:user]
          @password = options[:password]
          @chain = (options[:chain] || 'hive').to_sym
          @url = options[:url] || Api::default_url(@chain)
    Severity: Minor
    Found in lib/radiator/api.rb by rubocop

    This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

    Block has too many lines. [121/25]
    Open

          loop do
            tries += 1
            
            if tries > 5 && flappy? && !check_file_open?
              raise ApiError, 'PANIC: Out of file resources'
    Severity: Minor
    Found in lib/radiator/api.rb by rubocop

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

    Assignment Branch Condition size for initialize is too high. [63.8/15]
    Open

        def initialize(options = {})
          @user = options[:user]
          @password = options[:password]
          @chain = (options[:chain] || 'hive').to_sym
          @url = options[:url] || Api::default_url(@chain)
    Severity: Minor
    Found in lib/radiator/api.rb by rubocop

    This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

    Perceived complexity for method_missing is too high. [48/7]
    Open

        def method_missing(m, *args, &block)
          super unless respond_to_missing?(m)
          
          current_rpc_id = rpc_id
          method_name = [api_name, m].join('.')
    Severity: Minor
    Found in lib/radiator/api.rb by rubocop

    This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method. For that reason it considers when nodes as something that doesn't add as much complexity as an if or a &&. Except if it's one of those special case/when constructs where there's no expression after case. Then the cop treats it as an if/elsif/elsif... and lets all the when nodes count. In contrast to the CyclomaticComplexity cop, this cop considers else nodes as adding complexity.

    Example:

    def my_method                   # 1
      if cond                       # 1
        case var                    # 2 (0.8 + 4 * 0.2, rounded)
        when 1 then func_one
        when 2 then func_two
        when 3 then func_three
        when 4..10 then func_other
        end
      else                          # 1
        do_something until a && b   # 2
      end                           # ===
    end                             # 7 complexity points

    Cyclomatic complexity for method_missing is too high. [43/6]
    Open

        def method_missing(m, *args, &block)
          super unless respond_to_missing?(m)
          
          current_rpc_id = rpc_id
          method_name = [api_name, m].join('.')
    Severity: Minor
    Found in lib/radiator/api.rb by rubocop

    This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

    An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

    Method method_missing has 149 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def method_missing(m, *args, &block)
          super unless respond_to_missing?(m)
          
          current_rpc_id = rpc_id
          method_name = [api_name, m].join('.')
    Severity: Major
    Found in lib/radiator/api.rb - About 5 hrs to fix

      Assignment Branch Condition size for handle_error is too high. [50.72/15]
      Open

          def handle_error(response, request_options, method_name, tries)
            parser = ErrorParser.new(response)
            _signatures, exp = extract_signatures(request_options)
            
            if (!!exp && exp < Time.now.utc) || (tries > 2 && !parser.node_degraded?)
      Severity: Minor
      Found in lib/radiator/api.rb by rubocop

      This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

      Class Api has 40 methods (exceeds 20 allowed). Consider refactoring.
      Open

        class Api
          include Utils
          
          DEFAULT_STEEM_URL = 'https://api.steemit.com'
          
      Severity: Minor
      Found in lib/radiator/api.rb - About 5 hrs to fix

        Method has too many lines. [40/10]
        Open

            def handle_error(response, request_options, method_name, tries)
              parser = ErrorParser.new(response)
              _signatures, exp = extract_signatures(request_options)
              
              if (!!exp && exp < Time.now.utc) || (tries > 2 && !parser.node_degraded?)
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

        Method has too many lines. [38/10]
        Open

            def recover_transaction(signatures, expected_rpc_id, after)
              debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
              
              count = 0
              start = Time.now.utc
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

        Assignment Branch Condition size for recover_transaction is too high. [38.55/15]
        Open

            def recover_transaction(signatures, expected_rpc_id, after)
              debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
              
              count = 0
              start = Time.now.utc
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

        Method has too many lines. [32/10]
        Open

            def self.default_failover_urls(chain)
              case chain.to_sym
              when :steem, :hive
                begin
                  _api = Radiator::Api.new(url: DEFAULT_HIVE_FAILOVER_URLS.sample, failover_urls: DEFAULT_HIVE_FAILOVER_URLS)
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

        Assignment Branch Condition size for healthy? is too high. [36.62/15]
        Open

            def healthy?(url)
              begin
                # Note, not all nodes support the /health uri.  But even if they don't,
                # they'll respond status code 200 OK, even if the body shows an error.
                
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

        Method shutdown has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
        Open

            def shutdown
              @uri = nil
              @http_id = nil
              @http_memo.each do |k|
                v = @http_memo.delete(k)
        Severity: Minor
        Found in lib/radiator/api.rb - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method has too many lines. [27/10]
        Open

            def shutdown
              @uri = nil
              @http_id = nil
              @http_memo.each do |k|
                v = @http_memo.delete(k)
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

        Method has too many lines. [27/10]
        Open

            def healthy?(url)
              begin
                # Note, not all nodes support the /health uri.  But even if they don't,
                # they'll respond status code 200 OK, even if the body shows an error.
                
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

        Method handle_error has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
        Open

            def handle_error(response, request_options, method_name, tries)
              parser = ErrorParser.new(response)
              _signatures, exp = extract_signatures(request_options)
              
              if (!!exp && exp < Time.now.utc) || (tries > 2 && !parser.node_degraded?)
        Severity: Minor
        Found in lib/radiator/api.rb - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Perceived complexity for initialize is too high. [22/7]
        Open

            def initialize(options = {})
              @user = options[:user]
              @password = options[:password]
              @chain = (options[:chain] || 'hive').to_sym
              @url = options[:url] || Api::default_url(@chain)
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method. For that reason it considers when nodes as something that doesn't add as much complexity as an if or a &&. Except if it's one of those special case/when constructs where there's no expression after case. Then the cop treats it as an if/elsif/elsif... and lets all the when nodes count. In contrast to the CyclomaticComplexity cop, this cop considers else nodes as adding complexity.

        Example:

        def my_method                   # 1
          if cond                       # 1
            case var                    # 2 (0.8 + 4 * 0.2, rounded)
            when 1 then func_one
            when 2 then func_two
            when 3 then func_three
            when 4..10 then func_other
            end
          else                          # 1
            do_something until a && b   # 2
          end                           # ===
        end                             # 7 complexity points

        Assignment Branch Condition size for shutdown is too high. [29.58/15]
        Open

            def shutdown
              @uri = nil
              @http_id = nil
              @http_memo.each do |k|
                v = @http_memo.delete(k)
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

        Assignment Branch Condition size for default_failover_urls is too high. [28.37/15]
        Open

            def self.default_failover_urls(chain)
              case chain.to_sym
              when :steem, :hive
                begin
                  _api = Radiator::Api.new(url: DEFAULT_HIVE_FAILOVER_URLS.sample, failover_urls: DEFAULT_HIVE_FAILOVER_URLS)
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

        Assignment Branch Condition size for http is too high. [27.59/15]
        Open

            def http
              return @http_memo[http_id] if @http_memo.keys.include? http_id
              
              @http_memo[http_id] = if @persist && @persist_error_count < 10
                idempotent = api_name != :network_broadcast_api
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

        Method default_failover_urls has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
        Open

            def self.default_failover_urls(chain)
              case chain.to_sym
              when :steem, :hive
                begin
                  _api = Radiator::Api.new(url: DEFAULT_HIVE_FAILOVER_URLS.sample, failover_urls: DEFAULT_HIVE_FAILOVER_URLS)
        Severity: Minor
        Found in lib/radiator/api.rb - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Cyclomatic complexity for shutdown is too high. [16/6]
        Open

            def shutdown
              @uri = nil
              @http_id = nil
              @http_memo.each do |k|
                v = @http_memo.delete(k)
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

        An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

        Method has too many lines. [20/10]
        Open

            def http
              return @http_memo[http_id] if @http_memo.keys.include? http_id
              
              @http_memo[http_id] = if @persist && @persist_error_count < 10
                idempotent = api_name != :network_broadcast_api
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

        Cyclomatic complexity for initialize is too high. [16/6]
        Open

            def initialize(options = {})
              @user = options[:user]
              @password = options[:password]
              @chain = (options[:chain] || 'hive').to_sym
              @url = options[:url] || Api::default_url(@chain)
        Severity: Minor
        Found in lib/radiator/api.rb by rubocop

        This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

        An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

        Method initialize has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def initialize(options = {})
              @user = options[:user]
              @password = options[:password]
              @chain = (options[:chain] || 'hive').to_sym
              @url = options[:url] || Api::default_url(@chain)
        Severity: Major
        Found in lib/radiator/api.rb - About 2 hrs to fix

          Perceived complexity for shutdown is too high. [16/7]
          Open

              def shutdown
                @uri = nil
                @http_id = nil
                @http_memo.each do |k|
                  v = @http_memo.delete(k)
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method. For that reason it considers when nodes as something that doesn't add as much complexity as an if or a &&. Except if it's one of those special case/when constructs where there's no expression after case. Then the cop treats it as an if/elsif/elsif... and lets all the when nodes count. In contrast to the CyclomaticComplexity cop, this cop considers else nodes as adding complexity.

          Example:

          def my_method                   # 1
            if cond                       # 1
              case var                    # 2 (0.8 + 4 * 0.2, rounded)
              when 1 then func_one
              when 2 then func_two
              when 3 then func_three
              when 4..10 then func_other
              end
            else                          # 1
              do_something until a && b   # 2
            end                           # ===
          end                             # 7 complexity points

          Perceived complexity for handle_error is too high. [16/7]
          Open

              def handle_error(response, request_options, method_name, tries)
                parser = ErrorParser.new(response)
                _signatures, exp = extract_signatures(request_options)
                
                if (!!exp && exp < Time.now.utc) || (tries > 2 && !parser.node_degraded?)
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method. For that reason it considers when nodes as something that doesn't add as much complexity as an if or a &&. Except if it's one of those special case/when constructs where there's no expression after case. Then the cop treats it as an if/elsif/elsif... and lets all the when nodes count. In contrast to the CyclomaticComplexity cop, this cop considers else nodes as adding complexity.

          Example:

          def my_method                   # 1
            if cond                       # 1
              case var                    # 2 (0.8 + 4 * 0.2, rounded)
              when 1 then func_one
              when 2 then func_two
              when 3 then func_three
              when 4..10 then func_other
              end
            else                          # 1
              do_something until a && b   # 2
            end                           # ===
          end                             # 7 complexity points

          Method has too many lines. [18/10]
          Open

              def get_blocks(block_number, &block)
                block_number = [*(block_number)].flatten
                
                if !!block
                  block_number.each do |i|
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

          Cyclomatic complexity for handle_error is too high. [14/6]
          Open

              def handle_error(response, request_options, method_name, tries)
                parser = ErrorParser.new(response)
                _signatures, exp = extract_signatures(request_options)
                
                if (!!exp && exp < Time.now.utc) || (tries > 2 && !parser.node_degraded?)
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Cyclomatic complexity for default_failover_urls is too high. [13/6]
          Open

              def self.default_failover_urls(chain)
                case chain.to_sym
                when :steem, :hive
                  begin
                    _api = Radiator::Api.new(url: DEFAULT_HIVE_FAILOVER_URLS.sample, failover_urls: DEFAULT_HIVE_FAILOVER_URLS)
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Perceived complexity for default_failover_urls is too high. [14/7]
          Open

              def self.default_failover_urls(chain)
                case chain.to_sym
                when :steem, :hive
                  begin
                    _api = Radiator::Api.new(url: DEFAULT_HIVE_FAILOVER_URLS.sample, failover_urls: DEFAULT_HIVE_FAILOVER_URLS)
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method. For that reason it considers when nodes as something that doesn't add as much complexity as an if or a &&. Except if it's one of those special case/when constructs where there's no expression after case. Then the cop treats it as an if/elsif/elsif... and lets all the when nodes count. In contrast to the CyclomaticComplexity cop, this cop considers else nodes as adding complexity.

          Example:

          def my_method                   # 1
            if cond                       # 1
              case var                    # 2 (0.8 + 4 * 0.2, rounded)
              when 1 then func_one
              when 2 then func_two
              when 3 then func_three
              when 4..10 then func_other
              end
            else                          # 1
              do_something until a && b   # 2
            end                           # ===
          end                             # 7 complexity points

          Method initialize has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

              def initialize(options = {})
                @user = options[:user]
                @password = options[:password]
                @chain = (options[:chain] || 'hive').to_sym
                @url = options[:url] || Api::default_url(@chain)
          Severity: Minor
          Found in lib/radiator/api.rb - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Method recover_transaction has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

              def recover_transaction(signatures, expected_rpc_id, after)
                debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
                
                count = 0
                start = Time.now.utc
          Severity: Minor
          Found in lib/radiator/api.rb - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Assignment Branch Condition size for backoff is too high. [18.33/15]
          Open

              def backoff
                shutdown
                bump_failover if flappy? || !healthy?(uri)
                @backoff_at ||= Time.now.utc
                @backoff_sleep ||= 0.01
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

          Method has too many lines. [12/10]
          Open

              def stopped?
                http_active = if @http_memo.nil?
                  false
                else
                  @http_memo.values.map do |http|
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

          Perceived complexity for http is too high. [9/7]
          Open

              def http
                return @http_memo[http_id] if @http_memo.keys.include? http_id
                
                @http_memo[http_id] = if @persist && @persist_error_count < 10
                  idempotent = api_name != :network_broadcast_api
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method. For that reason it considers when nodes as something that doesn't add as much complexity as an if or a &&. Except if it's one of those special case/when constructs where there's no expression after case. Then the cop treats it as an if/elsif/elsif... and lets all the when nodes count. In contrast to the CyclomaticComplexity cop, this cop considers else nodes as adding complexity.

          Example:

          def my_method                   # 1
            if cond                       # 1
              case var                    # 2 (0.8 + 4 * 0.2, rounded)
              when 1 then func_one
              when 2 then func_two
              when 3 then func_three
              when 4..10 then func_other
              end
            else                          # 1
              do_something until a && b   # 2
            end                           # ===
          end                             # 7 complexity points

          Method has too many lines. [12/10]
          Open

              def backoff
                shutdown
                bump_failover if flappy? || !healthy?(uri)
                @backoff_at ||= Time.now.utc
                @backoff_sleep ||= 0.01
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

          Perceived complexity for stopped? is too high. [9/7]
          Open

              def stopped?
                http_active = if @http_memo.nil?
                  false
                else
                  @http_memo.values.map do |http|
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method. For that reason it considers when nodes as something that doesn't add as much complexity as an if or a &&. Except if it's one of those special case/when constructs where there's no expression after case. Then the cop treats it as an if/elsif/elsif... and lets all the when nodes count. In contrast to the CyclomaticComplexity cop, this cop considers else nodes as adding complexity.

          Example:

          def my_method                   # 1
            if cond                       # 1
              case var                    # 2 (0.8 + 4 * 0.2, rounded)
              when 1 then func_one
              when 2 then func_two
              when 3 then func_three
              when 4..10 then func_other
              end
            else                          # 1
              do_something until a && b   # 2
            end                           # ===
          end                             # 7 complexity points

          Perceived complexity for healthy? is too high. [9/7]
          Open

              def healthy?(url)
                begin
                  # Note, not all nodes support the /health uri.  But even if they don't,
                  # they'll respond status code 200 OK, even if the body shows an error.
                  
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method. For that reason it considers when nodes as something that doesn't add as much complexity as an if or a &&. Except if it's one of those special case/when constructs where there's no expression after case. Then the cop treats it as an if/elsif/elsif... and lets all the when nodes count. In contrast to the CyclomaticComplexity cop, this cop considers else nodes as adding complexity.

          Example:

          def my_method                   # 1
            if cond                       # 1
              case var                    # 2 (0.8 + 4 * 0.2, rounded)
              when 1 then func_one
              when 2 then func_two
              when 3 then func_three
              when 4..10 then func_other
              end
            else                          # 1
              do_something until a && b   # 2
            end                           # ===
          end                             # 7 complexity points

          Assignment Branch Condition size for get_blocks is too high. [17.29/15]
          Open

              def get_blocks(block_number, &block)
                block_number = [*(block_number)].flatten
                
                if !!block
                  block_number.each do |i|
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

          Cyclomatic complexity for healthy? is too high. [7/6]
          Open

              def healthy?(url)
                begin
                  # Note, not all nodes support the /health uri.  But even if they don't,
                  # they'll respond status code 200 OK, even if the body shows an error.
                  
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Cyclomatic complexity for http is too high. [7/6]
          Open

              def http
                return @http_memo[http_id] if @http_memo.keys.include? http_id
                
                @http_memo[http_id] = if @persist && @persist_error_count < 10
                  idempotent = api_name != :network_broadcast_api
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Cyclomatic complexity for finalize is too high. [7/6]
          Open

              def self.finalize(logger, hashie_logger)
                proc {
                  if !!logger && defined?(logger.close) && !logger.closed?
                    logger.close
                  end
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Cyclomatic complexity for stopped? is too high. [7/6]
          Open

              def stopped?
                http_active = if @http_memo.nil?
                  false
                else
                  @http_memo.values.map do |http|
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Cyclomatic complexity for recover_transaction is too high. [7/6]
          Open

              def recover_transaction(signatures, expected_rpc_id, after)
                debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
                
                count = 0
                start = Time.now.utc
          Severity: Minor
          Found in lib/radiator/api.rb by rubocop

          This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

          An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

          Method handle_error has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def handle_error(response, request_options, method_name, tries)
                parser = ErrorParser.new(response)
                _signatures, exp = extract_signatures(request_options)
                
                if (!!exp && exp < Time.now.utc) || (tries > 2 && !parser.node_degraded?)
          Severity: Minor
          Found in lib/radiator/api.rb - About 1 hr to fix

            Method recover_transaction has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def recover_transaction(signatures, expected_rpc_id, after)
                  debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
                  
                  count = 0
                  start = Time.now.utc
            Severity: Minor
            Found in lib/radiator/api.rb - About 1 hr to fix

              Method http has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
              Open

                  def http
                    return @http_memo[http_id] if @http_memo.keys.include? http_id
                    
                    @http_memo[http_id] = if @persist && @persist_error_count < 10
                      idempotent = api_name != :network_broadcast_api
              Severity: Minor
              Found in lib/radiator/api.rb - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Method default_failover_urls has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def self.default_failover_urls(chain)
                    case chain.to_sym
                    when :steem, :hive
                      begin
                        _api = Radiator::Api.new(url: DEFAULT_HIVE_FAILOVER_URLS.sample, failover_urls: DEFAULT_HIVE_FAILOVER_URLS)
              Severity: Minor
              Found in lib/radiator/api.rb - About 1 hr to fix

                Method healthy? has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    def healthy?(url)
                      begin
                        # Note, not all nodes support the /health uri.  But even if they don't,
                        # they'll respond status code 200 OK, even if the body shows an error.
                        
                Severity: Minor
                Found in lib/radiator/api.rb - About 1 hr to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method get_blocks has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                    def get_blocks(block_number, &block)
                      block_number = [*(block_number)].flatten
                      
                      if !!block
                        block_number.each do |i|
                Severity: Minor
                Found in lib/radiator/api.rb - About 1 hr to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method healthy? has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def healthy?(url)
                      begin
                        # Note, not all nodes support the /health uri.  But even if they don't,
                        # they'll respond status code 200 OK, even if the body shows an error.
                        
                Severity: Minor
                Found in lib/radiator/api.rb - About 1 hr to fix

                  Method shutdown has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def shutdown
                        @uri = nil
                        @http_id = nil
                        @http_memo.each do |k|
                          v = @http_memo.delete(k)
                  Severity: Minor
                  Found in lib/radiator/api.rb - About 1 hr to fix

                    Avoid deeply nested control flow statements.
                    Open

                                      if !!response['id']
                                        warning "Unexpected rpc_id (expected: #{options[:id]}, got: #{response['id']}), retrying ...", method_name, true
                                      else
                                        # The node has broken the jsonrpc spec.
                                        warning "Node did not provide jsonrpc id (expected: #{options[:id]}, got: nothing), retrying ...", method_name, true
                    Severity: Major
                    Found in lib/radiator/api.rb - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                        debug_payload(options, body) if ENV['DEBUG'] == 'true'
                      Severity: Major
                      Found in lib/radiator/api.rb - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                        elsif response.keys.include?('error')
                                          handle_error(response, options, method_name, tries)
                                        else
                                          Hashie::Mash.new(response)
                        Severity: Major
                        Found in lib/radiator/api.rb - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                            if response.keys.include?('error')
                                              handle_error(response, options, method_name, tries)
                                            end
                          Severity: Major
                          Found in lib/radiator/api.rb - About 45 mins to fix

                            Method stopped? has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def stopped?
                                  http_active = if @http_memo.nil?
                                    false
                                  else
                                    @http_memo.values.map do |http|
                            Severity: Minor
                            Found in lib/radiator/api.rb - About 35 mins to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Avoid too many return statements within this method.
                            Open

                                            return yield(response.result.values.first, response.error, response.id)
                            Severity: Major
                            Found in lib/radiator/api.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                          return response
                              Severity: Major
                              Found in lib/radiator/api.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                return yield(response.result, response.error, response.id)
                                Severity: Major
                                Found in lib/radiator/api.rb - About 30 mins to fix

                                  Method network_api has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def self.network_api(chain, api_name, options = {})
                                        api = case chain.to_sym
                                        when :steem then Steem::Api.clone(freeze: false) rescue Api.clone
                                        when :hive then Hive::Api.clone(freeze: false) rescue Api.clone
                                        else; raise ApiError, "Unsupported chain: #{chain}"
                                  Severity: Minor
                                  Found in lib/radiator/api.rb - About 25 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Method backoff has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def backoff
                                        shutdown
                                        bump_failover if flappy? || !healthy?(uri)
                                        @backoff_at ||= Time.now.utc
                                        @backoff_sleep ||= 0.01
                                  Severity: Minor
                                  Found in lib/radiator/api.rb - About 25 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Block has too many lines. [26/25]
                                  Open

                                        api.get_blocks(block_range) do |block, block_num|
                                          unless defined? block.transaction_ids
                                            error "Blockchain does not provide transaction ids in blocks, giving up."
                                            return nil
                                          end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

                                  Avoid more than 3 levels of block nesting.
                                  Open

                                              @logger.close unless @logger.closed?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for excessive nesting of conditional and looping constructs.

                                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                                  The maximum level of nesting allowed is configurable.

                                  Avoid more than 3 levels of block nesting.
                                  Open

                                                if defined?(response.result.size) && response.result.size == 0
                                                  return yield(nil, response.error, response.id)
                                                elsif (
                                                  defined?(response.result.size) && response.result.size == 1 &&
                                                  defined?(response.result.values)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for excessive nesting of conditional and looping constructs.

                                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                                  The maximum level of nesting allowed is configurable.

                                  Avoid more than 3 levels of block nesting.
                                  Open

                                                  if response['id'] != options[:id]
                                                    debug_payload(options, body) if ENV['DEBUG'] == 'true'
                                                    
                                                    if !!response['id']
                                                      warning "Unexpected rpc_id (expected: #{options[:id]}, got: #{response['id']}), retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for excessive nesting of conditional and looping constructs.

                                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                                  The maximum level of nesting allowed is configurable.

                                  Avoid more than 3 levels of block nesting.
                                  Open

                                              @hashie_logger.close unless @hashie_logger.closed?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for excessive nesting of conditional and looping constructs.

                                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                                  The maximum level of nesting allowed is configurable.

                                  Avoid more than 3 levels of block nesting.
                                  Open

                                                  if !!tx
                                                    response[:result][:block_num] = tx.block_num
                                                    response[:result][:trx_num] = tx.transaction_num
                                                  end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for excessive nesting of conditional and looping constructs.

                                  You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

                                  The maximum level of nesting allowed is configurable.

                                  TODO found
                                  Open

                                          # TODO Some blockchains (like Golos) do not have transaction_ids.  In
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by fixme

                                  Use 2 (not -8) spaces for indentation.
                                  Open

                                          {
                                            jsonrpc: "2.0",
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 319, 6 is not aligned with if at 315, 33.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Useless assignment to variable - e.
                                  Open

                                          rescue Errno::EADDRNOTAVAIL => e
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

                                  assigned but unused variable - foo

                                  Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

                                  Example:

                                  # bad
                                  
                                  def some_method
                                    some_var = 1
                                    do_something
                                  end

                                  Example:

                                  # good
                                  
                                  def some_method
                                    some_var = 1
                                    do_something(some_var)
                                  end

                                  Useless assignment to variable - e.
                                  Open

                                          rescue Net::ReadTimeout => e
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

                                  assigned but unused variable - foo

                                  Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

                                  Example:

                                  # bad
                                  
                                  def some_method
                                    some_var = 1
                                    do_something
                                  end

                                  Example:

                                  # good
                                  
                                  def some_method
                                    some_var = 1
                                    do_something(some_var)
                                  end

                                  Line is too long. [146/80]
                                  Open

                                      # @option options [Integer] :max_requests Maximum number of requests on a connection before it is considered expired and automatically closed.
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [82/80]
                                  Open

                                        @use_condenser_namespace = if options.keys.include? :use_condenser_namespace
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [87/80]
                                  Open

                                                  return yield(response.result.values.first, response.error, response.id)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [83/80]
                                  Open

                                            error "Blockchain does not provide transaction ids in blocks, giving up."
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [118/80]
                                  Open

                                          debug "Error code #{parser} but transaction already expired or too many tries, giving up (attempt: #{tries})."
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Do not place comments on the same line as the end keyword.
                                  Open

                                        end # loop
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for comments put on the same line as some keywords. These keywords are: begin, class, def, end, module.

                                  Note that some comments (such as :nodoc: and rubocop:disable) are allowed.

                                  Example:

                                  # bad
                                  if condition
                                    statement
                                  end # end if
                                  
                                  # bad
                                  class X # comment
                                    statement
                                  end
                                  
                                  # bad
                                  def x; end # comment
                                  
                                  # good
                                  if condition
                                    statement
                                  end
                                  
                                  # good
                                  class X # :nodoc:
                                    y
                                  end

                                  Move http out of the conditional.
                                  Open

                                          http
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for identical lines at the beginning or end of each branch of a conditional statement.

                                  Example:

                                  # bad
                                  if condition
                                    do_x
                                    do_z
                                  else
                                    do_y
                                    do_z
                                  end
                                  
                                  # good
                                  if condition
                                    do_x
                                  else
                                    do_y
                                  end
                                  do_z
                                  
                                  # bad
                                  if condition
                                    do_z
                                    do_x
                                  else
                                    do_z
                                    do_y
                                  end
                                  
                                  # good
                                  do_z
                                  if condition
                                    do_x
                                  else
                                    do_y
                                  end
                                  
                                  # bad
                                  case foo
                                  when 1
                                    do_x
                                  when 2
                                    do_x
                                  else
                                    do_x
                                  end
                                  
                                  # good
                                  case foo
                                  when 1
                                    do_x
                                    do_y
                                  when 2
                                    # nothing
                                  else
                                    do_x
                                    do_z
                                  end

                                  Freeze mutable objects assigned to constants.
                                  Open

                                      DEFAULT_HIVE_FAILOVER_URLS = [
                                        DEFAULT_HIVE_URL,
                                        'https://anyx.io',
                                        #'https://api.hivekings.com',
                                        'https://api.hive.blog',
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

                                  Example:

                                  # bad
                                  CONST = [1, 2, 3]
                                  
                                  # good
                                  CONST = [1, 2, 3].freeze

                                  Freeze mutable objects assigned to constants.
                                  Open

                                      DEFAULT_HIVE_RESTFUL_URL = 'https://anyx.io/v1'
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

                                  Example:

                                  # bad
                                  CONST = [1, 2, 3]
                                  
                                  # good
                                  CONST = [1, 2, 3].freeze

                                  Freeze mutable objects assigned to constants.
                                  Open

                                      HEALTH_URI = '/health'
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

                                  Example:

                                  # bad
                                  CONST = [1, 2, 3]
                                  
                                  # good
                                  CONST = [1, 2, 3].freeze

                                  Don't use parentheses around the condition of an elsif.
                                  Open

                                                elsif (
                                                  defined?(response.result.size) && response.result.size == 1 &&
                                                  defined?(response.result.values)
                                                )
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for the presence of superfluous parentheses around the condition of if/unless/while/until.

                                  Example:

                                  # bad
                                  x += 1 while (x < 10)
                                  foo unless (bar || baz)
                                  
                                  if (x > 10)
                                  elsif (x < 3)
                                  end
                                  
                                  # good
                                  x += 1 while x < 10
                                  foo unless bar || baz
                                  
                                  if x > 10
                                  elsif x < 3
                                  end

                                  Don't use parentheses around a variable.
                                  Open

                                        block_number = [*(block_number)].flatten
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for redundant parentheses.

                                  Example:

                                  # bad
                                  (x) if ((y.z).nil?)
                                  
                                  # good
                                  x if y.z.nil?

                                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                                  Open

                                            jsonrpc: "2.0",
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks if uses of quotes match the configured preference.

                                  Example: EnforcedStyle: single_quotes (default)

                                  # bad
                                  "No special symbols"
                                  "No string interpolation"
                                  "Just text"
                                  
                                  # good
                                  'No special symbols'
                                  'No string interpolation'
                                  'Just text'
                                  "Wait! What's #{this}!"

                                  Example: EnforcedStyle: double_quotes

                                  # bad
                                  'Just some text'
                                  'No special chars or interpolation'
                                  
                                  # good
                                  "Just some text"
                                  "No special chars or interpolation"
                                  "Every string in #{project} uses double_quotes"

                                  Indent access modifiers like private.
                                  Open

                                    private
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Modifiers should be indented as deep as method definitions, or as deep as the class/module keyword, depending on configuration.

                                  Example: EnforcedStyle: indent (default)

                                  # bad
                                  class Plumbus
                                  private
                                    def smooth; end
                                  end
                                  
                                  # good
                                  class Plumbus
                                    private
                                    def smooth; end
                                  end

                                  Example: EnforcedStyle: outdent

                                  # bad
                                  class Plumbus
                                    private
                                    def smooth; end
                                  end
                                  
                                  # good
                                  class Plumbus
                                  private
                                    def smooth; end
                                  end

                                  Use 2 (not -15) spaces for indentation.
                                  Open

                                          @self_hashie_logger = true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Missing space after #.
                                  Open

                                        #'https://api.hivekings.com',
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

                                  Example:

                                  # bad
                                  #Some comment
                                  
                                  # good
                                  # Some comment

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                              
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 703, 8 is not aligned with if at 698, 15.
                                  Open

                                          end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

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

                                      def respond_to_missing?(m, include_private = false)
                                  Severity: Minor
                                  Found in lib/radiator/api.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

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [82/80]
                                  Open

                                      # @param options [::Hash] The attributes to initialize the Radiator::Api with.
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [81/80]
                                  Open

                                      # @option options [Integer] :pool_size Maximum number of connections allowed.
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [94/80]
                                  Open

                                                when '502' then warning 'Code 502: Bad Gateway, retrying ...', method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [89/80]
                                  Open

                                            warning "Connection Pool Error (#{e.message}), retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid the use of double negation (!!).
                                  Open

                                            if !!block
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Freeze mutable objects assigned to constants.
                                  Open

                                      DEFAULT_STEEM_URL = 'https://api.steemit.com'
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

                                  Example:

                                  # bad
                                  CONST = [1, 2, 3]
                                  
                                  # good
                                  CONST = [1, 2, 3].freeze

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid using rescue in its modifier form.
                                  Open

                                        response = JSON.pretty_generate(response) rescue response
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of rescue in its modifier form.

                                  Example:

                                  # bad
                                  some_method rescue handle_error
                                  
                                  # good
                                  begin
                                    some_method
                                  rescue
                                    handle_error
                                  end

                                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                                  Open

                                            error "Blockchain does not provide transaction ids in blocks, giving up."
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks if uses of quotes match the configured preference.

                                  Example: EnforcedStyle: single_quotes (default)

                                  # bad
                                  "No special symbols"
                                  "No string interpolation"
                                  "Just text"
                                  
                                  # good
                                  'No special symbols'
                                  'No string interpolation'
                                  'Just text'
                                  "Wait! What's #{this}!"

                                  Example: EnforcedStyle: double_quotes

                                  # bad
                                  'Just some text'
                                  'No special chars or interpolation'
                                  
                                  # good
                                  "Just some text"
                                  "No special chars or interpolation"
                                  "Every string in #{project} uses double_quotes"

                                  Line is too long. [132/80]
                                  Open

                                                      warning "Unexpected rpc_id (expected: #{options[:id]}, got: #{response['id']}), retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [94/80]
                                  Open

                                                when '400' then warning 'Code 400: Bad Request, retrying ...', method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [81/80]
                                  Open

                                            warning "Resource busy (#{e.message}), retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Do not use :: for method calls.
                                  Open

                                        @url = options[:url] || Api::default_url(@chain)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

                                  Example:

                                  # bad
                                  Timeout::timeout(500) { do_something }
                                  FileUtils::rmdir(dir)
                                  Marshal::dump(obj)
                                  
                                  # good
                                  Timeout.timeout(500) { do_something }
                                  FileUtils.rmdir(dir)
                                  Marshal.dump(obj)

                                  Avoid the use of double negation (!!).
                                  Open

                                          if !!@hashie_logger && defined?(@hashie_logger.close)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Move http out of the conditional.
                                  Open

                                          http
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for identical lines at the beginning or end of each branch of a conditional statement.

                                  Example:

                                  # bad
                                  if condition
                                    do_x
                                    do_z
                                  else
                                    do_y
                                    do_z
                                  end
                                  
                                  # good
                                  if condition
                                    do_x
                                  else
                                    do_y
                                  end
                                  do_z
                                  
                                  # bad
                                  if condition
                                    do_z
                                    do_x
                                  else
                                    do_z
                                    do_y
                                  end
                                  
                                  # good
                                  do_z
                                  if condition
                                    do_x
                                  else
                                    do_y
                                  end
                                  
                                  # bad
                                  case foo
                                  when 1
                                    do_x
                                  when 2
                                    do_x
                                  else
                                    do_x
                                  end
                                  
                                  # good
                                  case foo
                                  when 1
                                    do_x
                                    do_y
                                  when 2
                                    # nothing
                                  else
                                    do_x
                                    do_z
                                  end

                                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                                  Open

                                            jsonrpc: "2.0",
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks if uses of quotes match the configured preference.

                                  Example: EnforcedStyle: single_quotes (default)

                                  # bad
                                  "No special symbols"
                                  "No string interpolation"
                                  "Just text"
                                  
                                  # good
                                  'No special symbols'
                                  'No string interpolation'
                                  'Just text'
                                  "Wait! What's #{this}!"

                                  Example: EnforcedStyle: double_quotes

                                  # bad
                                  'Just some text'
                                  'No special chars or interpolation'
                                  
                                  # good
                                  "Just some text"
                                  "No special chars or interpolation"
                                  "Every string in #{project} uses double_quotes"

                                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                                  Open

                                                error "No response, retrying ...", method_name
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks if uses of quotes match the configured preference.

                                  Example: EnforcedStyle: single_quotes (default)

                                  # bad
                                  "No special symbols"
                                  "No string interpolation"
                                  "Just text"
                                  
                                  # good
                                  'No special symbols'
                                  'No string interpolation'
                                  'Just text'
                                  "Wait! What's #{this}!"

                                  Example: EnforcedStyle: double_quotes

                                  # bad
                                  'Just some text'
                                  'No special chars or interpolation'
                                  
                                  # good
                                  "Just some text"
                                  "No special chars or interpolation"
                                  "Every string in #{project} uses double_quotes"

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Space missing to the left of {.
                                  Open

                                        debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks that block braces have or don't have a space before the opening brace depending on configuration.

                                  Example:

                                  # bad
                                  foo.map{ |a|
                                    a.bar.to_s
                                  }
                                  
                                  # good
                                  foo.map { |a|
                                    a.bar.to_s
                                  }

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                                  
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  private (on line 647) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
                                  Open

                                      def self.methods_json_path
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for private or protected access modifiers which are applied to a singleton method. These access modifiers do not make singleton methods private/protected. private_class_method can be used for that.

                                  Example:

                                  # bad
                                  
                                  class C
                                    private
                                  
                                    def self.method
                                      puts 'hi'
                                    end
                                  end

                                  Example:

                                  # good
                                  
                                  class C
                                    def self.method
                                      puts 'hi'
                                    end
                                  
                                    private_class_method :method
                                  end

                                  Example:

                                  # good
                                  
                                  class C
                                    class << self
                                      private
                                  
                                      def method
                                        puts 'hi'
                                      end
                                    end
                                  end

                                  Avoid the use of double negation (!!).
                                  Open

                                          if !!response
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                        if !!jussi_response_id
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid rescuing without specifying an error class.
                                  Open

                                          rescue => e
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for rescuing StandardError. There are two supported styles implicit and explicit. This cop will not register an offense if any error other than StandardError is specified.

                                  Example: EnforcedStyle: implicit

                                  # `implicit` will enforce using `rescue` instead of
                                  # `rescue StandardError`.
                                  
                                  # bad
                                  begin
                                    foo
                                  rescue StandardError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue OtherError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError, SecurityError
                                    bar
                                  end

                                  Example: EnforcedStyle: explicit (default)

                                  # `explicit` will enforce using `rescue StandardError`
                                  # instead of `rescue`.
                                  
                                  # bad
                                  begin
                                    foo
                                  rescue
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue OtherError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError, SecurityError
                                    bar
                                  end

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Align else with if.
                                  Open

                                          else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Use 2 (not -5) spaces for indentation.
                                  Open

                                            Net::HTTP::Persistent.new(name: http_id, pool_size: @pool_size)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Missing space after #.
                                  Open

                                        #'https://hived.privex.io',
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

                                  Example:

                                  # bad
                                  #Some comment
                                  
                                  # good
                                  # Some comment

                                  Space missing inside }.
                                  Open

                                        debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks that block braces have or don't have surrounding space inside them on configuration. For blocks taking parameters, it checks that the left brace has or doesn't have trailing space depending on configuration.

                                  Example: EnforcedStyle: space (default)

                                  # The `space` style enforces that block braces have
                                  # surrounding space.
                                  
                                  # bad
                                  some_array.each {puts e}
                                  
                                  # good
                                  some_array.each { puts e }

                                  Example: EnforcedStyle: no_space

                                  # The `no_space` style enforces that block braces don't
                                  # have surrounding space.
                                  
                                  # bad
                                  some_array.each { puts e }
                                  
                                  # good
                                  some_array.each {puts e}

                                  Example: EnforcedStyleForEmptyBraces: no_space (default)

                                  # The `no_space` EnforcedStyleForEmptyBraces style enforces that
                                  # block braces don't have a space in between when empty.
                                  
                                  # bad
                                  some_array.each {   }
                                  some_array.each {  }
                                  some_array.each { }
                                  
                                  # good
                                  some_array.each {}

                                  Example: EnforcedStyleForEmptyBraces: space

                                  # The `space` EnforcedStyleForEmptyBraces style enforces that
                                  # block braces have at least a spece in between when empty.
                                  
                                  # bad
                                  some_array.each {}
                                  
                                  # good
                                  some_array.each { }
                                  some_array.each {  }
                                  some_array.each {   }

                                  Example: SpaceBeforeBlockParameters: true (default)

                                  # The SpaceBeforeBlockParameters style set to `true` enforces that
                                  # there is a space between `{` and `|`. Overrides `EnforcedStyle`
                                  # if there is a conflict.
                                  
                                  # bad
                                  [1, 2, 3].each {|n| n * 2 }
                                  
                                  # good
                                  [1, 2, 3].each { |n| n * 2 }

                                  Example: SpaceBeforeBlockParameters: true

                                  # The SpaceBeforeBlockParameters style set to `false` enforces that
                                  # there is no space between `{` and `|`. Overrides `EnforcedStyle`
                                  # if there is a conflict.
                                  
                                  # bad
                                  [1, 2, 3].each { |n| n * 2 }
                                  
                                  # good
                                  [1, 2, 3].each {|n| n * 2 }

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                                
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 235, 6 is not aligned with case at 231, 12.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  end at 716, 6 is not aligned with if at 695, 28.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Line is too long. [84/80]
                                  Open

                                          @pool_size = options[:pool_size] || Net::HTTP::Persistent::DEFAULT_POOL_SIZE
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [86/80]
                                  Open

                                          http.retry_change_requests = idempotent if defined? http.retry_change_requests
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Do not use :: for method calls.
                                  Open

                                        Api::apply_http_defaults(@http_memo[http_id], @ssl_verify_mode)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

                                  Example:

                                  # bad
                                  Timeout::timeout(500) { do_something }
                                  FileUtils::rmdir(dir)
                                  Marshal::dump(obj)
                                  
                                  # good
                                  Timeout.timeout(500) { do_something }
                                  FileUtils.rmdir(dir)
                                  Marshal.dump(obj)

                                  Avoid the use of double negation (!!).
                                  Open

                                        @block_api.shutdown if !!@block_api && @block_api != self
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                            if !!response['error']['data']
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
                                  Open

                                          if !!logger && defined?(logger.close) && !logger.closed?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks for if and unless statements that would fit on one line if written as a modifier if/unless. The maximum line length is configured in the Metrics/LineLength cop.

                                  Example:

                                  # bad
                                  if condition
                                    do_stuff(bar)
                                  end
                                  
                                  unless qux.empty?
                                    Foo.do_something
                                  end
                                  
                                  # good
                                  do_stuff(bar) if condition
                                  Foo.do_something unless qux.empty?

                                  Freeze mutable objects assigned to constants.
                                  Open

                                      DEFAULT_HIVE_URL = 'https://api.openhive.network'
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

                                  Example:

                                  # bad
                                  CONST = [1, 2, 3]
                                  
                                  # good
                                  CONST = [1, 2, 3].freeze

                                  Use response.result.size.zero? instead of response.result.size == 0.
                                  Open

                                                if defined?(response.result.size) && response.result.size == 0
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for usage of comparison operators (==, >, <) to test numbers as zero, positive, or negative. These can be replaced by their respective predicate methods. The cop can also be configured to do the reverse.

                                  The cop disregards #nonzero? as it its value is truthy or falsey, but not true and false, and thus not always interchangeable with != 0.

                                  The cop ignores comparisons to global variables, since they are often populated with objects which can be compared with integers, but are not themselves Interger polymorphic.

                                  Example: EnforcedStyle: predicate (default)

                                  # bad
                                  
                                  foo == 0
                                  0 > foo
                                  bar.baz > 0
                                  
                                  # good
                                  
                                  foo.zero?
                                  foo.negative?
                                  bar.baz.positive?

                                  Example: EnforcedStyle: comparison

                                  # bad
                                  
                                  foo.zero?
                                  foo.negative?
                                  bar.baz.positive?
                                  
                                  # good
                                  
                                  foo == 0
                                  0 > foo
                                  bar.baz > 0

                                  %w-literals should be delimited by [ and ].
                                  Open

                                        properties = %w(
                                          chain url backoff_at max_requests ssl_verify_mode ssl_version persist
                                          recover_transactions_on_error reuse_ssl_sessions pool_size
                                          use_condenser_namespace
                                        ).map do |prop|
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop enforces the consistent usage of %-literal delimiters.

                                  Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

                                  Example:

                                  # Style/PercentLiteralDelimiters:
                                  #   PreferredDelimiters:
                                  #     default: '[]'
                                  #     '%i':    '()'
                                  
                                  # good
                                  %w[alpha beta] + %i(gamma delta)
                                  
                                  # bad
                                  %W(alpha #{beta})
                                  
                                  # bad
                                  %I(alpha beta)

                                  Avoid comma after the last item of a hash.
                                  Open

                                            id: current_rpc_id,
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for trailing comma in array and hash literals.

                                  Example: EnforcedStyleForMultiline: consistent_comma

                                  # bad
                                  a = [1, 2,]
                                  
                                  # good
                                  a = [
                                    1, 2,
                                    3,
                                  ]
                                  
                                  # good
                                  a = [
                                    1,
                                    2,
                                  ]

                                  Example: EnforcedStyleForMultiline: comma

                                  # bad
                                  a = [1, 2,]
                                  
                                  # good
                                  a = [
                                    1,
                                    2,
                                  ]

                                  Example: EnforcedStyleForMultiline: no_comma (default)

                                  # bad
                                  a = [1, 2,]
                                  
                                  # good
                                  a = [
                                    1,
                                    2
                                  ]

                                  Align else with if.
                                  Open

                                              else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Space between { and | missing.
                                  Open

                                        debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks that block braces have or don't have surrounding space inside them on configuration. For blocks taking parameters, it checks that the left brace has or doesn't have trailing space depending on configuration.

                                  Example: EnforcedStyle: space (default)

                                  # The `space` style enforces that block braces have
                                  # surrounding space.
                                  
                                  # bad
                                  some_array.each {puts e}
                                  
                                  # good
                                  some_array.each { puts e }

                                  Example: EnforcedStyle: no_space

                                  # The `no_space` style enforces that block braces don't
                                  # have surrounding space.
                                  
                                  # bad
                                  some_array.each { puts e }
                                  
                                  # good
                                  some_array.each {puts e}

                                  Example: EnforcedStyleForEmptyBraces: no_space (default)

                                  # The `no_space` EnforcedStyleForEmptyBraces style enforces that
                                  # block braces don't have a space in between when empty.
                                  
                                  # bad
                                  some_array.each {   }
                                  some_array.each {  }
                                  some_array.each { }
                                  
                                  # good
                                  some_array.each {}

                                  Example: EnforcedStyleForEmptyBraces: space

                                  # The `space` EnforcedStyleForEmptyBraces style enforces that
                                  # block braces have at least a spece in between when empty.
                                  
                                  # bad
                                  some_array.each {}
                                  
                                  # good
                                  some_array.each { }
                                  some_array.each {  }
                                  some_array.each {   }

                                  Example: SpaceBeforeBlockParameters: true (default)

                                  # The SpaceBeforeBlockParameters style set to `true` enforces that
                                  # there is a space between `{` and `|`. Overrides `EnforcedStyle`
                                  # if there is a conflict.
                                  
                                  # bad
                                  [1, 2, 3].each {|n| n * 2 }
                                  
                                  # good
                                  [1, 2, 3].each { |n| n * 2 }

                                  Example: SpaceBeforeBlockParameters: true

                                  # The SpaceBeforeBlockParameters style set to `false` enforces that
                                  # there is no space between `{` and `|`. Overrides `EnforcedStyle`
                                  # if there is a conflict.
                                  
                                  # bad
                                  [1, 2, 3].each { |n| n * 2 }
                                  
                                  # good
                                  [1, 2, 3].each {|n| n * 2 }

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Indent when as deep as case.
                                  Open

                                        when :steem then Steem::Api.clone(freeze: false) rescue Api.clone
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks how the whens of a case expression are indented in relation to its case or end keyword.

                                  It will register a separate offense for each misaligned when.

                                  Example:

                                  # If Layout/EndAlignment is set to keyword style (default)
                                  # *case* and *end* should always be aligned to same depth,
                                  # and therefore *when* should always be aligned to both -
                                  # regardless of configuration.
                                  
                                  # bad for all styles
                                  case n
                                    when 0
                                      x * 2
                                    else
                                      y / 3
                                  end
                                  
                                  # good for all styles
                                  case n
                                  when 0
                                    x * 2
                                  else
                                    y / 3
                                  end

                                  Example: EnforcedStyle: case (default)

                                  # if EndAlignment is set to other style such as
                                  # start_of_line (as shown below), then *when* alignment
                                  # configuration does have an effect.
                                  
                                  # bad
                                  a = case n
                                  when 0
                                    x * 2
                                  else
                                    y / 3
                                  end
                                  
                                  # good
                                  a = case n
                                      when 0
                                        x * 2
                                      else
                                        y / 3
                                  end

                                  Example: EnforcedStyle: end

                                  # bad
                                  a = case n
                                      when 0
                                        x * 2
                                      else
                                        y / 3
                                  end
                                  
                                  # good
                                  a = case n
                                  when 0
                                    x * 2
                                  else
                                    y / 3
                                  end

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use 2 (not -8) spaces for indentation.
                                  Open

                                          @self_logger = true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use 2 (not -31) spaces for indentation.
                                  Open

                                          options[:recover_transactions_on_error]
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 300, 6 is not aligned with if at 296, 39.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use 2 (not -20) spaces for indentation.
                                  Open

                                          idempotent = api_name != :network_broadcast_api
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  end at 313, 6 is not aligned with if at 309, 28.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Useless assignment to variable - e.
                                  Open

                                          rescue Net::OpenTimeout => e
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

                                  assigned but unused variable - foo

                                  Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

                                  Example:

                                  # bad
                                  
                                  def some_method
                                    some_var = 1
                                    do_something
                                  end

                                  Example:

                                  # good
                                  
                                  def some_method
                                    some_var = 1
                                    do_something(some_var)
                                  end

                                  end at 541, 12 is not aligned with if at 502, 23.
                                  Open

                                              end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [161/80]
                                  Open

                                      # @option options [Boolean] :persist Enable or disable Persistent HTTP.  Using Persistent HTTP keeps the connection alive between API calls.  Default: `true`
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                              
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [99/80]
                                  Open

                                                if !!(response = recover_transaction(signatures, current_rpc_id, timestamp - offset))
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [136/80]
                                  Open

                                                      warning "Node did not provide jsonrpc id (expected: #{options[:id]}, got: nothing), retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [106/80]
                                  Open

                                            debug "Found transaction #{count} block(s) ago; took #{(Time.now.utc - start)} seconds to scan."
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [88/80]
                                  Open

                                                  warning "Unknown code #{response.code}, retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [110/80]
                                  Open

                                          warning "Node #{uri} appears to be misconfigured but no other node is available, retrying ...", prefix
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [84/80]
                                  Open

                                            warning "JSON Parse Error (#{e.message}), retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [83/80]
                                  Open

                                        @http_id ||= "radiator-#{Radiator::VERSION}-#{api_name}-#{SecureRandom.uuid}"
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 275, 6 is not aligned with if at 270, 16.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Avoid the use of double negation (!!).
                                  Open

                                                  if !!tx
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Line is too long. [84/80]
                                  Open

                                        debug "Looking for signatures: #{signatures.map{|s| s[0..5]}} since: #{after}"
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 454, 8 is not aligned with if at 450, 19.
                                  Open

                                          end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Use a guard clause instead of wrapping the code inside a conditional expression.
                                  Open

                                              if api_name == :condenser_api
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use a guard clause instead of wrapping the code inside a conditional expression

                                  Example:

                                  # bad
                                  def test
                                    if something
                                      work
                                    end
                                  end
                                  
                                  # good
                                  def test
                                    return unless something
                                    work
                                  end
                                  
                                  # also good
                                  def test
                                    work if something
                                  end
                                  
                                  # bad
                                  if something
                                    raise 'exception'
                                  else
                                    ok
                                  end
                                  
                                  # good
                                  raise 'exception' if something
                                  ok

                                  Line is too long. [85/80]
                                  Open

                                          if !!hashie_logger && defined?(hashie_logger.close) && !hashie_logger.closed?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                                    
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [244/80]
                                  Open

                                      # @option options [Boolean] :reuse_ssl_sessions Reuse a previously opened SSL session for a new connection.  There's a slight performance improvement by enabling this, but at the expense of reliability during long execution.  Default false.
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Convert if nested inside else to elsif.
                                  Open

                                                if defined?(response.result.size) && response.result.size == 0
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  If the else branch of a conditional consists solely of an if node, it can be combined with the else to become an elsif. This helps to keep the nesting level from getting too deep.

                                  Example:

                                  # bad
                                  if condition_a
                                    action_a
                                  else
                                    if condition_b
                                      action_b
                                    else
                                      action_c
                                    end
                                  end
                                  
                                  # good
                                  if condition_a
                                    action_a
                                  elsif condition_b
                                    action_b
                                  else
                                    action_c
                                  end

                                  Do not use :: for method calls.
                                  Open

                                                JSON[Uri::open("#{@restful_url}/account_history_api/get_transaction?id=#{parser.trx_id}").read].tap do |tx|
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

                                  Example:

                                  # bad
                                  Timeout::timeout(500) { do_something }
                                  FileUtils::rmdir(dir)
                                  Marshal::dump(obj)
                                  
                                  # good
                                  Timeout.timeout(500) { do_something }
                                  FileUtils.rmdir(dir)
                                  Marshal.dump(obj)

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid using rescue in its modifier form.
                                  Open

                                        when :hive then Hive::Api.clone(freeze: false) rescue Api.clone
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of rescue in its modifier form.

                                  Example:

                                  # bad
                                  some_method rescue handle_error
                                  
                                  # good
                                  begin
                                    some_method
                                  rescue
                                    handle_error
                                  end

                                  Use a guard clause instead of wrapping the code inside a conditional expression.
                                  Open

                                              if !!block
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use a guard clause instead of wrapping the code inside a conditional expression

                                  Example:

                                  # bad
                                  def test
                                    if something
                                      work
                                    end
                                  end
                                  
                                  # good
                                  def test
                                    return unless something
                                    work
                                  end
                                  
                                  # also good
                                  def test
                                    work if something
                                  end
                                  
                                  # bad
                                  if something
                                    raise 'exception'
                                  else
                                    ok
                                  end
                                  
                                  # good
                                  raise 'exception' if something
                                  ok

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use a guard clause instead of wrapping the code inside a conditional expression.
                                  Open

                                            if !!block
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use a guard clause instead of wrapping the code inside a conditional expression

                                  Example:

                                  # bad
                                  def test
                                    if something
                                      work
                                    end
                                  end
                                  
                                  # good
                                  def test
                                    return unless something
                                    work
                                  end
                                  
                                  # also good
                                  def test
                                    work if something
                                  end
                                  
                                  # bad
                                  if something
                                    raise 'exception'
                                  else
                                    ok
                                  end
                                  
                                  # good
                                  raise 'exception' if something
                                  ok

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Redundant begin block detected.
                                  Open

                                        begin
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for redundant begin blocks.

                                  Currently it checks for code like this:

                                  Example:

                                  def redundant
                                    begin
                                      ala
                                      bala
                                    rescue StandardError => e
                                      something
                                    end
                                  end
                                  
                                  def preferred
                                    ala
                                    bala
                                  rescue StandardError => e
                                    something
                                  end

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid using rescue in its modifier form.
                                  Open

                                        api.new(options) rescue nil
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of rescue in its modifier form.

                                  Example:

                                  # bad
                                  some_method rescue handle_error
                                  
                                  # good
                                  begin
                                    some_method
                                  rescue
                                    handle_error
                                  end

                                  Do not use :: for method calls.
                                  Open

                                        @restful_url = options[:restful_url] || Api::default_restful_url(@chain)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

                                  Example:

                                  # bad
                                  Timeout::timeout(500) { do_something }
                                  FileUtils::rmdir(dir)
                                  Marshal::dump(obj)
                                  
                                  # good
                                  Timeout.timeout(500) { do_something }
                                  FileUtils.rmdir(dir)
                                  Marshal.dump(obj)

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid the use of double negation (!!).
                                  Open

                                              if !!response['error']['data']['message']
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  File.exists? is deprecated in favor of File.exist?.
                                  Open

                                        File.exists?('.')
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of the deprecated class method usages.

                                  Example:

                                  # bad
                                  
                                  File.exists?(some_path)

                                  Example:

                                  # good
                                  
                                  File.exist?(some_path)

                                  Avoid the use of double negation (!!).
                                  Open

                                            elsif !!response['error']['message']
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  private (on line 647) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
                                  Open

                                      def self.finalize(logger, hashie_logger)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for private or protected access modifiers which are applied to a singleton method. These access modifiers do not make singleton methods private/protected. private_class_method can be used for that.

                                  Example:

                                  # bad
                                  
                                  class C
                                    private
                                  
                                    def self.method
                                      puts 'hi'
                                    end
                                  end

                                  Example:

                                  # good
                                  
                                  class C
                                    def self.method
                                      puts 'hi'
                                    end
                                  
                                    private_class_method :method
                                  end

                                  Example:

                                  # good
                                  
                                  class C
                                    class << self
                                      private
                                  
                                      def method
                                        puts 'hi'
                                      end
                                    end
                                  end

                                  Avoid the use of double negation (!!).
                                  Open

                                        if !!@backoff_at && Time.now.utc - @backoff_at > 300
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Line is too long. [126/80]
                                  Open

                                      # @option options [String] :url URL that points at a full node, like `https://api.steemit.com`.  Default from DEFAULT_URL.
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use a guard clause instead of wrapping the code inside a conditional expression.
                                  Open

                                                if defined?(response.result.size) && response.result.size == 0
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use a guard clause instead of wrapping the code inside a conditional expression

                                  Example:

                                  # bad
                                  def test
                                    if something
                                      work
                                    end
                                  end
                                  
                                  # good
                                  def test
                                    return unless something
                                    work
                                  end
                                  
                                  # also good
                                  def test
                                    work if something
                                  end
                                  
                                  # bad
                                  if something
                                    raise 'exception'
                                  else
                                    ok
                                  end
                                  
                                  # good
                                  raise 'exception' if something
                                  ok

                                  Line is too long. [135/80]
                                  Open

                                            warning "Unable to perform request: #{e} :: #{!!e.cause ? "cause: #{e.cause.message}" : ''}, retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Redundant return detected.
                                  Open

                                        return nil
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for redundant return expressions.

                                  Example:

                                  def test
                                    return something
                                  end
                                  
                                  def test
                                    one
                                    two
                                    three
                                    return something
                                  end

                                  It should be extended to handle methods whose body is if/else or a case expression with a default branch.

                                  Do not use :: for method calls.
                                  Open

                                        @network_api = Api::network_api(@chain, api_name, url: @url)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

                                  Example:

                                  # bad
                                  Timeout::timeout(500) { do_something }
                                  FileUtils::rmdir(dir)
                                  Marshal::dump(obj)
                                  
                                  # good
                                  Timeout.timeout(500) { do_something }
                                  FileUtils.rmdir(dir)
                                  Marshal.dump(obj)

                                  Do not use :: for method calls.
                                  Open

                                            @network_api ||= Api::network_api(@chain, api_name, url: @uri)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

                                  Example:

                                  # bad
                                  Timeout::timeout(500) { do_something }
                                  FileUtils::rmdir(dir)
                                  Marshal::dump(obj)
                                  
                                  # good
                                  Timeout.timeout(500) { do_something }
                                  FileUtils.rmdir(dir)
                                  Marshal.dump(obj)

                                  Avoid rescuing without specifying an error class.
                                  Open

                                            rescue
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for rescuing StandardError. There are two supported styles implicit and explicit. This cop will not register an offense if any error other than StandardError is specified.

                                  Example: EnforcedStyle: implicit

                                  # `implicit` will enforce using `rescue` instead of
                                  # `rescue StandardError`.
                                  
                                  # bad
                                  begin
                                    foo
                                  rescue StandardError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue OtherError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError, SecurityError
                                    bar
                                  end

                                  Example: EnforcedStyle: explicit (default)

                                  # `explicit` will enforce using `rescue StandardError`
                                  # instead of `rescue`.
                                  
                                  # bad
                                  begin
                                    foo
                                  rescue
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue OtherError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError, SecurityError
                                    bar
                                  end

                                  Do not use :: for method calls.
                                  Open

                                          response = Uri::open(url + HEALTH_URI)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

                                  Example:

                                  # bad
                                  Timeout::timeout(500) { do_something }
                                  FileUtils::rmdir(dir)
                                  Marshal::dump(obj)
                                  
                                  # good
                                  Timeout.timeout(500) { do_something }
                                  FileUtils.rmdir(dir)
                                  Marshal.dump(obj)

                                  Annotation keywords like TODO should be all upper case, followed by a colon, and a space, then a note describing the problem.
                                  Open

                                          # TODO Some blockchains (like Golos) do not have transaction_ids.  In
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks that comment annotation keywords are written according to guidelines.

                                  Example:

                                  # bad
                                  # TODO make better
                                  
                                  # good
                                  # TODO: make better
                                  
                                  # bad
                                  # TODO:make better
                                  
                                  # good
                                  # TODO: make better
                                  
                                  # bad
                                  # fixme: does not work
                                  
                                  # good
                                  # FIXME: does not work
                                  
                                  # bad
                                  # Optimize does not work
                                  
                                  # good
                                  # OPTIMIZE: does not work

                                  Avoid the use of double negation (!!).
                                  Open

                                            if !!@network_api && @network_api.respond_to?(m)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid rescuing without specifying an error class.
                                  Open

                                      rescue
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for rescuing StandardError. There are two supported styles implicit and explicit. This cop will not register an offense if any error other than StandardError is specified.

                                  Example: EnforcedStyle: implicit

                                  # `implicit` will enforce using `rescue` instead of
                                  # `rescue StandardError`.
                                  
                                  # bad
                                  begin
                                    foo
                                  rescue StandardError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue OtherError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError, SecurityError
                                    bar
                                  end

                                  Example: EnforcedStyle: explicit (default)

                                  # `explicit` will enforce using `rescue StandardError`
                                  # instead of `rescue`.
                                  
                                  # bad
                                  begin
                                    foo
                                  rescue
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue OtherError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError, SecurityError
                                    bar
                                  end

                                  Use a guard clause instead of wrapping the code inside a conditional expression.
                                  Open

                                        if @self_hashie_logger
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use a guard clause instead of wrapping the code inside a conditional expression

                                  Example:

                                  # bad
                                  def test
                                    if something
                                      work
                                    end
                                  end
                                  
                                  # good
                                  def test
                                    return unless something
                                    work
                                  end
                                  
                                  # also good
                                  def test
                                    work if something
                                  end
                                  
                                  # bad
                                  if something
                                    raise 'exception'
                                  else
                                    ok
                                  end
                                  
                                  # good
                                  raise 'exception' if something
                                  ok

                                  Use self-assignment shorthand +=.
                                  Open

                                        @rpc_id = @rpc_id + 1
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop enforces the use the shorthand for self-assignment.

                                  Example:

                                  # bad
                                  x = x + 1
                                  
                                  # good
                                  x += 1

                                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                                  Open

                                        puts "Request:"
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks if uses of quotes match the configured preference.

                                  Example: EnforcedStyle: single_quotes (default)

                                  # bad
                                  "No special symbols"
                                  "No string interpolation"
                                  "Just text"
                                  
                                  # good
                                  'No special symbols'
                                  'No string interpolation'
                                  'Just text'
                                  "Wait! What's #{this}!"

                                  Example: EnforcedStyle: double_quotes

                                  # bad
                                  'Just some text'
                                  'No special chars or interpolation'
                                  
                                  # good
                                  "Just some text"
                                  "No special chars or interpolation"
                                  "Every string in #{project} uses double_quotes"

                                  Use 2 (not -20) spaces for indentation.
                                  Open

                                          options[:reuse_ssl_sessions]
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Use 2 (not -25) spaces for indentation.
                                  Open

                                          options[:use_condenser_namespace]
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Non-local exit from iterator, without return value. next, break, Array#find, Array#any?, etc. is preferred.
                                  Open

                                            return
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for non-local exits from iterators without a return value. It registers an offense under these conditions:

                                  • No value is returned,
                                  • the block is preceded by a method chain,
                                  • the block has arguments,
                                  • the method which receives the block is not define_method or define_singleton_method,
                                  • the return is not contained in an inner scope, e.g. a lambda or a method definition.

                                  Example:

                                  class ItemApi
                                    rescue_from ValidationError do |e| # non-iteration block with arg
                                      return { message: 'validation error' } unless e.errors # allowed
                                      error_array = e.errors.map do |error| # block with method chain
                                        return if error.suppress? # warned
                                        return "#{error.param}: invalid" unless error.message # allowed
                                        "#{error.param}: #{error.message}"
                                      end
                                      { message: 'validation error', errors: error_array }
                                    end
                                  
                                    def update_items
                                      transaction do # block without arguments
                                        return unless update_necessary? # allowed
                                        find_each do |item| # block without method chain
                                          return if item.stock == 0 # false-negative...
                                          item.update!(foobar: true)
                                        end
                                      end
                                    end
                                  end

                                  Do not use prefix _ for a variable that is used.
                                  Open

                                            _api = Radiator::Api.new(url: DEFAULT_HIVE_FAILOVER_URLS.sample, failover_urls: DEFAULT_HIVE_FAILOVER_URLS)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for underscore-prefixed variables that are actually used.

                                  Example:

                                  # bad
                                  
                                  [1, 2, 3].each do |_num|
                                    do_something(_num)
                                  end

                                  Example:

                                  # good
                                  
                                  [1, 2, 3].each do |num|
                                    do_something(num)
                                  end

                                  Example:

                                  # good
                                  
                                  [1, 2, 3].each do |_num|
                                    do_something # not using `_num`
                                  end

                                  Line is too long. [204/80]
                                  Open

                                      # @option options [Boolean] :recover_transactions_on_error Have Radiator try to recover transactions that are accepted but could not be confirmed due to an error like network timeout.  Default: `true`
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [84/80]
                                  Open

                                            warning "Connection Reset (#{e.message}), retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [110/80]
                                  Open

                                        debug "Could not find transaction in #{count} block(s); took #{(Time.now.utc - start)} seconds to scan."
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [121/80]
                                  Open

                                                JSON[Uri::open("#{@restful_url}/account_history_api/get_transaction?id=#{parser.trx_id}").read].tap do |tx|
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid the use of double negation (!!).
                                  Open

                                        if !!default_failover_urls
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                          if !!@logger && defined?(@logger.close)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                              if !!signatures && signatures.any?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                          if !!(v = instance_variable_get("@#{prop}"))
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                          if !!hashie_logger && defined?(hashie_logger.close) && !hashie_logger.closed?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Freeze mutable objects assigned to constants.
                                  Open

                                      DEFAULT_STEEM_FAILOVER_URLS = [
                                        DEFAULT_STEEM_URL,
                                        'https://api.justyy.com',
                                        'https://steem.61bts.com'
                                      ]
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

                                  Example:

                                  # bad
                                  CONST = [1, 2, 3]
                                  
                                  # good
                                  CONST = [1, 2, 3].freeze

                                  Incorrect indentation detected (column 8 instead of 10).
                                  Open

                                          #   warning e
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the indentation of comments.

                                  Example:

                                  # bad
                                    # comment here
                                  def method_name
                                  end
                                  
                                    # comment here
                                  a = 'hello'
                                  
                                  # yet another comment
                                    if true
                                      true
                                    end
                                  
                                  # good
                                  # comment here
                                  def method_name
                                  end
                                  
                                  # comment here
                                  a = 'hello'
                                  
                                  # yet another comment
                                  if true
                                    true
                                  end

                                  Keep a blank line before and after private.
                                  Open

                                    private
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Access modifiers should be surrounded by blank lines.

                                  Example:

                                  # bad
                                  class Foo
                                    def bar; end
                                    private
                                    def baz; end
                                  end
                                  
                                  # good
                                  class Foo
                                    def bar; end
                                  
                                    private
                                  
                                    def baz; end
                                  end

                                  Use 2 (not -9) spaces for indentation.
                                  Open

                                                error "No response, retrying ...", method_name
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use 2 (not -9) spaces for indentation.
                                  Open

                                          options[:persist]
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Use 2 (not -12) spaces for indentation.
                                  Open

                                          false
                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Indent when as deep as case.
                                  Open

                                        when :hive then Hive::Api.clone(freeze: false) rescue Api.clone
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks how the whens of a case expression are indented in relation to its case or end keyword.

                                  It will register a separate offense for each misaligned when.

                                  Example:

                                  # If Layout/EndAlignment is set to keyword style (default)
                                  # *case* and *end* should always be aligned to same depth,
                                  # and therefore *when* should always be aligned to both -
                                  # regardless of configuration.
                                  
                                  # bad for all styles
                                  case n
                                    when 0
                                      x * 2
                                    else
                                      y / 3
                                  end
                                  
                                  # good for all styles
                                  case n
                                  when 0
                                    x * 2
                                  else
                                    y / 3
                                  end

                                  Example: EnforcedStyle: case (default)

                                  # if EndAlignment is set to other style such as
                                  # start_of_line (as shown below), then *when* alignment
                                  # configuration does have an effect.
                                  
                                  # bad
                                  a = case n
                                  when 0
                                    x * 2
                                  else
                                    y / 3
                                  end
                                  
                                  # good
                                  a = case n
                                      when 0
                                        x * 2
                                      else
                                        y / 3
                                  end

                                  Example: EnforcedStyle: end

                                  # bad
                                  a = case n
                                      when 0
                                        x * 2
                                      else
                                        y / 3
                                  end
                                  
                                  # good
                                  a = case n
                                  when 0
                                    x * 2
                                  else
                                    y / 3
                                  end

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Align elsif with if.
                                  Open

                                              elsif !response.kind_of? Net::HTTPSuccess
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Missing space after #.
                                  Open

                                        #'https://rpc.ecency.com',
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

                                  Example:

                                  # bad
                                  #Some comment
                                  
                                  # good
                                  # Some comment

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                              
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                              
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                    #   
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          @backoff_at = nil 
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                                
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            "@#{prop}=#{v}" 
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [98/80]
                                  Open

                                                when '504' then warning 'Code 504: Gateway Timeout, retrying ...', method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                                    
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [94/80]
                                  Open

                                            if tries > 1 && @recover_transactions_on_error && api_name == :network_broadcast_api
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid the use of double negation (!!).
                                  Open

                                        @api.shutdown if !!@api && @api != self
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [100/80]
                                  Open

                                                when '429' then warning 'Code 429: Too Many Requests, retrying ...', method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid the use of double negation (!!).
                                  Open

                                                if !!(response = recover_transaction(signatures, current_rpc_id, timestamp - offset))
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  end at 462, 6 is not aligned with if at 442, 16.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid the use of double negation (!!).
                                  Open

                                          drop_current_failover_url method_name if !!exp && parser.expiry?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Useless assignment to variable - e.
                                  Open

                                          rescue Errno::ECONNREFUSED => e
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

                                  assigned but unused variable - foo

                                  Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

                                  Example:

                                  # bad
                                  
                                  def some_method
                                    some_var = 1
                                    do_something
                                  end

                                  Example:

                                  # good
                                  
                                  def some_method
                                    some_var = 1
                                    do_something(some_var)
                                  end

                                  Line is too long. [94/80]
                                  Open

                                          warning "Removing misconfigured node from failover urls: #{uri}, retrying ...", prefix
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 283, 6 is not aligned with if at 278, 23.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Avoid the use of double negation (!!).
                                  Open

                                        if !!parser.trx_id
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Line is too long. [117/80]
                                  Open

                                            _api = Radiator::Api.new(url: DEFAULT_HIVE_FAILOVER_URLS.sample, failover_urls: DEFAULT_HIVE_FAILOVER_URLS)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 639, 6 is not aligned with if at 629, 20.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Use a guard clause instead of wrapping the code inside a conditional expression.
                                  Open

                                        if !!jussi_response_id
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use a guard clause instead of wrapping the code inside a conditional expression

                                  Example:

                                  # bad
                                  def test
                                    if something
                                      work
                                    end
                                  end
                                  
                                  # good
                                  def test
                                    return unless something
                                    work
                                  end
                                  
                                  # also good
                                  def test
                                    work if something
                                  end
                                  
                                  # bad
                                  if something
                                    raise 'exception'
                                  else
                                    ok
                                  end
                                  
                                  # good
                                  raise 'exception' if something
                                  ok

                                  Line is too long. [94/80]
                                  Open

                                        @recover_transactions_on_error = if options.keys.include? :recover_transactions_on_error
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [102/80]
                                  Open

                                                when '503' then warning 'Code 503: Service Unavailable, retrying ...', method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid rescuing without specifying an error class.
                                  Open

                                        rescue => e
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for rescuing StandardError. There are two supported styles implicit and explicit. This cop will not register an offense if any error other than StandardError is specified.

                                  Example: EnforcedStyle: implicit

                                  # `implicit` will enforce using `rescue` instead of
                                  # `rescue StandardError`.
                                  
                                  # bad
                                  begin
                                    foo
                                  rescue StandardError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue OtherError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError, SecurityError
                                    bar
                                  end

                                  Example: EnforcedStyle: explicit (default)

                                  # `explicit` will enforce using `rescue StandardError`
                                  # instead of `rescue`.
                                  
                                  # bad
                                  begin
                                    foo
                                  rescue
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue OtherError
                                    bar
                                  end
                                  
                                  # good
                                  begin
                                    foo
                                  rescue StandardError, SecurityError
                                    bar
                                  end

                                  private (on line 647) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
                                  Open

                                      def self.apply_http_defaults(http, ssl_verify_mode)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for private or protected access modifiers which are applied to a singleton method. These access modifiers do not make singleton methods private/protected. private_class_method can be used for that.

                                  Example:

                                  # bad
                                  
                                  class C
                                    private
                                  
                                    def self.method
                                      puts 'hi'
                                    end
                                  end

                                  Example:

                                  # good
                                  
                                  class C
                                    def self.method
                                      puts 'hi'
                                    end
                                  
                                    private_class_method :method
                                  end

                                  Example:

                                  # good
                                  
                                  class C
                                    class << self
                                      private
                                  
                                      def method
                                        puts 'hi'
                                      end
                                    end
                                  end

                                  Avoid the use of double negation (!!).
                                  Open

                                                    if !!response['id']
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Line is too long. [85/80]
                                  Open

                                          #   warning "Unknown exception from request, retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Use empty? instead of size == 0.
                                  Open

                                                if defined?(response.result.size) && response.result.size == 0
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for numeric comparisons that can be replaced by a predicate method, such as receiver.length == 0, receiver.length > 0, receiver.length != 0, receiver.length < 1 and receiver.size == 0 that can be replaced by receiver.empty? and !receiver.empty.

                                  Example:

                                  # bad
                                  [1, 2, 3].length == 0
                                  0 == "foobar".length
                                  array.length < 1
                                  {a: 1, b: 2}.length != 0
                                  string.length > 0
                                  hash.size > 0
                                  
                                  # good
                                  [1, 2, 3].empty?
                                  "foobar".empty?
                                  array.empty?
                                  !{a: 1, b: 2}.empty?
                                  !string.empty?
                                  !hash.empty?

                                  Avoid the use of double negation (!!).
                                  Open

                                        !!@backoff_at && Time.now.utc - @backoff_at < 300
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                              if !!@restful_url
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Line is too long. [103/80]
                                  Open

                                        @api_options.merge(failover_urls: @failover_urls, logger: @logger, hashie_logger: @hashie_logger)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Freeze mutable objects assigned to constants.
                                  Open

                                      POST_HEADERS = {
                                        'Content-Type' => 'application/json',
                                        'User-Agent' => Radiator::AGENT_ID
                                      }
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

                                  Example:

                                  # bad
                                  CONST = [1, 2, 3]
                                  
                                  # good
                                  CONST = [1, 2, 3].freeze

                                  Line is too long. [95/80]
                                  Open

                                          raise ApiError, "Race condition detected on remote node at: #{block_num}" if block.nil?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Do not use :: for method calls.
                                  Open

                                          @failover_urls = Api::default_failover_urls(@chain) - [@url]
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

                                  Example:

                                  # bad
                                  Timeout::timeout(500) { do_something }
                                  FileUtils::rmdir(dir)
                                  Marshal::dump(obj)
                                  
                                  # good
                                  Timeout.timeout(500) { do_something }
                                  FileUtils.rmdir(dir)
                                  Marshal.dump(obj)

                                  Avoid the use of double negation (!!).
                                  Open

                                            warning "Unable to perform request: #{e} :: #{!!e.cause ? "cause: #{e.cause.message}" : ''}, retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                        return @method_names if !!@method_names
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid using rescue in its modifier form.
                                  Open

                                              metadata = (JSON[fullnodeupdate.json_metadata] rescue nil) || {}
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of rescue in its modifier form.

                                  Example:

                                  # bad
                                  some_method rescue handle_error
                                  
                                  # good
                                  begin
                                    some_method
                                  rescue
                                    handle_error
                                  end

                                  Avoid the use of double negation (!!).
                                  Open

                                              if !!block
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Prefer single-quoted strings when you don't need string interpolation or special symbols.
                                  Open

                                        puts "Response:"
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Checks if uses of quotes match the configured preference.

                                  Example: EnforcedStyle: single_quotes (default)

                                  # bad
                                  "No special symbols"
                                  "No string interpolation"
                                  "Just text"
                                  
                                  # good
                                  'No special symbols'
                                  'No string interpolation'
                                  'Just text'
                                  "Wait! What's #{this}!"

                                  Example: EnforcedStyle: double_quotes

                                  # bad
                                  'Just some text'
                                  'No special chars or interpolation'
                                  
                                  # good
                                  "Just some text"
                                  "No special chars or interpolation"
                                  "Every string in #{project} uses double_quotes"

                                  Avoid the use of double negation (!!).
                                  Open

                                          @network_api = nil if !!@network_api
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                          if !!logger && defined?(logger.close) && !logger.closed?
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid using rescue in its modifier form.
                                  Open

                                        when :steem then Steem::Api.clone(freeze: false) rescue Api.clone
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of rescue in its modifier form.

                                  Example:

                                  # bad
                                  some_method rescue handle_error
                                  
                                  # good
                                  begin
                                    some_method
                                  rescue
                                    handle_error
                                  end

                                  Use 2 (not -9) spaces for indentation.
                                  Open

                                            {}
                                          else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks for indentation that doesn't use the specified number of spaces.

                                  See also the IndentationConsistency cop which is the companion to this one.

                                  Example:

                                  # bad
                                  class A
                                   def test
                                    puts 'hello'
                                   end
                                  end
                                  
                                  # good
                                  class A
                                    def test
                                      puts 'hello'
                                    end
                                  end

                                  Example: IgnoredPatterns: ['^\s*module']

                                  # bad
                                  module A
                                  class B
                                    def test
                                    puts 'hello'
                                    end
                                  end
                                  end
                                  
                                  # good
                                  module A
                                  class B
                                    def test
                                      puts 'hello'
                                    end
                                  end
                                  end

                                  Trailing whitespace detected.
                                  Open

                                    #     
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                            
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                     
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  end at 307, 6 is not aligned with if at 303, 17.
                                  Open

                                        end
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks whether the end keywords are aligned properly.

                                  Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

                                  If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

                                  If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

                                  If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

                                  Example: EnforcedStyleAlignWith: keyword (default)

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                             end

                                  Example: EnforcedStyleAlignWith: variable

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  variable = if true
                                  end

                                  Example: EnforcedStyleAlignWith: startofline

                                  # bad
                                  
                                  variable = if true
                                      end
                                  
                                  # good
                                  
                                  puts(if true
                                  end)

                                  Useless assignment to variable - e.
                                  Open

                                          rescue RangeError => e
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

                                  assigned but unused variable - foo

                                  Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

                                  Example:

                                  # bad
                                  
                                  def some_method
                                    some_var = 1
                                    do_something
                                  end

                                  Example:

                                  # good
                                  
                                  def some_method
                                    some_var = 1
                                    do_something(some_var)
                                  end

                                  Line is too long. [85/80]
                                  Open

                                            default_failover_urls = _api.get_accounts(['fullnodeupdate']) do |accounts|
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [154/80]
                                  Open

                                      # @option options [::Array<String>] :failover_urls An array that contains one or more full nodes to fall back on.  Default from DEFAULT_FAILOVER_URLS.
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Prefer Object#is_a? over Object#kind_of?.
                                  Open

                                              elsif !response.kind_of? Net::HTTPSuccess
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop enforces consistent use of Object#is_a? or Object#kind_of?.

                                  Example: EnforcedStyle: is_a? (default)

                                  # bad
                                  var.kind_of?(Date)
                                  var.kind_of?(Integer)
                                  
                                  # good
                                  var.is_a?(Date)
                                  var.is_a?(Integer)

                                  Example: EnforcedStyle: kind_of?

                                  # bad
                                  var.is_a?(Time)
                                  var.is_a?(String)
                                  
                                  # good
                                  var.kind_of?(Time)
                                  var.kind_of?(String)

                                  Avoid the use of double negation (!!).
                                  Open

                                        @debug = !!options[:debug]
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                        if !!block
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Don't use parentheses around a variable.
                                  Open

                                          [*(low..(high))].reverse
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for redundant parentheses.

                                  Example:

                                  # bad
                                  (x) if ((y.z).nil?)
                                  
                                  # good
                                  x if y.z.nil?

                                  Avoid comma after the last item of a hash.
                                  Open

                                            id: current_rpc_id,
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for trailing comma in array and hash literals.

                                  Example: EnforcedStyleForMultiline: consistent_comma

                                  # bad
                                  a = [1, 2,]
                                  
                                  # good
                                  a = [
                                    1, 2,
                                    3,
                                  ]
                                  
                                  # good
                                  a = [
                                    1,
                                    2,
                                  ]

                                  Example: EnforcedStyleForMultiline: comma

                                  # bad
                                  a = [1, 2,]
                                  
                                  # good
                                  a = [
                                    1,
                                    2,
                                  ]

                                  Example: EnforcedStyleForMultiline: no_comma (default)

                                  # bad
                                  a = [1, 2,]
                                  
                                  # good
                                  a = [
                                    1,
                                    2
                                  ]

                                  Align else with if.
                                  Open

                                        else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Align else with if.
                                  Open

                                          else
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cops checks the alignment of else keywords. Normally they should be aligned with an if/unless/while/until/begin/def keyword, but there are special cases when they should follow the same rules as the alignment of end.

                                  Example:

                                  # bad
                                  if something
                                    code
                                   else
                                    code
                                  end
                                  
                                  # bad
                                  if something
                                    code
                                   elsif something
                                    code
                                  end
                                  
                                  # good
                                  if something
                                    code
                                  else
                                    code
                                  end

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                      
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                        
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Trailing whitespace detected.
                                  Open

                                          
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  private (on line 647) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
                                  Open

                                      def self.methods(api_name)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for private or protected access modifiers which are applied to a singleton method. These access modifiers do not make singleton methods private/protected. private_class_method can be used for that.

                                  Example:

                                  # bad
                                  
                                  class C
                                    private
                                  
                                    def self.method
                                      puts 'hi'
                                    end
                                  end

                                  Example:

                                  # good
                                  
                                  class C
                                    def self.method
                                      puts 'hi'
                                    end
                                  
                                    private_class_method :method
                                  end

                                  Example:

                                  # good
                                  
                                  class C
                                    class << self
                                      private
                                  
                                      def method
                                        puts 'hi'
                                      end
                                    end
                                  end

                                  Line is too long. [89/80]
                                  Open

                                      # @option options [Logger] :logger An instance of `Logger` to send debug messages to.
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Line is too long. [122/80]
                                  Open

                                                warning "Unexpected response (code: #{response.code}): #{response.inspect}, retrying ...", method_name, true
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  Avoid the use of double negation (!!).
                                  Open

                                        if (!!exp && exp < Time.now.utc) || (tries > 2 && !parser.node_degraded?)
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid the use of double negation (!!).
                                  Open

                                          if !!response['error']
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

                                  Example:

                                  # bad
                                  !!something
                                  
                                  # good
                                  !something.nil?

                                  Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

                                  Avoid using rescue in its modifier form.
                                  Open

                                        response = JSON.parse(response) rescue response
                                  Severity: Minor
                                  Found in lib/radiator/api.rb by rubocop

                                  This cop checks for uses of rescue in its modifier form.

                                  Example:

                                  # bad
                                  some_method rescue handle_error
                                  
                                  # good
                                  begin
                                    some_method
                                  rescue
                                    handle_error
                                  end

                                  There are no issues that match your filters.

                                  Category
                                  Status