lib/s3repo/base.rb in s3repo-1.0.0 vs lib/s3repo/base.rb in s3repo-2.0.0

- old
+ new

@@ -11,25 +11,21 @@ private def run(cmd) results = `#{cmd} 2>&1` return results if $CHILD_STATUS.success? - fail "Failed running #{cmd}:\n#{results}" + raise "Failed running #{cmd}:\n#{results}" end def bucket - @bucket ||= @options[:bucket] || ENV['S3_BUCKET'] - return @bucket if @bucket - fail('No bucket given') + @options[:bucket] || raise('No bucket given') end def client - @client ||= @options[:client] || Client.new(bucket: bucket) + @options[:client] ||= Client.new(@options) end def file_cache - @file_cache ||= @options[:file_cache] || Cache.new( - client: client, tmpdir: @options[:tmpdir] - ) + @file_cache ||= @options[:file_cache] || Cache.new(@options) end end end