diff --git a/app/services/aws_service.rb b/app/services/aws_service.rb index 332b3ec..3fa5997 100644 --- a/app/services/aws_service.rb +++ b/app/services/aws_service.rb @@ -3,6 +3,8 @@ require 'aws-sdk-s3' class AwsService + attr_reader :s3_client, :bucket + class ConfigurationError < StandardError; end def initialize diff --git a/sig/aws_service.rbs b/sig/aws_service.rbs new file mode 100644 index 0000000..2deff53 --- /dev/null +++ b/sig/aws_service.rbs @@ -0,0 +1,19 @@ +class AwsService + class ConfigurationError < StandardError + end + + attr_reader bucket: String + attr_reader s3_client: Aws::S3::Client + + def initialize: () -> void + + def upload_stream: (IO io, String key) -> Aws::S3::Types::PutObjectOutput + + def file_exists?: (String key) -> bool + + private + + def credentials: () -> Hash[Symbol, String] + + def validate_credentials!: () -> void +end