Sha256: 4f4f5043212876340e4a181c692a54c9213fdaef9315db6e1c3f68473e3cabfd

Contents?: true

Size: 609 Bytes

Versions: 997

Compression:

Stored size: 609 Bytes

Contents

module Aws
  module Plugins
    class S3GetBucketLocationFix < Seahorse::Client::Plugin

      class Handler < Seahorse::Client::Handler

        def call(context)
          @handler.call(context).on(200) do |response|
            response.data = S3::Types::GetBucketLocationOutput.new
            xml = context.http_response.body_contents
            matches = xml.match(/>(.+?)<\/LocationConstraint>/)
            response.data[:location_constraint] = matches ? matches[1] : ''
          end
        end
      end

      handler(Handler, priority: 60, operations: [:get_bucket_location])

    end
  end
end

Version data entries

997 entries across 997 versions & 2 rubygems

Version Path
aws-sdk-core-2.11.632 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.631 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.630 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.629 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.628 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.627 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.626 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.625 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.624 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.623 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.622 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.621 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.620 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.619 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.618 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.617 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.616 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.615 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.614 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.11.613 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb