darrenleeweber/app_version_tasks

View on GitHub
lib/app_version_tasks/configuration.rb

Summary

Maintainability
A
0 mins
Test Coverage

AppVersionTasks::Configuration#git_working_directory= is controlled by argument 'value'
Open

      @git_working_directory = value || default_root_path
Severity: Minor
Found in lib/app_version_tasks/configuration.rb by reek

Control Parameter is a special case of Control Couple

Example

A simple example would be the "quoted" parameter in the following method:

def write(quoted)
  if quoted
    write_quoted @value
  else
    write_unquoted @value
  end
end

Fixing those problems is out of the scope of this document but an easy solution could be to remove the "write" method alltogether and to move the calls to "writequoted" / "writeunquoted" in the initial caller of "write".

AppVersionTasks::Configuration#version_file_path= is controlled by argument 'value'
Open

      @version_file_path = value || default_version_path
Severity: Minor
Found in lib/app_version_tasks/configuration.rb by reek

Control Parameter is a special case of Control Couple

Example

A simple example would be the "quoted" parameter in the following method:

def write(quoted)
  if quoted
    write_quoted @value
  else
    write_unquoted @value
  end
end

Fixing those problems is out of the scope of this document but an easy solution could be to remove the "write" method alltogether and to move the calls to "writequoted" / "writeunquoted" in the initial caller of "write".

AppVersionTasks::Configuration#application_name= is controlled by argument 'value'
Open

        value || Rails.application.class.parent_name
Severity: Minor
Found in lib/app_version_tasks/configuration.rb by reek

Control Parameter is a special case of Control Couple

Example

A simple example would be the "quoted" parameter in the following method:

def write(quoted)
  if quoted
    write_quoted @value
  else
    write_unquoted @value
  end
end

Fixing those problems is out of the scope of this document but an easy solution could be to remove the "write" method alltogether and to move the calls to "writequoted" / "writeunquoted" in the initial caller of "write".

AppVersionTasks::Configuration#default_root_path doesn't depend on instance state (maybe move it to another class?)
Open

      def default_root_path
Severity: Minor
Found in lib/app_version_tasks/configuration.rb by reek

A Utility Function is any instance method that has no dependency on the state of the instance.

There are no issues that match your filters.

Category
Status