Sha256: a54773a12a10d1d15236628c9f1babb76a1ba0c8a1c58bef0c086598ed268e96

Contents?: true

Size: 695 Bytes

Versions: 1

Compression:

Stored size: 695 Bytes

Contents

module Humidifier
  module AwsAdapters
    # The adapter for v3 of aws-sdk
    class SDKV3 < SDKV2
      S3_SDK_MESSAGE = <<-MSG.freeze
The AWS SDK for versions 3+ have broken out individual AWS modules into their
own gems. Since the stack that you're attempting to use is large enough that it
needs to be uploaded to S3, humidifier needs to load the S3 SDK. Please make
sure that the 'aws-sdk-s3' gem is available in your load path.
MSG

      private

      def upload_object(payload, key)
        raise S3_SDK_MESSAGE unless s3_sdk_loaded?
        super
      end

      def s3_sdk_loaded?
        require 'aws-sdk-s3' || true
      rescue LoadError
        false
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
humidifier-1.7.0 lib/humidifier/aws_adapters/sdkv3.rb