Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/realestate-com-au/blobby
Various ways of storing BLOBs
https://github.com/realestate-com-au/blobby
Last synced: about 2 months ago
JSON representation
Various ways of storing BLOBs
- Host: GitHub
- URL: https://github.com/realestate-com-au/blobby
- Owner: realestate-com-au
- Created: 2015-06-15T12:23:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-01T23:45:52.000Z (almost 5 years ago)
- Last Synced: 2024-08-10T22:57:13.324Z (5 months ago)
- Language: Ruby
- Size: 38.1 KB
- Stars: 1
- Watchers: 20
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
Awesome Lists containing this project
README
# Blobby
[![Build Status](https://travis-ci.org/realestate-com-au/blobby.svg?branch=master)](https://travis-ci.org/realestate-com-au/blobby)
This gem provides a standard interface for storing big chunks of data.
## Usage
It supports popular BLOB operations such as reading:
store["key"].read
writing:
store["key"].write("some content")
store["key"].write(File.open("kitty.png"))checking for existance:
store["key"].exists?
and even deleting:
store["key"].delete
This gem provides several "store" implementations:
# on disk
Blobby::FilesystemStore.new("/big/data")# in memory
Blobby::InMemoryStore.new# generic HTTP
Blobby::HttpStore.new("http://attachment-store/objects")# fake success
Blobby::FakeSuccessStore.newOther gems provide additional implementations:
* ["blobby-s3"](https://github.com/realestate-com-au/blobby-s3)
`Blobby.store` provides a convenient way to construct an appropriate
implementation, given a URI (or psuedo-URI):Blobby.store("file:///tmp")
# => #Blobby.store("mem:")
# => #Blobby.store("http://storage.com/mystuff/")
# => #