From 74b59efd5fbf6bec87005d3aab63adf056c1d430 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 18 Jan 2025 08:51:37 -0800 Subject: [PATCH] Expose attributes and add sigs to AwsService --- app/services/aws_service.rb | 2 ++ sig/aws_service.rbs | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 sig/aws_service.rbs 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