fog/fog-google

View on GitHub

Showing 198 of 329 total issues

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

  module Compute
    class Google
      class Mock
        def insert_forwarding_rule(_rule_name, _region, _opts = {})
          # :no-coverage:
Severity: Minor
Found in lib/fog/compute/google/requests/insert_forwarding_rule.rb and 1 other location - About 45 mins to fix
lib/fog/compute/google/requests/insert_target_instance.rb on lines 2..19

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

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 Compute
    class Google
      class Mock
        def list_url_maps(_filter: nil, _max_results: nil,
                          _order_by: nil, _page_token: nil)
Severity: Minor
Found in lib/fog/compute/google/requests/list_url_maps.rb and 1 other location - About 45 mins to fix
lib/fog/compute/google/requests/list_target_http_proxies.rb on lines 2..20

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

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

                                        "n1-standard-1-d" => {
                                          "kind" => "compute#machineType",
                                          "id" => "12908559201265214706",
                                          "creationTimestamp" => "2012-06-07T13:48:34.258-07:00",
                                          "name" => "n1-standard-1-d",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 6 other locations - About 45 mins to fix
lib/fog/compute/google/mock.rb on lines 431..448
lib/fog/compute/google/mock.rb on lines 464..481
lib/fog/compute/google/mock.rb on lines 533..550
lib/fog/compute/google/mock.rb on lines 566..583
lib/fog/compute/google/mock.rb on lines 668..685
lib/fog/compute/google/mock.rb on lines 701..718

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

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

                                        "n1-highcpu-2-d" => {
                                          "kind" => "compute#machineType",
                                          "id" => "13043555176034896271",
                                          "creationTimestamp" => "2012-11-16T11:47:07.825-08:00",
                                          "name" => "n1-highcpu-2-d",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 6 other locations - About 45 mins to fix
lib/fog/compute/google/mock.rb on lines 464..481
lib/fog/compute/google/mock.rb on lines 533..550
lib/fog/compute/google/mock.rb on lines 566..583
lib/fog/compute/google/mock.rb on lines 635..652
lib/fog/compute/google/mock.rb on lines 668..685
lib/fog/compute/google/mock.rb on lines 701..718

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

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

                                        "n1-highmem-2-d" => {
                                          "kind" => "compute#machineType",
                                          "id" => "13043551625558644085",
                                          "creationTimestamp" => "2012-11-16T11:40:59.630-08:00",
                                          "name" => "n1-highmem-2-d",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 6 other locations - About 45 mins to fix
lib/fog/compute/google/mock.rb on lines 431..448
lib/fog/compute/google/mock.rb on lines 464..481
lib/fog/compute/google/mock.rb on lines 566..583
lib/fog/compute/google/mock.rb on lines 635..652
lib/fog/compute/google/mock.rb on lines 668..685
lib/fog/compute/google/mock.rb on lines 701..718

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

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

                                        "n1-highmem-4-d" => {
                                          "kind" => "compute#machineType",
                                          "id" => "13043552953632709737",
                                          "creationTimestamp" => "2012-11-16T11:43:17.400-08:00",
                                          "name" => "n1-highmem-4-d",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 6 other locations - About 45 mins to fix
lib/fog/compute/google/mock.rb on lines 431..448
lib/fog/compute/google/mock.rb on lines 464..481
lib/fog/compute/google/mock.rb on lines 533..550
lib/fog/compute/google/mock.rb on lines 635..652
lib/fog/compute/google/mock.rb on lines 668..685
lib/fog/compute/google/mock.rb on lines 701..718

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

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

                                        "n1-standard-4-d" => {
                                          "kind" => "compute#machineType",
                                          "id" => "12908559991903153608",
                                          "creationTimestamp" => "2012-06-07T13:50:05.677-07:00",
                                          "name" => "n1-standard-4-d",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 6 other locations - About 45 mins to fix
lib/fog/compute/google/mock.rb on lines 431..448
lib/fog/compute/google/mock.rb on lines 464..481
lib/fog/compute/google/mock.rb on lines 533..550
lib/fog/compute/google/mock.rb on lines 566..583
lib/fog/compute/google/mock.rb on lines 635..652
lib/fog/compute/google/mock.rb on lines 668..685

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

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 Compute
    class Google
      class Mock
        def list_target_http_proxies(_filter: nil, _max_results: nil,
                                     _order_by: nil, _page_token: nil)
Severity: Minor
Found in lib/fog/compute/google/requests/list_target_http_proxies.rb and 1 other location - About 45 mins to fix
lib/fog/compute/google/requests/list_url_maps.rb on lines 2..20

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

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

                                        "n1-highcpu-4-d" => {
                                          "kind" => "compute#machineType",
                                          "id" => "13043556330284250611",
                                          "creationTimestamp" => "2012-11-16T11:49:07.563-08:00",
                                          "name" => "n1-highcpu-4-d",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 6 other locations - About 45 mins to fix
lib/fog/compute/google/mock.rb on lines 431..448
lib/fog/compute/google/mock.rb on lines 533..550
lib/fog/compute/google/mock.rb on lines 566..583
lib/fog/compute/google/mock.rb on lines 635..652
lib/fog/compute/google/mock.rb on lines 668..685
lib/fog/compute/google/mock.rb on lines 701..718

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

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

                                        "n1-standard-2-d" => {
                                          "kind" => "compute#machineType",
                                          "id" => "12908559582417967837",
                                          "creationTimestamp" => "2012-06-07T13:49:19.448-07:00",
                                          "name" => "n1-standard-2-d",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 6 other locations - About 45 mins to fix
lib/fog/compute/google/mock.rb on lines 431..448
lib/fog/compute/google/mock.rb on lines 464..481
lib/fog/compute/google/mock.rb on lines 533..550
lib/fog/compute/google/mock.rb on lines 566..583
lib/fog/compute/google/mock.rb on lines 635..652
lib/fog/compute/google/mock.rb on lines 701..718

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

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 Compute
    class Google
      class Mock
        def list_target_pools(_region, _opts = {})
          # :no-coverage:
Severity: Minor
Found in lib/fog/compute/google/requests/list_target_pools.rb and 1 other location - About 40 mins to fix
lib/fog/compute/google/requests/list_servers.rb on lines 2..19

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

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 Compute
    class Google
      class Mock
        def list_servers(_zone, _opts = {})
          # :no-coverage:
Severity: Minor
Found in lib/fog/compute/google/requests/list_servers.rb and 1 other location - About 40 mins to fix
lib/fog/compute/google/requests/list_target_pools.rb on lines 2..21

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

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

                    "centos-7-v20161212" => {
                      "archiveSizeBytes" => "4491098988",
                      "creationTimestamp" => "2016-12-14T10 =>29 =>44.741-08 =>00",
                      "description" => "CentOS, CentOS, 7, x86_64 built on 2016-12-12",
                      "diskSizeGb" => "10",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 2 other locations - About 40 mins to fix
lib/fog/compute/google/mock.rb on lines 21..39
lib/fog/compute/google/mock.rb on lines 47..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 38.

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

                    "centos-6-v20161212" => {
                      "archiveSizeBytes" => "3942360630",
                      "creationTimestamp" => "2016-12-14T10 =>30 =>52.053-08 =>00",
                      "description" => "CentOS, CentOS, 6, x86_64 built on 2016-12-12",
                      "diskSizeGb" => "10",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 2 other locations - About 40 mins to fix
lib/fog/compute/google/mock.rb on lines 21..39
lib/fog/compute/google/mock.rb on lines 67..85

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

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

                    "debian-8-jessie-v20161215" => {
                      "archiveSizeBytes" => "3436783050",
                      "creationTimestamp" => "2016-12-15T12 =>53 =>12.508-08 =>00",
                      "description" => "Debian, Debian GNU/Linux, 8 (jessie), amd64 built on 2016-12-15",
                      "diskSizeGb" => "10",
Severity: Major
Found in lib/fog/compute/google/mock.rb and 2 other locations - About 40 mins to fix
lib/fog/compute/google/mock.rb on lines 47..65
lib/fog/compute/google/mock.rb on lines 67..85

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

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

                    "fog-3" => {
                      "kind" => "compute#subnetwork",
                      "id" => "6680781458098159923",
                      "creationTimestamp" => "2016-03-19T19:13:51.613-07:00",
                      "gatewayAddress" => "192.168.20.1",
Severity: Minor
Found in lib/fog/compute/google/mock.rb and 2 other locations - About 40 mins to fix
lib/fog/compute/google/mock.rb on lines 786..795
lib/fog/compute/google/mock.rb on lines 797..806

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

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

                    "fog-2" => {
                      "kind" => "compute#subnetwork",
                      "id" => "6680781458098159921",
                      "creationTimestamp" => "2016-03-19T19:13:51.613-07:00",
                      "gatewayAddress" => "10.1.16.1",
Severity: Minor
Found in lib/fog/compute/google/mock.rb and 2 other locations - About 40 mins to fix
lib/fog/compute/google/mock.rb on lines 786..795
lib/fog/compute/google/mock.rb on lines 808..817

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

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

                    "fog-1" => {
                      "kind" => "compute#subnetwork",
                      "id" => "6680781458098159920",
                      "creationTimestamp" => "2016-03-19T19:13:51.613-07:00",
                      "gatewayAddress" => "10.1.0.1",
Severity: Minor
Found in lib/fog/compute/google/mock.rb and 2 other locations - About 40 mins to fix
lib/fog/compute/google/mock.rb on lines 797..806
lib/fog/compute/google/mock.rb on lines 808..817

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

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 expand_ip_cidr_range(range, async = true)
          requires :identity, :region

          data = service.expand_subnetwork_ip_cidr_range(
            identity, region, range
Severity: Minor
Found in lib/fog/compute/google/models/subnetwork.rb and 1 other location - About 35 mins to fix
lib/fog/compute/google/models/subnetwork.rb on lines 60..70

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

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 test
  connection = Fog::Google::Monitoring.new

  puts "Listing all MonitoredResourceDescriptors..."
  puts "--------------------------------"
Severity: Minor
Found in examples/monitoring/monitored_resource_descriptors.rb and 1 other location - About 35 mins to fix
examples/monitoring/metric_descriptors.rb on lines 10..21

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

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