Showing 44 of 173 total issues
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'SplineVisualizer' : (params[:name] || 'SplineVisualizer')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="#{testname}" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'ComparisonAssertionVisualizer' : (params[:name] || 'ComparisonAssertionVisualizer')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResultCollector guiclass="ComparisonVisualizer" testclass="ResultCollector" testname="#{testname}" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'SummaryReport' : (params[:name] || 'SummaryReport')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="#{testname}" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'ViewResultsTree' : (params[:name] || 'ViewResultsTree')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="#{testname}" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'DistributionGraphalpha' : (params[:name] || 'DistributionGraphalpha')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResultCollector guiclass="DistributionGraphVisualizer" testclass="ResultCollector" testname="#{testname}" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'ViewResultsInTable' : (params[:name] || 'ViewResultsInTable')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="#{testname}" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'AggregateReport' : (params[:name] || 'AggregateReport')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="#{testname}" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
Method initialize
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'GraphResults' : (params[:name] || 'GraphResults')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="#{testname}" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
Method initialize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'SmtpSampler' : (params[:name] || 'SmtpSampler')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<SmtpSampler guiclass="SmtpSamplerGui" testclass="SmtpSampler" testname="#{testname}" enabled="true">
<stringProp name="SMTPSampler.server"/>
Method http_request_defaults
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def http_request_defaults(params = {}, &block)
params[:image_parser] = true if params.keys.include? :download_resources
params[:concurrentDwn] = true if params.keys.include? :use_concurrent_pool
params[:concurrentPool] = params[:use_concurrent_pool] if params.keys.include? :use_concurrent_pool
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method initialize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'Redis Data Set Config' : (params[:name] || 'Redis Data Set Config')
params[:getMode] ||= "1" unless params[:remove] == true
@doc = Nokogiri::XML(<<-XML.strip_heredoc)
<kg.apc.jmeter.config.redis.RedisDataSet guiclass="TestBeanGUI" testclass="kg.apc.jmeter.config.redis.RedisDataSet" testname="#{testname}" enabled="true">
Method initialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'JmsPublisher' : (params[:name] || 'JmsPublisher')
@doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<PublisherSampler guiclass="JMSPublisherGui" testclass="PublisherSampler" testname="#{testname}" enabled="true">
<stringProp name="jms.jndi_properties">false</stringProp>
Method http_request_defaults
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def http_request_defaults(params = {}, &block)
params[:image_parser] = true if params.keys.include? :download_resources
params[:concurrentDwn] = true if params.keys.include? :use_concurrent_pool
params[:concurrentPool] = params[:use_concurrent_pool] if params.keys.include? :use_concurrent_pool
Method rsync
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def rsync(params = {})
logger.warn "Test file upload via rsync ..."
file(params)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method update_collection
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def update_collection(params)
elements = @doc.at_xpath("//collectionProp/elementProp")
params.each_with_index do |param, index|
param.each do |name, value|
next unless elements && elements.element_children
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method flood
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def flood(token, params = {})
RestClient.proxy = params[:proxy] if params[:proxy]
begin
file = Tempfile.new(['ruby-jmeter', '.jmx'])
file.write(doc.to_xml(indent: 2))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(params={})
testname = params.kind_of?(Array) ? 'Redis Data Set Config' : (params[:name] || 'Redis Data Set Config')
params[:getMode] ||= "1" unless params[:remove] == true
@doc = Nokogiri::XML(<<-XML.strip_heredoc)
<kg.apc.jmeter.config.redis.RedisDataSet guiclass="TestBeanGUI" testclass="kg.apc.jmeter.config.redis.RedisDataSet" testname="#{testname}" enabled="true">
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(name="Loadosophia.org Uploader", params={})
params[:error_logging] ||= false;
params[:filename] ||= "";
params[:project] ||= "DEFAULT";
params[:uploadToken] ||= "Invalid Token";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method parse_http_request
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def parse_http_request(params)
if params[:raw_path]
params[:path] = params[:url]
parse_url(params)
else
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update(params)
params.delete(:name)
enabled_disabled(params)
if params.class == Array
update_collection params
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"