README.md in evervault-0.1.3 vs README.md in evervault-1.0.0
- old
+ new
@@ -1,83 +1,96 @@
-# Evervault
-<p align="center">
- <img src="res/logo.svg">
-</p>
+[](https://evervault.com/)
-<p align="center">
- <a href="https://github.com/evervault/evervault-ruby/actions?query=workflow%3Aevervault-unit-tests"><img alt="Evervault unit tests status" src="https://github.com/evervault/evervault-ruby/workflows/evervault-unit-tests/badge.svg"></a>
-</p>
+[](https://github.com/evervault/evervault-ruby/actions?query=workflow%3Aevervault-unit-tests)
+# Evervault Ruby SDK
+The [Evervault](https://evervault.com) Ruby SDK is a toolkit for encrypting data as it enters your server, working with Cages, and proxying your outbound API requests to specific domains through [Outbound Relay](https://docs.evervault.com/concepts/relay/outbound-interception) to allow them to be decrypted before reaching their target.
+
## Getting Started
-Ruby SDK for [Evervault](https://evervault.com)
-### Prerequisites
-To get started with the Evervault Ruby SDK, you will need to have created a team on the Evervault dashboard.
+Before starting with the Evervault Ruby SDK, you will need to [create an account](https://app.evervault.com/register) and a team.
-We are currently in invite-only early access. You can apply for early access [here](https://evervault.com).
+For full installation support, [book time here](https://calendly.com/evervault/cages-onboarding).
+## Documentation
+
+See the Evervault [Ruby SDK documentation](https://docs.evervault.com/ruby).
+
## Installation
-Add this line to your application's Gemfile:
+There are two ways to install the Ruby SDK.
+#### 1. With Gemfile
+
+Add this line to your application's `Gemfile`:
+
```ruby
gem 'evervault'
```
-And then execute:
+Then, run:
+
```sh
- bundle install
+bundle install
```
-Or install it yourself as:
+#### 2. By yourself
+
+Just run:
+
```sh
- gem install evervault
+gem install evervault
```
## Setup
-Evervault can be initialized as a singleton throughout the lifecycle of your application.
+To make Evervault available for use in your app:
+
```ruby
require "evervault"
-# Initialize the client with your team's api key
+# Initialize the client with your team's API key
Evervault.api_key = <YOUR-API-KEY>
# Encrypt your data and run a cage
-result = Evervault.encrypt_and_run(<CAGE-NAME>, { hello: 'World!' })
+encrypted_data = Evervault.encrypt({ hello: 'World!' })
+
+# Process the encrypted data in a Cage
+result = Evervault.run(<CAGE-NAME>, encrypted_data)
```
-It's recommended to re-use your Evervault client, to prevent additional overhead of loading keys at runtime, so the singleton pattern should be the go-to pattern for most use-cases.
+## Reference
-However, if you'd prefer to initialize different clients at different times, for example, if you have multiple teams and need to switch context, you can simply create a client:
-```ruby
-require "evervault"
+The Evervault Ruby SDK exposes eight methods.
-# Initialize the client with your team's api key
-evervault = Evervault::Client.new(api_key: <YOUR-API-KEY>)
+### Evervault.encrypt
-# Encrypt your data and run a cage
-result = evervault.encrypt_and_run(<CAGE-NAME>, { hello: 'World!' })
+`Evervault.encrypt` encrypts data for use in your [Evervault Cages](https://docs.evervault.com/tutorial). To encrypt data on your server, simply pass a supported value into the `Evervault.encrypt` method and then you can store the encrypted data in your database as normal.
+
+```ruby
+Evervault.encrypt(data = String | Number | Boolean | Hash | Array)
```
-## API Reference
+| Parameter | Type | Description |
+| --------- | ---- | ----------- |
+| data | `String`, `Number`, `Boolean`, `Hash`, `Array` | Data to be encrypted |
-### Evervault.encrypt
+### Evervault.relay
-Encrypt lets you encrypt data for use in any of your Evervault Cages. You can use it to store encrypted data to be used in a Cage at another time.
+`Evervault.relay` specifies which domains should be proxied through outbound relay. See [Outbound Relay](https://docs.evervault.com/concepts/relay/outbound-interception) to learn more.
```ruby
-Evervault.encrypt(data = Hash | String)
+Evervault.relay(decryption_domains = Array)
```
| Parameter | Type | Description |
| --------- | ---- | ----------- |
-| data | Hash or String | Data to be encrypted |
+| decryption_domains | `Array` | Requests sent to any of the domains listed will be proxied through outbound relay |
### Evervault.run
-Run lets you invoke your Evervault Cages with a given payload.
+`Evervault.run` invokes a Cage with a given payload.
```ruby
Evervault.run(cage_name = String, data = Hash[, options = Hash])
```
@@ -218,11 +231,11 @@
### Evervault::Models::Cage.run
Each Cage model exposes a `run` method, which allows you to run that particular Cage.
-*Note*: this does not encrypt data before running the Cage
+*Note*: this does not encrypt data before running the Cage.
```ruby
cage = Evervault.cage_list.cages[0]
cage.run({'name': 'testing'})
=> {"result"=>{"message"=>"Hello, world!", "details"=>"Please send an encrypted `name` parameter to show cage decryption in action"}, "runId"=>"5428800061ff"}
```
@@ -240,9 +253,12 @@
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/evervault/evervault-ruby.
+## Feedback
+
+Questions or feedback? [Let us know](mailto:support@evervault.com).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).