lib/s3repo/repo.rb in s3repo-0.0.1 vs lib/s3repo/repo.rb in s3repo-0.0.2

- old
+ new

@@ -7,19 +7,26 @@ package = Package.new(client: client, key: file) metadata.add_package(package) package end - def packages(cache = true) - @packages = nil unless cache + def packages @packages ||= parse_packages end + def serve(path, recheck = true) + cache.serve(path, recheck) + end + def metadata @metadata ||= Metadata.new(client: client) end private + + def cache + @cache ||= Cache.new(client: client, tmpdir: @options[:tmpdir]) + end def upload!(file) client.put_object( bucket: bucket, key: file,