Sha256: c278c9298d4f202c141f0726095aa42378541ab927f885eca6601da5b02ef1b0

Contents?: true

Size: 1.09 KB

Versions: 49

Compression:

Stored size: 1.09 KB

Contents

module Fog
  module Parsers
    module AWS
      module S3

        class AccessControlList < Fog::Parsers::Base

          def reset
            @grant = { 'Grantee' => {} }
            @response = { 'BucketLoggingStatus' => {} }
          end

          def end_element(name)
            case name
            when 'DisplayName', 'ID'
              if @in_access_control_list
                @grant['Grantee'][name] = @value
              else
                @response['Owner'][name] = @value
              end
            when 'Grant'
              @response['BucketLoggingStatus']['LoggingEnabled']['TargetGrants'] << @grant
              @grant = { 'Grantee' => {} }
            when 'LoggingEnabled'
              @response['BucketLoggingStatus']['LoggingEnabled'] = { 'TargetGrants' => [] }
            when 'Permission'
              @grant[name] = @value
            when 'TargetBucket', 'TargetPrefix'
              @response['BucketLoggingStatus'][name] = @value
            when 'URI'
              @grant['Grantee'][name] = @value
            end
          end

        end

      end
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.28 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.27 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.26 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.25 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.24 lib/fog/aws/parsers/s3/get_bucket_logging.rb
tecnh-fog-0.2.23.vpc lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.23 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.22 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.21 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.20 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.19 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.18 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.17 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.16 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.15 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.14 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.13 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.12 lib/fog/aws/parsers/s3/get_bucket_logging.rb
fog-0.2.11 lib/fog/aws/parsers/s3/get_bucket_logging.rb