Skip to content

Commit

Permalink
require specific aws gems
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Zagaynov committed Oct 17, 2019
1 parent b6616cf commit 325d868
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/file_depot_s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def self.validate_settings(settings)
end

def connect(options = {})
require 'aws-sdk'
require 'aws-sdk-s3'

username = options[:username] || authentication_userid(options[:auth_type])
password = options[:password] || authentication_password(options[:auth_type])
# Note: The hard-coded aws_region will be removed after manageiq-ui-class implements region selection
Expand Down Expand Up @@ -62,7 +63,8 @@ def connection_rescue_block
end

def translate_exception(err)
require 'aws-sdk'
require 'aws-sdk-ec2'

case err
when Aws::EC2::Errors::SignatureDoesNotMatch
MiqException::MiqHostError.new("SignatureMismatch - check your AWS Secret Access Key and signing method")
Expand Down

0 comments on commit 325d868

Please sign in to comment.