fog/fog-profitbricks

View on GitHub

Showing 99 of 140 total issues

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

  module Compute
    class ProfitBricks
      class Real
        # Retrieve a list of all snapshots
        #
Severity: Major
Found in lib/fog/profitbricks/requests/compute/get_all_snapshots.rb and 6 other locations - About 25 mins to fix
lib/fog/profitbricks/requests/compute/get_all_contract_resources.rb on lines 2..50
lib/fog/profitbricks/requests/compute/get_all_datacenters.rb on lines 2..54
lib/fog/profitbricks/requests/compute/get_all_groups.rb on lines 2..57
lib/fog/profitbricks/requests/compute/get_all_images.rb on lines 2..61
lib/fog/profitbricks/requests/compute/get_all_resources.rb on lines 2..61
lib/fog/profitbricks/requests/compute/get_all_users.rb on lines 2..65

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

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

  module Compute
    class ProfitBricks
      class Real
        # Retrieve a full list of all groups.
        #
Severity: Major
Found in lib/fog/profitbricks/requests/compute/get_all_groups.rb and 6 other locations - About 25 mins to fix
lib/fog/profitbricks/requests/compute/get_all_contract_resources.rb on lines 2..50
lib/fog/profitbricks/requests/compute/get_all_datacenters.rb on lines 2..54
lib/fog/profitbricks/requests/compute/get_all_images.rb on lines 2..61
lib/fog/profitbricks/requests/compute/get_all_resources.rb on lines 2..61
lib/fog/profitbricks/requests/compute/get_all_snapshots.rb on lines 2..61
lib/fog/profitbricks/requests/compute/get_all_users.rb on lines 2..65

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

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

      class Real
        # Creates a LAN within a data center
        #
        # ==== Parameters
        # * datacenter_id<~String> - Required - UUID of virtual data center
Severity: Minor
Found in lib/fog/profitbricks/requests/compute/create_lan.rb and 2 other locations - About 25 mins to fix
lib/fog/profitbricks/requests/compute/create_load_balancer.rb on lines 4..50
lib/fog/profitbricks/requests/compute/create_server.rb on lines 4..130

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

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 Fog
  module Compute
    class ProfitBricks
      class Flavors < Fog::Collection
        model Fog::Compute::ProfitBricks::Flavor
Severity: Minor
Found in lib/fog/profitbricks/models/compute/flavors.rb and 1 other location - About 25 mins to fix
lib/fog/profitbricks/models/compute/regions.rb on lines 3..15

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

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

  module Compute
    class ProfitBricks
      class Real
        # Displays a list of all available images.
        #
Severity: Major
Found in lib/fog/profitbricks/requests/compute/get_all_images.rb and 6 other locations - About 25 mins to fix
lib/fog/profitbricks/requests/compute/get_all_contract_resources.rb on lines 2..50
lib/fog/profitbricks/requests/compute/get_all_datacenters.rb on lines 2..54
lib/fog/profitbricks/requests/compute/get_all_groups.rb on lines 2..57
lib/fog/profitbricks/requests/compute/get_all_resources.rb on lines 2..61
lib/fog/profitbricks/requests/compute/get_all_snapshots.rb on lines 2..61
lib/fog/profitbricks/requests/compute/get_all_users.rb on lines 2..65

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

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

      class Real
        # Creates a load balancer within the data center. Load balancers can be used for public or private IP traffic
        #
        # ==== Parameters
        # * datacenter_id<~String> - Required, UUID of the virtual data center
Severity: Minor
Found in lib/fog/profitbricks/requests/compute/create_load_balancer.rb and 2 other locations - About 25 mins to fix
lib/fog/profitbricks/requests/compute/create_lan.rb on lines 4..107
lib/fog/profitbricks/requests/compute/create_server.rb on lines 4..130

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

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 list_volumes
          requires :datacenter_id, :id

          result = service.list_attached_volumes(datacenter_id, id)

Severity: Minor
Found in lib/fog/profitbricks/models/compute/server.rb and 1 other location - About 25 mins to fix
lib/fog/profitbricks/models/compute/server.rb on lines 180..188

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

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 list_cdroms
          requires :datacenter_id, :id

          result = service.list_attached_cdroms(datacenter_id, id)

Severity: Minor
Found in lib/fog/profitbricks/models/compute/server.rb and 1 other location - About 25 mins to fix
lib/fog/profitbricks/models/compute/server.rb on lines 169..177

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

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

      class Real
        # Adds a specific resource share to a group and optionally allows the setting of permissions
        # for that resource. As an example, you might use this to grant permissions to use an image
        # or snapshot to a specific group.
        #
Severity: Minor
Found in lib/fog/profitbricks/requests/compute/add_share.rb and 1 other location - About 20 mins to fix
lib/fog/profitbricks/requests/compute/update_share.rb on lines 4..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 28.

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

      class Real
        # Update a group.
        # Normally a PUT request would require that you pass all the attributes and values.
        # In this implementation, you must supply the name, even if it isn't being changed.
        # As a convenience, the other four attributes will default to false.
Severity: Minor
Found in lib/fog/profitbricks/requests/compute/update_share.rb and 1 other location - About 20 mins to fix
lib/fog/profitbricks/requests/compute/add_share.rb on lines 4..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 28.

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

      class Real
        # Associates a NIC to a Load Balancer, enabling the NIC to participate in load-balancing
        #
        # ==== Parameters
        # * datacenter_id<~String>   - UUID of the data center
lib/fog/profitbricks/requests/compute/attach_cdrom.rb on lines 4..55
lib/fog/profitbricks/requests/compute/attach_volume.rb on lines 4..56

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

      class Real
        # Attach a pre-existing storage volume to the server.
        #
        # ==== Parameters
        # * datacenter_id      - Required - The unique ID of the data center
Severity: Minor
Found in lib/fog/profitbricks/requests/compute/attach_volume.rb and 2 other locations - About 20 mins to fix
lib/fog/profitbricks/requests/compute/associate_nic_to_load_balancer.rb on lines 4..79
lib/fog/profitbricks/requests/compute/attach_cdrom.rb on lines 4..55

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

      class Real
        # Attach a CD-ROM to an existing server.
        #
        # ==== Parameters
        # * datacenter_id          - Required - The unique ID of the data center
Severity: Minor
Found in lib/fog/profitbricks/requests/compute/attach_cdrom.rb and 2 other locations - About 20 mins to fix
lib/fog/profitbricks/requests/compute/associate_nic_to_load_balancer.rb on lines 4..79
lib/fog/profitbricks/requests/compute/attach_volume.rb on lines 4..56

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

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

        def reload
          requires :datacenter_id, :id

          data = begin
            collection.get(datacenter_id, id)
Severity: Minor
Found in lib/fog/profitbricks/models/compute/volume.rb and 3 other locations - About 15 mins to fix
lib/fog/profitbricks/models/compute/lan.rb on lines 67..80
lib/fog/profitbricks/models/compute/load_balancer.rb on lines 69..82
lib/fog/profitbricks/models/compute/server.rb on lines 153..166

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

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

        def reload
          requires :datacenter_id, :id

          data = begin
            collection.get(datacenter_id, id)
Severity: Minor
Found in lib/fog/profitbricks/models/compute/load_balancer.rb and 3 other locations - About 15 mins to fix
lib/fog/profitbricks/models/compute/lan.rb on lines 67..80
lib/fog/profitbricks/models/compute/server.rb on lines 153..166
lib/fog/profitbricks/models/compute/volume.rb on lines 88..101

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

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

        def reload
          requires :datacenter_id, :id

          data = begin
            collection.get(datacenter_id, id)
Severity: Minor
Found in lib/fog/profitbricks/models/compute/server.rb and 3 other locations - About 15 mins to fix
lib/fog/profitbricks/models/compute/lan.rb on lines 67..80
lib/fog/profitbricks/models/compute/load_balancer.rb on lines 69..82
lib/fog/profitbricks/models/compute/volume.rb on lines 88..101

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

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

        def reload
          requires :datacenter_id, :id

          data = begin
            collection.get(datacenter_id, id)
Severity: Minor
Found in lib/fog/profitbricks/models/compute/lan.rb and 3 other locations - About 15 mins to fix
lib/fog/profitbricks/models/compute/load_balancer.rb on lines 69..82
lib/fog/profitbricks/models/compute/server.rb on lines 153..166
lib/fog/profitbricks/models/compute/volume.rb on lines 88..101

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

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

      class Real
        # Update a group.
        # Normally a PUT request would require that you pass all the attributes and values.
        # In this implementation, you must supply the name, even if it isn't being changed.
        # As a convenience, the other four attributes will default to false.
Severity: Minor
Found in lib/fog/profitbricks/requests/compute/update_group.rb and 1 other location - About 15 mins to fix
lib/fog/profitbricks/requests/compute/update_user.rb on lines 4..67

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

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

      class Real
        # Update details about a specific user including their privileges.
        # With this PUT operation, you need to supply values for all the attributes,
        # even if you are only updating some of them.
        #
Severity: Minor
Found in lib/fog/profitbricks/requests/compute/update_user.rb and 1 other location - About 15 mins to fix
lib/fog/profitbricks/requests/compute/update_group.rb on lines 4..58

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

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