Sha256: 30be91a66acfebe89bb0db0a619aff46b44816dc6bf20a411f5f5eeba704887f

Contents?: true

Size: 686 Bytes

Versions: 41

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

module Aws
  module S3
    module Plugins
      class GetBucketLocationFix < 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
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
aws-sdk-s3-1.96.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.95.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.95.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.94.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.94.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.93.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.93.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.92.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.91.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.90.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.89.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.88.2 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.88.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.88.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.87.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.86.2 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.86.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.86.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.85.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.84.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb