Sha256: 16cf0d2ae3727e6cf29268087f9a19d81cc431a6aafe667f6023cdfa869f6ab9
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
require Gem::Specification.find_by_name("navi_client").gem_dir+"/lib/client" module NaviClient class Cloud include Client def initialize # flag to print Ruby library debug info (very detailed) @net_imap_debug = false # flag to mark email as read after gets downloaded. @mark_as_read = false # flag to turn on/off debug mode. @debug = false # override the log file mkdir_if_not_exist(config['client_log_file']) @logger = Logger.new(config['client_log_file']) # naviai command @cmd = 'naviai' # authentication token received from sso_web used to authenticate the request to database_api @token = nil end def download(message, custom_uid) download_path = config[:s3_download_folder] if ['text/plain', 'text/html'].include? message.mime_type h = Hash.new out_file = download_path + "/" + message.mime_type + "/"+custom_uid s3_filepath = upload_to_s3(out_file, encrypt(message.decoded)) key = message.mime_type.split("/").join("_") h[key] = s3_filepath return h end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
navi_client-1.0.1 | lib/cloud/navi_cloud_client.rb |