README.md in activestorage-horcrux-0.0.2 vs README.md in activestorage-horcrux-0.0.3
- old
+ new
@@ -1,11 +1,12 @@
[![Build Status](https://travis-ci.org/johncallahan/activestorage-horcrux.svg?branch=master)](https://travis-ci.org/johncallahan/activestorage-horcrux)
-An ActiveStorage gem that uploads across one or more other
-ActiveStorage services using Shamir Secret Sharing (via the [tss-rb
-gem](https://github.com/grempe/tss-rb)). Use it in your storage.yml
-file. It is not a mirror, but can be named as a storage service.
+An ActiveStorage service option that uploads shares *across* one or
+more other storage services using Shamir Secret Sharing (via the
+[tss-rb gem](https://github.com/grempe/tss-rb)). Use it in your
+storage.yml file. It is not a mirror, but can be named as a storage
+service.
```ruby
# in storage.yml
disk1:
service: Disk
@@ -17,19 +18,48 @@
horcrux:
service: Horcrux
shares: 5
threshold: 3
+ prefix: true
services: [ disk1, disk2 ]
```
-Configuration elements:
+# Configuration elements:
* service: name of the service
-* shares: specified the number of shares split across services.
-* threshold: specifies the _minimum_ number of shares are needed to
-reconstruct the contents.
+* shares: (integer) specified the number of shares split across services.
+* threshold: (integer) specifies the _minimum_ number of shares are needed to reconstruct the contents.
+* prefix: (boolean) prefix the key with the name of the service
* services: one or more other ActiveStorage services in storage.yml
-Instead of a single key, an array of keys is passed to the upload
-function. The array of keys is not persisted and can be shown to the
-user for subsequent downloads.
+After upload, the blob key is replaced with a comma-separated list of
+keys for each shard. You can retrieve the blob key(s) and then
+replace it to hide the share keys (but remember to save them
+someplace!). Later, you can change the key(s) back again and download
+the attachment shares (using at least threshold number of keys).
+
+# Demo
+
+Compatible with the [lockbox gem](https://github.com/ankane/lockbox). See this [demo example](https://github.com/johncallahan/activestorage-horcrux-example).
+
+# Testing
+
+```shell
+% rspec
+```
+
+# Development
+
+Bump the version in lib/active_storage/service/version.rb and then
+
+```shell
+% bundle
+% gem build activestorage-horcrux
+% gem push activestorage-horcrux-0.0.x.gem
+```
+
+# To-do/Issues
+
+* using Tempfile for passing back keys (yuck)
+* size limitations (by the tss-rb gem)
+* intercept and convert TSS errors to gem-specific errors