crowbar/crowbar-client

View on GitHub

Showing 99 of 143 total issues

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

  module Client
    module Command
      module Repository
        #
        # Implementation for the repository deactivate all command
Severity: Major
Found in lib/crowbar/client/command/repository/deactivate_all.rb and 7 other locations - About 35 mins to fix
lib/crowbar/client/command/backup/create.rb on lines 18..37
lib/crowbar/client/command/backup/restore.rb on lines 18..37
lib/crowbar/client/command/host_ip/deallocate.rb on lines 18..37
lib/crowbar/client/command/interface/disable.rb on lines 18..37
lib/crowbar/client/command/repository/activate_all.rb on lines 18..37
lib/crowbar/client/command/restricted/ping.rb on lines 18..37
lib/crowbar/client/command/virtual_ip/deallocate.rb on lines 18..37

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 34.

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

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

            json = begin
              file = File.read(
                options[:file]
              )

Severity: Minor
Found in lib/crowbar/client/command/proposal/create.rb and 1 other location - About 35 mins to fix
lib/crowbar/client/command/proposal/edit.rb on lines 96..111

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 34.

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 8 locations. Consider refactoring.
Open

  module Client
    module Command
      module Interface
        #
        # Implementation for the interface disable command
Severity: Major
Found in lib/crowbar/client/command/interface/disable.rb and 7 other locations - About 35 mins to fix
lib/crowbar/client/command/backup/create.rb on lines 18..37
lib/crowbar/client/command/backup/restore.rb on lines 18..37
lib/crowbar/client/command/host_ip/deallocate.rb on lines 18..37
lib/crowbar/client/command/repository/activate_all.rb on lines 18..37
lib/crowbar/client/command/repository/deactivate_all.rb on lines 18..37
lib/crowbar/client/command/restricted/ping.rb on lines 18..37
lib/crowbar/client/command/virtual_ip/deallocate.rb on lines 18..37

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 34.

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

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

            json = begin
              file = File.read(
                options[:file]
              )

Severity: Minor
Found in lib/crowbar/client/command/proposal/edit.rb and 1 other location - About 35 mins to fix
lib/crowbar/client/command/proposal/create.rb on lines 94..109

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 34.

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 8 locations. Consider refactoring.
Open

  module Client
    module Command
      module Backup
        #
        # Implementation for the backup restore command
Severity: Major
Found in lib/crowbar/client/command/backup/restore.rb and 7 other locations - About 35 mins to fix
lib/crowbar/client/command/backup/create.rb on lines 18..37
lib/crowbar/client/command/host_ip/deallocate.rb on lines 18..37
lib/crowbar/client/command/interface/disable.rb on lines 18..37
lib/crowbar/client/command/repository/activate_all.rb on lines 18..37
lib/crowbar/client/command/repository/deactivate_all.rb on lines 18..37
lib/crowbar/client/command/restricted/ping.rb on lines 18..37
lib/crowbar/client/command/virtual_ip/deallocate.rb on lines 18..37

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 34.

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 8 locations. Consider refactoring.
Open

  module Client
    module Command
      module Restricted
        #
        # Implementation for the restricted ping command
Severity: Major
Found in lib/crowbar/client/command/restricted/ping.rb and 7 other locations - About 35 mins to fix
lib/crowbar/client/command/backup/create.rb on lines 18..37
lib/crowbar/client/command/backup/restore.rb on lines 18..37
lib/crowbar/client/command/host_ip/deallocate.rb on lines 18..37
lib/crowbar/client/command/interface/disable.rb on lines 18..37
lib/crowbar/client/command/repository/activate_all.rb on lines 18..37
lib/crowbar/client/command/repository/deactivate_all.rb on lines 18..37
lib/crowbar/client/command/virtual_ip/deallocate.rb on lines 18..37

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 34.

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 8 locations. Consider refactoring.
Open

  module Client
    module Command
      module Backup
        #
        # Implementation for the backup create command
Severity: Major
Found in lib/crowbar/client/command/backup/create.rb and 7 other locations - About 35 mins to fix
lib/crowbar/client/command/backup/restore.rb on lines 18..37
lib/crowbar/client/command/host_ip/deallocate.rb on lines 18..37
lib/crowbar/client/command/interface/disable.rb on lines 18..37
lib/crowbar/client/command/repository/activate_all.rb on lines 18..37
lib/crowbar/client/command/repository/deactivate_all.rb on lines 18..37
lib/crowbar/client/command/restricted/ping.rb on lines 18..37
lib/crowbar/client/command/virtual_ip/deallocate.rb on lines 18..37

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 34.

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 8 locations. Consider refactoring.
Open

  module Client
    module Command
      module Repository
        #
        # Implementation for the repository activate all command
Severity: Major
Found in lib/crowbar/client/command/repository/activate_all.rb and 7 other locations - About 35 mins to fix
lib/crowbar/client/command/backup/create.rb on lines 18..37
lib/crowbar/client/command/backup/restore.rb on lines 18..37
lib/crowbar/client/command/host_ip/deallocate.rb on lines 18..37
lib/crowbar/client/command/interface/disable.rb on lines 18..37
lib/crowbar/client/command/repository/deactivate_all.rb on lines 18..37
lib/crowbar/client/command/restricted/ping.rb on lines 18..37
lib/crowbar/client/command/virtual_ip/deallocate.rb on lines 18..37

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 34.

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

  module Client
    module Command
      module Services
        #
        # Implementation for the List Restarts command
Severity: Minor
Found in lib/crowbar/client/command/services/clear_restart.rb and 1 other location - About 35 mins to fix
lib/crowbar/client/command/services/disable_restart.rb on lines 18..35

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 34.

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 8 locations. Consider refactoring.
Open

  module Client
    module Command
      module VirtualIP
        #
        # Implementation for the virtual IP deallocate command
Severity: Major
Found in lib/crowbar/client/command/virtual_ip/deallocate.rb and 7 other locations - About 35 mins to fix
lib/crowbar/client/command/backup/create.rb on lines 18..37
lib/crowbar/client/command/backup/restore.rb on lines 18..37
lib/crowbar/client/command/host_ip/deallocate.rb on lines 18..37
lib/crowbar/client/command/interface/disable.rb on lines 18..37
lib/crowbar/client/command/repository/activate_all.rb on lines 18..37
lib/crowbar/client/command/repository/deactivate_all.rb on lines 18..37
lib/crowbar/client/command/restricted/ping.rb on lines 18..37

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 34.

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

  module Client
    module Command
      module Services
        #
        # Implementation for the List Restarts command
Severity: Minor
Found in lib/crowbar/client/command/services/disable_restart.rb and 1 other location - About 35 mins to fix
lib/crowbar/client/command/services/clear_restart.rb on lines 18..35

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 34.

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 8 locations. Consider refactoring.
Open

  module Client
    module Command
      module HostIP
        #
        # Implementation for the host IP deallocate command
Severity: Major
Found in lib/crowbar/client/command/host_ip/deallocate.rb and 7 other locations - About 35 mins to fix
lib/crowbar/client/command/backup/create.rb on lines 18..37
lib/crowbar/client/command/backup/restore.rb on lines 18..37
lib/crowbar/client/command/interface/disable.rb on lines 18..37
lib/crowbar/client/command/repository/activate_all.rb on lines 18..37
lib/crowbar/client/command/repository/deactivate_all.rb on lines 18..37
lib/crowbar/client/command/restricted/ping.rb on lines 18..37
lib/crowbar/client/command/virtual_ip/deallocate.rb on lines 18..37

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 34.

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

  module Client
    module Command
      #
      # Module for the repository command implementations
      #
Severity: Minor
Found in lib/crowbar/client/command/repository.rb and 1 other location - About 30 mins to fix
lib/crowbar/client/request/repository.rb on lines 18..37

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 33.

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

  module Client
    module Request
      #
      # Module for the repository request implementations
      #
Severity: Minor
Found in lib/crowbar/client/request/repository.rb and 1 other location - About 30 mins to fix
lib/crowbar/client/command/repository.rb on lines 18..37

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 33.

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

module Crowbar
  module Client
    module Request
      module HostIP
        #
Severity: Minor
Found in lib/crowbar/client/request/host_ip/deallocate.rb and 3 other locations - About 25 mins to fix
lib/crowbar/client/request/interface/disable.rb on lines 19..60
lib/crowbar/client/request/interface/enable.rb on lines 19..60
lib/crowbar/client/request/virtual_ip/deallocate.rb on lines 19..60

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 31.

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

module Crowbar
  module Client
    module Request
      module Repository
        #
Severity: Minor
Found in lib/crowbar/client/request/repository/deactivate.rb and 1 other location - About 25 mins to fix
lib/crowbar/client/request/repository/activate.rb on lines 19..59

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 31.

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

module Crowbar
  module Client
    module Request
      module Interface
        #
Severity: Minor
Found in lib/crowbar/client/request/interface/disable.rb and 3 other locations - About 25 mins to fix
lib/crowbar/client/request/host_ip/deallocate.rb on lines 19..60
lib/crowbar/client/request/interface/enable.rb on lines 19..60
lib/crowbar/client/request/virtual_ip/deallocate.rb on lines 19..60

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 31.

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

module Crowbar
  module Client
    module Request
      module Repository
        #
Severity: Minor
Found in lib/crowbar/client/request/repository/activate.rb and 1 other location - About 25 mins to fix
lib/crowbar/client/request/repository/deactivate.rb on lines 19..59

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 31.

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

module Crowbar
  module Client
    module Request
      module VirtualIP
        #
Severity: Minor
Found in lib/crowbar/client/request/virtual_ip/deallocate.rb and 3 other locations - About 25 mins to fix
lib/crowbar/client/request/host_ip/deallocate.rb on lines 19..60
lib/crowbar/client/request/interface/disable.rb on lines 19..60
lib/crowbar/client/request/interface/enable.rb on lines 19..60

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 31.

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

module Crowbar
  module Client
    module Request
      module Interface
        #
Severity: Minor
Found in lib/crowbar/client/request/interface/enable.rb and 3 other locations - About 25 mins to fix
lib/crowbar/client/request/host_ip/deallocate.rb on lines 19..60
lib/crowbar/client/request/interface/disable.rb on lines 19..60
lib/crowbar/client/request/virtual_ip/deallocate.rb on lines 19..60

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 31.

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

Severity
Category
Status
Source
Language