lib/eco/api/session.rb in eco-helpers-1.0.10 vs lib/eco/api/session.rb in eco-helpers-1.0.11
- old
+ new
@@ -38,21 +38,19 @@
def do
@task
end
def mail_to(**kargs)
- @mailer ||= Eco::API::Common::Session::Mailer.new(enviro: enviro)
- @mailer.mail(**kargs)
+ mail.mail(**kargs)
end
def s3upload(content: nil, file: nil, directory: nil)
- @s3uploader ||= Eco::API::Common::Session::S3Uploader.new(enviro: enviro)
if content && file
- @s3uploader.upload(file, content)
+ s3uploader.upload(file, content)
elsif file
- @s3uploader.upload_file(file)
+ s3uploader.upload_file(file)
elsif directory
- @s3uploader.upload_directory(directory)
+ s3uploader.upload_directory(directory)
else
logger.error("To use Session.s3upload, you must specify either directory, file or content and file name")
end
end