Showing 630 of 1,221 total issues

Method _request has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        def _request(body, headers, idempotent, parser, method, path, expects)
          response = @connection.request({
            :body       => body,
            :expects    => expects,
            :idempotent => idempotent,
Severity: Minor
Found in lib/fog/aws/efs.rb - About 1 hr to fix

    Method end_element has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

              def end_element(name)
                case name
                when 'DistributionSummary'
                  @response['DistributionSummary'] << @distribution_summary
                  @distribution_summary = { 'CNAME' => [], 'TrustedSigners' => [] }
    Severity: Minor
    Found in lib/fog/aws/parsers/cdn/get_distribution_list.rb - About 1 hr to fix

      Method tagged_resources has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              def tagged_resources(resources)
                Array(resources).map do |resource_id|
                  if match = resource_id.match(/^(\w+)-[a-z0-9]{8,17}/i)
                    id = match.captures.first
                  else
      Severity: Minor
      Found in lib/fog/aws/compute.rb - About 1 hr to fix

        Method end_element has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  def end_element(name)
                    if @in_tag_set
                      case name
                        when 'item'
                          @internet_gateway['tagSet'][@tag['key']] = @tag['value']
        Severity: Minor
        Found in lib/fog/aws/parsers/compute/describe_internet_gateways.rb - About 1 hr to fix

          Method end_element has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                    def end_element(name)
                      case name
                      when 'Port', 'Engine', 'Status', 'BackupRetentionPeriod', 'DBSubnetGroup', 'EngineVersion', 'Endpoint', 'DBClusterParameterGroup', 'DBClusterIdentifier', 'PreferredBackupWindow', 'PreferredMaintenanceWindow', 'AllocatedStorage', 'MasterUsername'
                        @db_cluster[name] = value
                      when 'VpcSecurityGroups'
          Severity: Minor
          Found in lib/fog/aws/parsers/rds/db_cluster_parser.rb - About 1 hr to fix

            Method start_element has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                      def start_element(name, attrs = [])
                        super
                        case name
                        when 'description'
                          @in_description = true
            Severity: Minor
            Found in lib/fog/aws/parsers/compute/describe_image_attribute.rb - About 1 hr to fix

              Method end_element has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                        def end_element(name)
                          if @section == :hosted_zone
                            case name
                            when 'Id'
                              @hosted_zone[name]= value.sub('/hostedzone/', '')
              Severity: Minor
              Found in lib/fog/aws/parsers/dns/get_hosted_zone.rb - About 1 hr to fix

                Method modify_cache_cluster has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        def modify_cache_cluster(id, options = {})
                          response        = Excon::Response.new
                          cluster         = self.data[:clusters][id]
                          pending_values  = Hash.new
                          # For any given option, update the cluster's corresponding value
                Severity: Minor
                Found in lib/fog/aws/requests/elasticache/modify_cache_cluster.rb - About 1 hr to fix

                  Method end_element has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                            def end_element(name)
                              if @in_tag_set
                                case name
                                when 'item'
                                  @instance['tagSet'][@tag['key']] = @tag['value']
                  Severity: Minor
                  Found in lib/fog/aws/parsers/compute/describe_classic_link_instances.rb - About 1 hr to fix

                    Method end_element has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                              def end_element(name)
                                if @section == :hosted_zone
                                  case name
                                  when 'Id'
                                    @hosted_zone[name] = value.sub('/hostedzone/', '')
                    Severity: Minor
                    Found in lib/fog/aws/parsers/dns/create_hosted_zone.rb - About 1 hr to fix

                      Method put_streaming_distribution_config has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              def put_streaming_distribution_config(distribution_id, etag, options = {})
                                data = '<?xml version="1.0" encoding="UTF-8"?>'
                                data << "<StreamingDistributionConfig xmlns=\"http://cloudfront.amazonaws.com/doc/#{@version}/\">"
                                for key, value in options
                                  case value
                      Severity: Minor
                      Found in lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb - About 1 hr to fix

                        Method put_distribution_config has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                def put_distribution_config(distribution_id, etag, options = {})
                                  data = '<?xml version="1.0" encoding="UTF-8"?>'
                                  data << "<DistributionConfig xmlns=\"http://cloudfront.amazonaws.com/doc/#{@version}/\">"
                                  for key, value in options
                                    case value
                        Severity: Minor
                        Found in lib/fog/aws/requests/cdn/put_distribution_config.rb - About 1 hr to fix

                          Method create_stream has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  def create_stream(options={})
                                    stream_name = options.delete("StreamName")
                                    shard_count = options.delete("ShardCount") || 1
                                    stream_arn = "arn:aws:kinesis:#{@region}:#{@account_id}:stream/#{stream_name}"
                          
                          
                          Severity: Minor
                          Found in lib/fog/aws/requests/kinesis/create_stream.rb - About 1 hr to fix

                            Method create_image has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    def create_image(instance_id, name, description, no_reboot = false, options = {})
                                      params = {}
                                      block_device_mappings = options[:block_device_mappings] || []
                                      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']})
                                      params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.NoDevice', block_device_mappings.map{|mapping| mapping['NoDevice']})
                            Severity: Minor
                            Found in lib/fog/aws/requests/compute/create_image.rb - About 1 hr to fix

                              Method authorize_db_security_group_ingress has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      def authorize_db_security_group_ingress(name, opts = {})
                                        unless opts.key?('CIDRIP') || ((opts.key?('EC2SecurityGroupName') || opts.key?('EC2SecurityGroupId')) && opts.key?('EC2SecurityGroupOwnerId'))
                                          raise ArgumentError, 'Must specify CIDRIP, or one of EC2SecurityGroupName or EC2SecurityGroupId, and EC2SecurityGroupOwnerId'
                                        end
                              
                              
                              Severity: Minor
                              Found in lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb - About 1 hr to fix

                                Method create_cluster has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        def create_cluster(params={})
                                          response = Excon::Response.new
                                          response.status = 200
                                
                                          params.has_key?('clusterName') || params['clusterName'] = 'default'
                                Severity: Minor
                                Found in lib/fog/aws/requests/ecs/create_cluster.rb - About 1 hr to fix

                                  Method attributes_to_params has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          def attributes_to_params
                                            options = {
                                              'AllocatedStorage'                => allocated_storage,
                                              'AutoMinorVersionUpgrade'         => auto_minor_version_upgrade,
                                              'AvailabilityZone'                => availability_zone,
                                  Severity: Minor
                                  Found in lib/fog/aws/models/rds/server.rb - About 1 hr to fix

                                    Method end_element has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                              def end_element(name)
                                                case name
                                                when 'AwsAccountNumber'
                                                  @response['StreamingDistributionConfig']['TrustedSigners'] << @value
                                                when 'Bucket', 'Prefix'
                                    Severity: Minor
                                    Found in lib/fog/aws/parsers/cdn/streaming_distribution.rb - About 1 hr to fix

                                      Method request has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              def request(params)
                                                refresh_credentials_if_expired
                                                idempotent   = params.delete(:idempotent)
                                                parser       = params.delete(:parser)
                                                expects      = params.delete(:expects) || 200
                                      Severity: Minor
                                      Found in lib/fog/aws/efs.rb - About 1 hr to fix

                                        Method end_element has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                  def end_element(name)
                                                    case name
                                                    when 'AwsAccountNumber'
                                                      @response['DistributionConfig']['TrustedSigners'] << value
                                                    when 'Bucket', 'Prefix'
                                        Severity: Minor
                                        Found in lib/fog/aws/parsers/cdn/distribution.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language