Showing 9 of 9 total issues
Class ServiceManager
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class ServiceManager attr_reader :service attr_reader :settings
Class UbuntuHelper
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class UbuntuHelper attr_reader :current_path attr_reader :log_path attr_reader :script_path
Method terminate_nodes
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def terminate_nodes alive = nodes_alive if alive.empty? puts "There are no #{service} nodes alive" else
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def stop_nodes alive = nodes_alive settings.nodes.each do |config| inst = alive.find { |i| AwsHelpers.ec2_instance_tag_name?(i, config.tag_name) } next if inst.nil?
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def reboot_nodes alive = nodes_alive settings.nodes.each do |config| inst = alive.find { |i| AwsHelpers.ec2_instance_tag_name?(i, config.tag_name) } next if inst.nil?
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def listeners manager.nodes_running.map do |inst| node = settings.nodes.find { |n| n.tag_name == manager.node_name(inst) } [node.tag_name, "PLAINTEXT://#{inst.private_dns_name}:#{node.client_port}"]
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
manager.nodes_running.map do |inst| node = settings.nodes.find { |n| n.tag_name == manager.node_name(inst) } dns = public ? inst.public_dns_name : inst.private_dns_name "#{dns}:#{node.client_port}"
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
manager.nodes_running.map do |inst| node = settings.nodes.find { |n| n.tag_name == manager.node_name(inst) } dns = public ? inst.public_dns_name : inst.private_dns_name "#{dns}:#{node.client_port}"
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
def advertised_listeners manager.nodes_running.map do |inst| node = settings.nodes.find { |n| n.tag_name == manager.node_name(inst) } [node.tag_name, "PLAINTEXT://#{inst.public_dns_name}:#{node.client_port}"]
- Read upRead up