crowbar/crowbar-client

View on GitHub

Showing 99 of 143 total issues

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

module Crowbar
  module Client
    module Request
      module Database
        #
Severity: Major
Found in lib/crowbar/client/request/database/test.rb and 1 other location - About 1 hr to fix
lib/crowbar/client/request/database/connect.rb on lines 19..72

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

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 Database
        #
Severity: Major
Found in lib/crowbar/client/request/database/connect.rb and 1 other location - About 1 hr to fix
lib/crowbar/client/request/database/test.rb on lines 19..72

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

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 Backup
        #
Severity: Minor
Found in lib/crowbar/client/request/backup/restore.rb and 1 other location - About 1 hr to fix
lib/crowbar/client/request/backup/download.rb on lines 19..64

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/reinstall.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/poweron.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/hardware.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/allocate.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/poweroff.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

          def execute
            request.process do |request|
              case request.code
              when 200
                formatter = Formatter::Nested.new(
Severity: Major
Found in lib/crowbar/client/command/installer/status.rb and 2 other locations - About 1 hr to fix
lib/crowbar/client/command/node/status.rb on lines 34..53
lib/crowbar/client/command/upgrade/status.rb on lines 34..53

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

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 Backup
        #
Severity: Minor
Found in lib/crowbar/client/request/backup/download.rb and 1 other location - About 1 hr to fix
lib/crowbar/client/request/backup/restore.rb on lines 19..69

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/shutdown.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/reset.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/reboot.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

          def execute
            request.process do |request|
              case request.code
              when 200
                formatter = Formatter::Hash.new(
Severity: Major
Found in lib/crowbar/client/command/node/status.rb and 2 other locations - About 1 hr to fix
lib/crowbar/client/command/installer/status.rb on lines 34..53
lib/crowbar/client/command/upgrade/status.rb on lines 34..53

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/powercycle.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

          def execute
            request.process do |request|
              case request.code
              when 200
                formatter = Formatter::Nested.new(
Severity: Major
Found in lib/crowbar/client/command/upgrade/status.rb and 2 other locations - About 1 hr to fix
lib/crowbar/client/command/installer/status.rb on lines 34..53
lib/crowbar/client/command/node/status.rb on lines 34..53

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

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

module Crowbar
  module Client
    module Command
      module Node
        #
Severity: Major
Found in lib/crowbar/client/command/node/identify.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43
lib/crowbar/client/command/restricted/allocate.rb on lines 19..43

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

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

module Crowbar
  module Client
    module Command
      module Restricted
        #
Severity: Major
Found in lib/crowbar/client/command/restricted/allocate.rb and 10 other locations - About 1 hr to fix
lib/crowbar/client/command/node/allocate.rb on lines 19..43
lib/crowbar/client/command/node/hardware.rb on lines 19..43
lib/crowbar/client/command/node/identify.rb on lines 19..43
lib/crowbar/client/command/node/powercycle.rb on lines 19..43
lib/crowbar/client/command/node/poweroff.rb on lines 19..43
lib/crowbar/client/command/node/poweron.rb on lines 19..43
lib/crowbar/client/command/node/reboot.rb on lines 19..43
lib/crowbar/client/command/node/reinstall.rb on lines 19..43
lib/crowbar/client/command/node/reset.rb on lines 19..43
lib/crowbar/client/command/node/shutdown.rb on lines 19..43

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

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 execute
            request.process do |request|
              case request.code
              when 200
                formatter = Formatter::Hash.new(
Severity: Minor
Found in lib/crowbar/client/command/node/list.rb and 1 other location - About 55 mins to fix
lib/crowbar/client/command/backup/list.rb on lines 34..53

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

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 execute
            request.process do |request|
              case request.code
              when 200
                formatter = Formatter::Hash.new(
Severity: Minor
Found in lib/crowbar/client/command/backup/list.rb and 1 other location - About 55 mins to fix
lib/crowbar/client/command/node/list.rb on lines 34..53

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

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