Module: ErrorHandler

Defined in:
lib/easys3/error_handler.rb

Class Method Summary collapse

Class Method Details

.check_aws_access_keyObject



11
12
13
14
15
# File 'lib/easys3/error_handler.rb', line 11

def self.check_aws_access_key()
  if !ENV["AWS_ACCESS_KEY_ID"] || ENV["AWS_ACCESS_KEY_ID"] == ""
    raise "AWS_ACCESS_KEY_ID=... is missing in your .env file"
  end
end

.check_aws_bucket_nameObject



23
24
25
26
27
# File 'lib/easys3/error_handler.rb', line 23

def self.check_aws_bucket_name()
  if !ENV["AWS_S3_REGION"] || ENV["AWS_S3_REGION"] == ""
    raise "AWS_S3_REGION=.. is missing in your .env file"
  end
end

.check_aws_regionObject



5
6
7
8
9
# File 'lib/easys3/error_handler.rb', line 5

def self.check_aws_region()
  if !ENV["AWS_S3_REGION"] || ENV["AWS_S3_REGION"] == ""
    raise "AWS_S3_REGION=... is missing in your .env file. Select your region from https://docs.aws.amazon.com/general/latest/gr/rande.html"
  end
end

.check_aws_secret_access_keyObject



17
18
19
20
21
# File 'lib/easys3/error_handler.rb', line 17

def self.check_aws_secret_access_key()
  if !ENV["AWS_SECRET_ACCESS_KEY"] || ENV["AWS_SECRET_ACCESS_KEY"] == ""
    raise "AWS_SECRET_ACCESS_KEY=... is missing in your .env file"
  end
end