Sha256: 6de807e5a657ad1a7170c113ef7b59ea44af6dfc12ab065a46ef06eac69e59e1
Contents?: true
Size: 785 Bytes
Versions: 3
Compression:
Stored size: 785 Bytes
Contents
require 'http_enabled' require 'api_auth' module SimpleWorker class Uploader < SimpleWorker::ApiAuth extend SimpleWorker::HttpEnabled def initialize(access_key, secret_key) super(access_key, secret_key) end # Options: # - :callback_url def put(filename, class_name, data={}) mystring = nil file = File.open(filename, "r") do |f| mystring = f.read end data = {"code"=>mystring, "class_name"=>class_name} puts "response=" + run_http(@access_key, @secret_key, :post, "code/put", nil, data) #puts "response=" + run_http(access_key, secret_key, :post, "queue/add", nil, data) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simple_worker-0.0.3 | lib/uploader.rb |
simple_worker-0.0.2 | lib/uploader.rb |
simple_worker-0.0.1 | lib/uploader.rb |