Sha256: 4db21d7a0b635908eac0102d0bf2021776d747520eecebf767615ed2776255bb
Contents?: true
Size: 634 Bytes
Versions: 15
Compression:
Stored size: 634 Bytes
Contents
require 'fog' class Tasks::Toolbelt::Storage class << self PROVIDER = 'AWS' BUCKET = "quandl-command" def create(file_name, file_contents) puts "Storage.create #{BUCKET}/#{file_name}" directory.files.create( key: file_name, body: file_contents, public: true ) end def directory @directory ||= connection.directories.get(BUCKET) end def connection # create a connection @connection ||= Fog::Storage.new({ :provider => PROVIDER, :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'], :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'] }) end end end
Version data entries
15 entries across 15 versions & 1 rubygems