Showing 630 of 1,221 total issues
Method save
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def save(options = {})
requires :body, :directory, :key
if options != {}
Fog::Logger.deprecation("options param is deprecated, use acl= instead [light_black](#{caller.first})[/]")
end
Method restore_from_cluster_snapshot
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def restore_from_cluster_snapshot(options = {})
cluster_identifier = options[:cluster_identifier]
snapshot_identifier = options[:snapshot_identifier]
snapshot_cluster_identifier = options[:snapshot_cluster_identifier]
port = options[:port]
Method post_streaming_distribution
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def post_streaming_distribution(options = {})
if self.data[:streaming_distributions].values.any? { |d| (d['CNAME'] & (options['CNAME']||[])).empty? }
Fog::AWS::CDN::Mock.error(:invalid_argument, 'CNAME is already in use')
end
Method send_message
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def send_message(queue_url, message)
Excon::Response.new.tap do |response|
if (queue = data[:queues][queue_url])
response.status = 200
Method get_attributes
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_attributes(domain_name, item_name, options = {})
if options.is_a?(Array)
Fog::Logger.deprecation("get_attributes with array attributes param is deprecated, use 'AttributeName' => attributes) instead [light_black](#{caller.first})[/]")
options['AttributeName'] ||= options if options.is_a?(Array)
end
Method register_task_definition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def register_task_definition(params={})
response = Excon::Response.new
response.status = 200
family_error = 'ClientException => Family can not be blank.'
Method stop_task
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stop_task(params={})
response = Excon::Response.new
response.status = 200
unless task_id = params.delete('task')
Method create_network_acl_entry
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_network_acl_entry(network_acl_id, rule_number, protocol, rule_action, cidr_block, egress, options = {})
response = Excon::Response.new
if self.data[:network_acls][network_acl_id]
if self.data[:network_acls][network_acl_id]['entrySet'].find { |r| r['ruleNumber'] == rule_number && r['egress'] == egress }
Method create_route_table
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_route_table(vpc_id)
response = Excon::Response.new
vpc = self.data[:vpcs].find { |vpc| vpc["vpcId"].eql? vpc_id }
unless vpc.nil?
response.status = 200
Method initialize
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(options={})
require_mime_types
@use_iam_profile = options[:use_iam_profile]
@instrumentor = options[:instrumentor]
Method list_hosted_zones
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def list_hosted_zones(options = {})
maxitems = [options[:max_items]||100,100].min
if options[:marker].nil?
start = 0
Method signed_params_v4
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def self.signed_params_v4(params, headers, options={})
date = Fog::Time.now
params = params.merge('Version' => options[:version])
- 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 multipart_save
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def multipart_save
# Initiate the upload
res = service.initiate_multipart_upload vault.id, multipart_chunk_size, 'description' => description
upload_id = res.headers["x-amz-multipart-upload-id"]
- 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 digest_for_part
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def digest_for_part(body)
part_stack = []
part_temp = nil
body_size = body.bytesize
prepare_body_for_slice(body) {|body, slice|
- 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 _request
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _request(body, headers, idempotent, parser)
@connection.request({
:body => body,
:expects => 200,
:headers => headers,
- 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 end_element
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def end_element(name)
super
case name
when 'containerOverrides'
@task['overrides'] ||= {}
- 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 start_element
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def start_element(name, attrs = [])
super
case name
when 'instanceType'
@in_instanceType = 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 delete_multiple_objects
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def delete_multiple_objects(bucket_name, object_names, options = {})
headers = options.dup
headers.delete(:quiet)
response = Excon::Response.new
if bucket = self.data[:buckets][bucket_name]
- 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 create_load_balancer
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def create_load_balancer(name, options = {})
response = Excon::Response.new
response.status = 200
raise Fog::AWS::ELBV2::IdentifierTaken if self.data[:load_balancers_v2].key? name
- 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 list_roles
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def list_roles(options={})
limit = options['MaxItems']
marker = options['Marker']
if limit
- 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"