lib/s3repo/client.rb in s3repo-0.0.3 vs lib/s3repo/client.rb in s3repo-0.1.0
- old
+ new
@@ -11,9 +11,14 @@
def respond_to?(method, include_all = false)
@api.respond_to?(method, include_all) || super
end
+ def upload!(key, path)
+ puts "Uploading #{key}"
+ put_object key: key, body: File.open(path) { |fh| fh.read }
+ end
+
private
def method_missing(method, *args, &block)
return super unless @api.respond_to?(method)
define_singleton_method(method) do |*singleton_args|