ronin-rb/ronin-support

View on GitHub
lib/ronin/support/network/http.rb

Summary

Maintainability
F
1 wk
Test Coverage

File http.rb has 1066 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'ronin/support/network/http/user_agents'
require 'ronin/support/network/http/request'
require 'ronin/support/network/http/set_cookie'
require 'ronin/support/network/http/core_ext'
require 'ronin/support/network/dns/idn'
Severity: Major
Found in lib/ronin/support/network/http.rb - About 2 days to fix

    Class HTTP has 68 methods (exceeds 20 allowed). Consider refactoring.
    Open

          class HTTP
    
            #
            # The Ronin HTTP proxy to use.
            #
    Severity: Major
    Found in lib/ronin/support/network/http.rb - About 1 day to fix

      Method initialize_ssl has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

              def initialize_ssl(ca_bundle:        nil,
                                 cert:             nil,
                                 cert_store:       nil,
                                 ciphers:          nil,
                                 extra_chain_cert: nil,
      Severity: Minor
      Found in lib/ronin/support/network/http.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 connect_uri has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

              def self.connect_uri(url, ssl:      nil,
                                        user:     nil,
                                        password: nil,
                                        **kwargs, &block)
                case url
      Severity: Minor
      Found in lib/ronin/support/network/http.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 connect_uri has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              def self.connect_uri(url, ssl:      nil,
                                        user:     nil,
                                        password: nil,
                                        **kwargs, &block)
                case url
      Severity: Minor
      Found in lib/ronin/support/network/http.rb - About 1 hr to fix

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

                def initialize(host,port, proxy:      nil,
                                          ssl:        port == 443,
                                          # header options
                                          headers:    {},
                                          user_agent: self.class.user_agent,
        Severity: Minor
        Found in lib/ronin/support/network/http.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

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                def self.response_body(method=:get,url, proxy:      self.proxy,
                                                        ssl:        nil,
                                                        headers:    {},
                                                        user_agent: nil,
                                                        cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 3 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1475..1501
        lib/ronin/support/network/http.rb on lines 1526..1552
        lib/ronin/support/network/http.rb on lines 1577..1603

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 71.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                def self.response_status(method=:head,url, proxy:      self.proxy,
                                                           ssl:        nil,
                                                           headers:    {},
                                                           user_agent: nil,
                                                           cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 3 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1526..1552
        lib/ronin/support/network/http.rb on lines 1577..1603
        lib/ronin/support/network/http.rb on lines 1720..1746

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 71.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                def self.ok?(method=:head,url, proxy:      self.proxy,
                                               ssl:        nil,
                                               headers:    {},
                                               user_agent: nil,
                                               cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 3 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1475..1501
        lib/ronin/support/network/http.rb on lines 1577..1603
        lib/ronin/support/network/http.rb on lines 1720..1746

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 71.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                def self.response_headers(method=:head,url, proxy:      self.proxy,
                                                            ssl:        nil,
                                                            headers:    {},
                                                            user_agent: nil,
                                                            cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 3 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1475..1501
        lib/ronin/support/network/http.rb on lines 1526..1552
        lib/ronin/support/network/http.rb on lines 1720..1746

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 71.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.put(url, proxy:      self.proxy,
                                  ssl:        nil,
                                  headers:    {},
                                  user_agent: nil,
                                  cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.move(url, proxy:      self.proxy,
                                   ssl:        nil,
                                   headers:    {},
                                   user_agent: nil,
                                   cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.propfind(url, proxy:      self.proxy,
                                       ssl:        nil,
                                       headers:    {},
                                       user_agent: nil,
                                       cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.proppatch(url, proxy:      self.proxy,
                                        ssl:        nil,
                                        headers:    {},
                                        user_agent: nil,
                                        cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.mkcol(url, proxy:      self.proxy,
                                    ssl:        nil,
                                    headers:    {},
                                    user_agent: nil,
                                    cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.copy(url, proxy:      self.proxy,
                                   ssl:        nil,
                                   headers:    {},
                                   user_agent: nil,
                                   cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.patch(url, proxy:      self.proxy,
                                    ssl:        nil,
                                    headers:    {},
                                    user_agent: nil,
                                    cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.delete(url, proxy:      self.proxy,
                                     ssl:        nil,
                                     headers:    {},
                                     user_agent: nil,
                                     cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.get(url, proxy:      self.proxy,
                                  ssl:        nil,
                                  headers:    {},
                                  user_agent: nil,
                                  cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.post(url, proxy:      self.proxy,
                                   ssl:        nil,
                                   headers:    {},
                                   user_agent: nil,
                                   cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.unlock(url, proxy:      self.proxy,
                                     ssl:        nil,
                                     headers:    {},
                                     user_agent: nil,
                                     cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.lock(url, proxy:      self.proxy,
                                   ssl:        nil,
                                   headers:    {},
                                   user_agent: nil,
                                   cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.options(url, proxy:      self.proxy,
                                      ssl:        nil,
                                      headers:    {},
                                      user_agent: nil,
                                      cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.head(url, proxy:      self.proxy,
                                   ssl:        nil,
                                   headers:    {},
                                   user_agent: nil,
                                   cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2742..2769
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 15 locations. Consider refactoring.
        Open

                def self.trace(url, proxy:      self.proxy,
                                    ssl:        nil,
                                    headers:    {},
                                    user_agent: nil,
                                    cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 14 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1772..1799
        lib/ronin/support/network/http.rb on lines 1825..1852
        lib/ronin/support/network/http.rb on lines 1878..1905
        lib/ronin/support/network/http.rb on lines 2071..2098
        lib/ronin/support/network/http.rb on lines 2124..2151
        lib/ronin/support/network/http.rb on lines 2177..2204
        lib/ronin/support/network/http.rb on lines 2230..2257
        lib/ronin/support/network/http.rb on lines 2283..2310
        lib/ronin/support/network/http.rb on lines 2383..2410
        lib/ronin/support/network/http.rb on lines 2436..2463
        lib/ronin/support/network/http.rb on lines 2583..2610
        lib/ronin/support/network/http.rb on lines 2636..2663
        lib/ronin/support/network/http.rb on lines 2689..2716
        lib/ronin/support/network/http.rb on lines 2795..2822

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 70.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                def self.powered_by_header(url, proxy:      self.proxy,
                                                ssl:        nil,
                                                headers:    {},
                                                user_agent: nil,
                                                cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 1 other location - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1623..1649

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 69.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                def self.server_header(url, proxy:      self.proxy,
                                            ssl:        nil,
                                            headers:    {},
                                            user_agent: nil,
                                            cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 1 other location - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1669..1695

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 69.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                def self.get_body(url, proxy:      self.proxy,
                                       ssl:        nil,
                                       headers:    {},
                                       user_agent: nil,
                                       cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 5 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1926..1952
        lib/ronin/support/network/http.rb on lines 1972..1998
        lib/ronin/support/network/http.rb on lines 2331..2357
        lib/ronin/support/network/http.rb on lines 2484..2510
        lib/ronin/support/network/http.rb on lines 2531..2557

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 68.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                def self.get_headers(url, proxy:      self.proxy,
                                          ssl:        nil,
                                          headers:    {},
                                          user_agent: nil,
                                          cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 5 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1972..1998
        lib/ronin/support/network/http.rb on lines 2019..2045
        lib/ronin/support/network/http.rb on lines 2331..2357
        lib/ronin/support/network/http.rb on lines 2484..2510
        lib/ronin/support/network/http.rb on lines 2531..2557

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 68.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                def self.allowed_methods(url, proxy:      self.proxy,
                                              ssl:        nil,
                                              headers:    {},
                                              user_agent: nil,
                                              cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 5 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1926..1952
        lib/ronin/support/network/http.rb on lines 1972..1998
        lib/ronin/support/network/http.rb on lines 2019..2045
        lib/ronin/support/network/http.rb on lines 2484..2510
        lib/ronin/support/network/http.rb on lines 2531..2557

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 68.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                def self.post_body(url, proxy:      self.proxy,
                                        ssl:        nil,
                                        headers:    {},
                                        user_agent: nil,
                                        cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 5 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1926..1952
        lib/ronin/support/network/http.rb on lines 1972..1998
        lib/ronin/support/network/http.rb on lines 2019..2045
        lib/ronin/support/network/http.rb on lines 2331..2357
        lib/ronin/support/network/http.rb on lines 2484..2510

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 68.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                def self.get_cookies(url, proxy:      self.proxy,
                                          ssl:        nil,
                                          headers:    {},
                                          user_agent: nil,
                                          cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 5 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1926..1952
        lib/ronin/support/network/http.rb on lines 2019..2045
        lib/ronin/support/network/http.rb on lines 2331..2357
        lib/ronin/support/network/http.rb on lines 2484..2510
        lib/ronin/support/network/http.rb on lines 2531..2557

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 68.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                def self.post_headers(url, proxy:      self.proxy,
                                           ssl:        nil,
                                           headers:    {},
                                           user_agent: nil,
                                           cookie:     nil,
        Severity: Major
        Found in lib/ronin/support/network/http.rb and 5 other locations - About 1 hr to fix
        lib/ronin/support/network/http.rb on lines 1926..1952
        lib/ronin/support/network/http.rb on lines 1972..1998
        lib/ronin/support/network/http.rb on lines 2019..2045
        lib/ronin/support/network/http.rb on lines 2331..2357
        lib/ronin/support/network/http.rb on lines 2531..2557

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 68.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                  when Addressable::URI
                    host       = url.host
                    port       = url.inferred_port
                    user     ||= url.user
                    password ||= url.password
        Severity: Minor
        Found in lib/ronin/support/network/http.rb and 1 other location - About 20 mins to fix
        lib/ronin/support/network/http.rb on lines 516..522

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                  when URI::HTTP
                    host       = url.host
                    port       = url.port
                    user     ||= url.user
                    password ||= url.password
        Severity: Minor
        Found in lib/ronin/support/network/http.rb and 1 other location - About 20 mins to fix
        lib/ronin/support/network/http.rb on lines 530..536

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status