strongqa/howitzer

View on GitHub

Similar code found in 1 other location

require_relative '../base_generator'
module Howitzer
  # This class responsible for configuration files generation
  class ConfigGenerator < BaseGenerator
    def manifest
Found in Howitzer::ConfigGenerator and 1 other location - About 4 hrs to fix
generators/prerequisites/prerequisites_generator.rb on lines 3..19

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

Refactorings

Further Reading

Similar code found in 1 other location

require_relative '../base_generator'

module Howitzer
  # This class responsible for prerequisites files generation
  class PrerequisitesGenerator < BaseGenerator
Found in Howitzer::PrerequisitesGenerator and 1 other location - About 4 hrs to fix
generators/config/config_generator.rb on lines 2..18

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

Refactorings

Further Reading

Complex class definition

require 'singleton'
require 'rspec/expectations'
require 'addressable/template'
require 'howitzer/web/capybara_methods_proxy'
require 'howitzer/web/page_validator'
Found in Howitzer::Web::Page - About 3 hrs to fix

    Similar code found in 1 other location

    require 'howitzer/web/capybara_context_holder'
    module Howitzer
      module Web
        # This module combines element dsl methods
        module ElementDsl
    lib/howitzer/web/element_dsl.rb on lines 120..124

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

    Refactorings

    Further Reading

    Similar code found in 1 other location

    require 'howitzer/web/capybara_context_holder'
    module Howitzer
      module Web
        # This module combines element dsl methods
        module ElementDsl
    lib/howitzer/web/element_dsl.rb on lines 113..117

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

    Refactorings

    Further Reading