evervault 2.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.changeset/config.json +15 -0
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/e2e.yml +25 -0
- data/.github/workflows/linters.yml +23 -0
- data/.github/workflows/release.yml +51 -32
- data/.github/workflows/run-tests.yml +5 -5
- data/.gitignore +7 -1
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +43 -0
- data/Gemfile +11 -8
- data/LICENSE.txt +1 -1
- data/README.md +1 -152
- data/Rakefile +21 -4
- data/bin/console +7 -4
- data/evervault.gemspec +18 -12
- data/lib/evervault/client.rb +66 -49
- data/lib/evervault/config.rb +17 -0
- data/lib/evervault/crypto/client.rb +151 -81
- data/lib/evervault/crypto/curves/base.rb +20 -10
- data/lib/evervault/crypto/curves/koblitz.rb +26 -0
- data/lib/evervault/crypto/curves/p256.rb +12 -9
- data/lib/evervault/errors/error_map.rb +24 -36
- data/lib/evervault/errors/errors.rb +15 -22
- data/lib/evervault/errors/legacy_error_map.rb +52 -0
- data/lib/evervault/http/relay_outbound_config.rb +25 -23
- data/lib/evervault/http/request.rb +26 -31
- data/lib/evervault/http/request_handler.rb +22 -25
- data/lib/evervault/http/request_intercept.rb +39 -42
- data/lib/evervault/threading/repeated_timer.rb +12 -10
- data/lib/evervault/utils/validation_utils.rb +17 -18
- data/lib/evervault/version.rb +4 -2
- data/lib/evervault.rb +35 -19
- data/package.json +11 -0
- metadata +66 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a38c1eb9f440a16bb8c846d10336b8a394a47bf10cafb4e269a2f69f10cd687f
|
4
|
+
data.tar.gz: 53c2a6ebd6e25749e428b6ae04515cd9ceb8bb3140f65f5850c7dbd604189a81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6809469590bc323deb1b25c5605e465d4f2e90adfc21d9855236c2d43b1ae468452279bb81aa60a087b65291d8e2b9a755a5aa57ae4495591784771dfb8ff000
|
7
|
+
data.tar.gz: 7d4cfa9cd38b54115b4b6dd5fd2caaa2ff696015ea3ec40543da42391a1c3437da9cdcf99f1b93177b5a5142e93c7f0abec15e93e52a77afb415075579e8a43d
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
4
|
+
"commit": false,
|
5
|
+
"fixed": [],
|
6
|
+
"linked": [],
|
7
|
+
"access": "restricted",
|
8
|
+
"baseBranch": "master",
|
9
|
+
"updateInternalDependencies": "patch",
|
10
|
+
"ignore": [],
|
11
|
+
"privatePackages": {
|
12
|
+
"version": true,
|
13
|
+
"tag": true
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: evervault-e2e-tests
|
2
|
+
on: [push]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
test:
|
6
|
+
strategy:
|
7
|
+
fail-fast: false
|
8
|
+
matrix:
|
9
|
+
os: [ubuntu]
|
10
|
+
ruby: [3.0, 3.1, 3.2]
|
11
|
+
runs-on: ${{ matrix.os }}-latest
|
12
|
+
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: ${{ matrix.ruby }}
|
18
|
+
- run: bundle install
|
19
|
+
- run: bundle exec rake e2e_tests
|
20
|
+
env:
|
21
|
+
EVERVAULT_APP_UUID: ${{ secrets.EV_APP_UUID }}
|
22
|
+
EVERVAULT_API_KEY: ${{ secrets.EV_API_KEY }}
|
23
|
+
EVERVAULT_FUNCTION_NAME: ${{ secrets.EV_FUNCTION_NAME }}
|
24
|
+
EVERVAULT_INITIALIZATION_ERROR_FUNCTION_NAME: ${{ secrets.EV_INITIALIZATION_ERROR_FUNCTION_NAME }}
|
25
|
+
EVERVAULT_SYNTHETIC_ENDPOINT_URL: ${{ secrets.EVERVAULT_SYNTHETIC_ENDPOINT_URL }}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Linters
|
2
|
+
on:
|
3
|
+
- pull_request
|
4
|
+
jobs:
|
5
|
+
lint:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
steps:
|
8
|
+
- uses: actions/checkout@v2
|
9
|
+
- name: Set up Ruby 3.3
|
10
|
+
uses: ruby/setup-ruby@v1
|
11
|
+
with:
|
12
|
+
ruby-version: 3.3
|
13
|
+
- name: Cache gems
|
14
|
+
uses: actions/cache@v1
|
15
|
+
with:
|
16
|
+
path: vendor/bundle
|
17
|
+
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
|
18
|
+
restore-keys: |
|
19
|
+
${{ runner.os }}-rubocop-
|
20
|
+
- name: Install gems
|
21
|
+
run: bundle install --jobs 4 --retry 3
|
22
|
+
- name: Run RuboCop
|
23
|
+
run: bundle exec rubocop --parallel --only Layout
|
@@ -1,39 +1,58 @@
|
|
1
|
-
name:
|
2
|
-
|
1
|
+
name: Release
|
3
2
|
on:
|
4
3
|
push:
|
5
|
-
|
6
|
-
-
|
7
|
-
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
- main
|
8
7
|
jobs:
|
9
|
-
|
10
|
-
strategy:
|
11
|
-
fail-fast: false
|
12
|
-
matrix:
|
13
|
-
os: [ubuntu, macos]
|
14
|
-
ruby: [2.6, 2.7, 3.1, truffleruby]
|
15
|
-
runs-on: ${{ matrix.os }}-latest
|
16
|
-
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
17
|
-
steps:
|
18
|
-
- uses: actions/checkout@v2
|
19
|
-
- uses: ruby/setup-ruby@v1
|
20
|
-
with:
|
21
|
-
ruby-version: ${{ matrix.ruby }}
|
22
|
-
- run: bundle install
|
23
|
-
- run: bundle exec rake
|
24
|
-
|
25
|
-
build:
|
8
|
+
release:
|
26
9
|
runs-on: ubuntu-latest
|
27
|
-
needs: test
|
28
|
-
|
29
10
|
steps:
|
30
|
-
-
|
31
|
-
|
11
|
+
- name: Checkout code
|
12
|
+
uses: actions/checkout@v2
|
13
|
+
with:
|
14
|
+
fetch-depth: 0
|
15
|
+
token: ${{ secrets.GH_TOKEN }}
|
16
|
+
- name: Get tags
|
17
|
+
run: git fetch --tags origin
|
18
|
+
- name: Install Node Dependencies
|
19
|
+
run: npm install
|
20
|
+
- name: Setup Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
32
22
|
with:
|
33
|
-
ruby-version:
|
34
|
-
- name: Release
|
35
|
-
|
36
|
-
|
23
|
+
ruby-version: 3.0
|
24
|
+
- name: Create Release Pull Request
|
25
|
+
id: changesets
|
26
|
+
uses: changesets/action@v1
|
27
|
+
with:
|
28
|
+
title: 'New Release'
|
29
|
+
commit: 'Release new version'
|
30
|
+
version: npm run version
|
31
|
+
env:
|
32
|
+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
33
|
+
- name: Create new release
|
34
|
+
if: steps.changesets.outputs.hasChangesets == 'false'
|
35
|
+
run: |
|
36
|
+
npx changeset tag && git push origin --tags
|
37
|
+
COMMIT_TAG=$(git tag --points-at HEAD)
|
38
|
+
if [ -n "$COMMIT_TAG" ]; then
|
39
|
+
echo "A tag is attached to HEAD. Creating a new release..."
|
40
|
+
echo "${{ secrets.GH_TOKEN }}" | gh auth login --with-token
|
41
|
+
CHANGELOG=$(awk '
|
42
|
+
BEGIN { recording=0; }
|
43
|
+
/^## / {
|
44
|
+
if(recording) { exit; }
|
45
|
+
recording=1;
|
46
|
+
next;
|
47
|
+
}
|
48
|
+
recording {
|
49
|
+
print;
|
50
|
+
}
|
51
|
+
' CHANGELOG.md)
|
52
|
+
gh release create $COMMIT_TAG -t "$COMMIT_TAG" -n "$CHANGELOG"
|
53
|
+
sh ./scripts/release.sh
|
54
|
+
else
|
55
|
+
echo "No tag attached to HEAD. No new release needed."
|
56
|
+
fi
|
37
57
|
env:
|
38
|
-
|
39
|
-
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
58
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
@@ -1,19 +1,19 @@
|
|
1
1
|
name: evervault-unit-tests
|
2
2
|
on: [push]
|
3
|
-
|
4
3
|
jobs:
|
5
4
|
test:
|
6
5
|
strategy:
|
7
6
|
fail-fast: false
|
8
7
|
matrix:
|
9
|
-
os: [ubuntu
|
10
|
-
ruby: [
|
8
|
+
os: [ubuntu]
|
9
|
+
ruby: [3.0, 3.1, 3.2]
|
11
10
|
runs-on: ${{ matrix.os }}-latest
|
12
|
-
continue-on-error:
|
11
|
+
continue-on-error:
|
12
|
+
${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
13
13
|
steps:
|
14
14
|
- uses: actions/checkout@v2
|
15
15
|
- uses: ruby/setup-ruby@v1
|
16
16
|
with:
|
17
17
|
ruby-version: ${{ matrix.ruby }}
|
18
18
|
- run: bundle install
|
19
|
-
- run: bundle exec rake
|
19
|
+
- run: bundle exec rake unit_tests
|
data/.gitignore
CHANGED
@@ -10,6 +10,7 @@ Gemfile.lock
|
|
10
10
|
|
11
11
|
# rspec failure tracking
|
12
12
|
.rspec_status
|
13
|
+
.rspec_status_e2e
|
13
14
|
|
14
15
|
# rbenv
|
15
16
|
.ruby_version
|
@@ -18,4 +19,9 @@ Gemfile.lock
|
|
18
19
|
.idea/
|
19
20
|
|
20
21
|
# VSCode
|
21
|
-
.vscode/
|
22
|
+
.vscode/
|
23
|
+
|
24
|
+
# node_modules
|
25
|
+
/node_modules/
|
26
|
+
package-lock.json
|
27
|
+
.env
|
data/.rubocop.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# evervault-ruby
|
2
|
+
|
3
|
+
## 3.0.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 55a80b9: tidy up string encryption
|
8
|
+
- 55a80b9: Improved API for configuring the Evervault::Client.
|
9
|
+
|
10
|
+
Previously there was no way to set the curve used for encryption. This can now
|
11
|
+
be configured via the .configure method.
|
12
|
+
|
13
|
+
```
|
14
|
+
Evervault.configure do |config|
|
15
|
+
config.curve = "secp256k1"
|
16
|
+
end
|
17
|
+
```
|
18
|
+
|
19
|
+
## 3.0.0
|
20
|
+
|
21
|
+
### Major Changes
|
22
|
+
|
23
|
+
- f4d3d01: Simplifying errors thrown by the SDK.
|
24
|
+
|
25
|
+
Previously we exposed many different error types for users to handle, but in most cases these errors were not something that could be caught and handled, but were rather indicative of a larger configuration issue. This change simplifies the errors thrown by returning an EvervaultError with accompanying error message by default, unless they are a transient error which can be handled programmatically, in which case a specific error is returned.
|
26
|
+
|
27
|
+
- dd84f66: We have dropped support for Ruby 2.6 and 2.7 as they are now both in end of life status.
|
28
|
+
See more: https://www.ruby-lang.org/en/downloads/branches
|
29
|
+
- b2188aa: Migrated Function run requests to new API.
|
30
|
+
|
31
|
+
We have released a new API for Function run requests which is more robust, more extensible, and which provides more useful error messages when Function runs fail. In addition, we have removed async Function run requests and specifying the version of the Function to run. For more details check out https://docs.evervault.com/sdks/ruby#run()
|
32
|
+
|
33
|
+
### Minor Changes
|
34
|
+
|
35
|
+
- b7f5c1a: The `encrypt` function has been enhanced to accept an optional Data Role.
|
36
|
+
|
37
|
+
This role, once specified, is associated with the data upon encryption. Data Roles can be created in the Evervault Dashboard (Data Roles section) and provide a mechanism for setting clear rules that dictate how and when data, tagged with that role, can be decrypted. For more details check out https://docs.evervault.com/sdks/ruby#encrypt()
|
38
|
+
|
39
|
+
Evervault.encrypt("hello world!", "allow-all");
|
40
|
+
|
41
|
+
### Patch Changes
|
42
|
+
|
43
|
+
- 7d91003: Add Faraday as a gem dependency
|
data/Gemfile
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
# Specify your gem's dependencies in evervault.gemspec
|
4
6
|
gemspec
|
5
7
|
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem
|
11
|
-
gem
|
12
|
-
gem
|
8
|
+
gem 'faraday'
|
9
|
+
gem 'gem-release'
|
10
|
+
gem 'pry'
|
11
|
+
gem 'rake', '~> 12.0'
|
12
|
+
gem 'rexml'
|
13
|
+
gem 'rspec', '~> 3.0'
|
14
|
+
gem 'rubocop', require: false
|
15
|
+
gem 'webmock'
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -4,158 +4,7 @@
|
|
4
4
|
|
5
5
|
# Evervault Ruby SDK
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
## Getting Started
|
10
|
-
|
11
|
-
Before starting with the Evervault Ruby SDK, you will need to [create an account](https://app.evervault.com/register) and a team.
|
12
|
-
|
13
|
-
For full installation support, [book time here](https://calendly.com/evervault/support).
|
14
|
-
|
15
|
-
## Documentation
|
16
|
-
|
17
|
-
See the Evervault [Ruby SDK documentation](https://docs.evervault.com/reference/ruby-sdk).
|
18
|
-
|
19
|
-
## Installation
|
20
|
-
|
21
|
-
There are two ways to install the Ruby SDK.
|
22
|
-
|
23
|
-
#### 1. With Gemfile
|
24
|
-
|
25
|
-
Add this line to your application's `Gemfile`:
|
26
|
-
|
27
|
-
```ruby
|
28
|
-
gem 'evervault'
|
29
|
-
```
|
30
|
-
|
31
|
-
Then, run:
|
32
|
-
|
33
|
-
```sh
|
34
|
-
bundle install
|
35
|
-
```
|
36
|
-
#### 2. By yourself
|
37
|
-
|
38
|
-
Just run:
|
39
|
-
|
40
|
-
```sh
|
41
|
-
gem install evervault
|
42
|
-
```
|
43
|
-
|
44
|
-
## Setup
|
45
|
-
|
46
|
-
To make Evervault available for use in your app:
|
47
|
-
|
48
|
-
```ruby
|
49
|
-
require "evervault"
|
50
|
-
|
51
|
-
# Initialize the client with your App's ID and App's API key
|
52
|
-
Evervault.app_id = <YOUR-APP-ID>
|
53
|
-
Evervault.api_key = <YOUR-API-KEY>
|
54
|
-
|
55
|
-
# Encrypt your data
|
56
|
-
encrypted_data = Evervault.encrypt('Hello World!')
|
57
|
-
|
58
|
-
# Decrypt your data
|
59
|
-
decrypted = Evervault.decrypt(encrypted_data)
|
60
|
-
|
61
|
-
# Process the encrypted data using a Function
|
62
|
-
result = Evervault.run(<FUNCTION-NAME>, encrypted_data)
|
63
|
-
|
64
|
-
# Send the decrypted data to a third-party API
|
65
|
-
Evervault.enable_outbound_relay
|
66
|
-
uri = URI('https://example.com')
|
67
|
-
req = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')
|
68
|
-
req.body = encrypted_data.to_json
|
69
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
70
|
-
http.use_ssl = true
|
71
|
-
res = http.request(req)
|
72
|
-
|
73
|
-
```
|
74
|
-
|
75
|
-
## Reference
|
76
|
-
|
77
|
-
The Evervault Ruby SDK exposes four methods.
|
78
|
-
|
79
|
-
### Evervault.encrypt
|
80
|
-
|
81
|
-
`Evervault.encrypt` encrypts data for use in your [Evervault Functions](https://docs.evervault.com/concepts/functions/overview). 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.
|
82
|
-
|
83
|
-
```ruby
|
84
|
-
Evervault.encrypt(data = String | Number | Boolean | Hash | Array)
|
85
|
-
```
|
86
|
-
|
87
|
-
| Parameter | Type | Description |
|
88
|
-
| --------- | ---------------------------------------------- | -------------------- |
|
89
|
-
| data | `String`, `Number`, `Boolean`, `Hash`, `Array` | Data to be encrypted |
|
90
|
-
|
91
|
-
### Evervault.decrypt
|
92
|
-
|
93
|
-
`Evervault.decrypt` decrypts data previously encrypted with the `encrypt()` function or through Evervault's Relay (Evervault's encryption proxy).
|
94
|
-
An API Key with the `decrypt` permission must be used to perform this operation.
|
95
|
-
|
96
|
-
```ruby
|
97
|
-
Evervault.decrypt(data = String | Array | Hash)
|
98
|
-
```
|
99
|
-
|
100
|
-
| Parameter | Type | Description |
|
101
|
-
| --------- | ------------------------- | -------------------- |
|
102
|
-
| data | `String`, `Array`, `Hash` | Data to be decrypted |
|
103
|
-
|
104
|
-
### Evervault.enable_outbound_relay
|
105
|
-
|
106
|
-
`Evervault.enable_outbound_relay` configures your application to proxy HTTP requests using Outbound Relay based on the configuration created in the Evervault UI. See [Outbound Relay](https://docs.evervault.com/concepts/outbound-relay/overview) to learn more.
|
107
|
-
|
108
|
-
```ruby
|
109
|
-
Evervault.enable_outbound_relay([decryption_domains = Array])
|
110
|
-
```
|
111
|
-
|
112
|
-
| Parameter | Type | Description |
|
113
|
-
| --------- | ---- | ----------- |
|
114
|
-
| decryption_domains | `Array` | Optional -- Requests sent to any of the domains listed will be proxied through Outbound Relay. This will override the configuration created using the Evervault UI. |
|
115
|
-
|
116
|
-
### Evervault.run
|
117
|
-
|
118
|
-
`Evervault.run` invokes a Function with a given payload.
|
119
|
-
An API Key with the `run Function` permission must be used to perform this operation.
|
120
|
-
|
121
|
-
```ruby
|
122
|
-
Evervault.run(function_name = String, data = Hash[, options = Hash])
|
123
|
-
```
|
124
|
-
|
125
|
-
| Parameter | Type | Description |
|
126
|
-
| --------- | ---- | ----------- |
|
127
|
-
| function_name | String | Name of the Function to be run |
|
128
|
-
| data | Hash | Payload for the Function |
|
129
|
-
| options | Hash | [Options for the Function run](#Function-Run-Options) |
|
130
|
-
|
131
|
-
#### Function Run Options
|
132
|
-
|
133
|
-
| Option | Type | Default | Description |
|
134
|
-
| ------ | ---- | ------- | ----------- |
|
135
|
-
| `async` | `Boolean` | `false` | Run your Function in async mode. Async Function runs will be queued for processing. |
|
136
|
-
| `version` | `Integer` | `nil` | Specify the version of your Function to run. By default, the latest version will be run. |
|
137
|
-
|
138
|
-
### Evervault.create_run_token
|
139
|
-
|
140
|
-
`Evervault.create_run_token` creates a single use, time bound token for invoking a Function.
|
141
|
-
An API Key with the `create Run Token` permission must be used to perform this operation.
|
142
|
-
|
143
|
-
```ruby
|
144
|
-
Evervault.create_run_token(function_name = String, data = Hash)
|
145
|
-
```
|
146
|
-
|
147
|
-
| Parameter | Type | Description |
|
148
|
-
| --------- | ------ | ---------------------------------------------------- |
|
149
|
-
| function_name | String | Name of the Function the run token should be created for |
|
150
|
-
| data | Hash | Payload that the token can be used with |
|
151
|
-
|
152
|
-
## Development
|
153
|
-
|
154
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
155
|
-
|
156
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
157
|
-
|
158
|
-
[Rbenv](https://github.com/rbenv/rbenv) can also be used to install specific versions of Ruby.
|
7
|
+
See the Evervault [Ruby SDK documentation](https://docs.evervault.com/sdks/ruby) to learn how to install, set up, and use the SDK.
|
159
8
|
|
160
9
|
## Contributing
|
161
10
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,23 @@
|
|
1
|
-
|
2
|
-
require "rspec/core/rake_task"
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
5
|
|
6
|
-
task :
|
6
|
+
task :e2e_tests do
|
7
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
8
|
+
t.pattern = 'spec/e2e/*_spec.rb'
|
9
|
+
end
|
10
|
+
Rake::Task['spec'].execute
|
11
|
+
end
|
12
|
+
|
13
|
+
task :unit_tests do
|
14
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
15
|
+
t.pattern = 'spec/evervault_spec.rb, spec/evervault/**/*_spec.rb'
|
16
|
+
end
|
17
|
+
Rake::Task['spec'].execute
|
18
|
+
end
|
19
|
+
|
20
|
+
task :default do
|
21
|
+
RSpec::Core::RakeTask.new(:spec)
|
22
|
+
Rake::Task['spec'].execute
|
23
|
+
end
|
data/bin/console
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
|
5
|
-
|
4
|
+
require 'dotenv'
|
5
|
+
Dotenv.load
|
6
|
+
|
7
|
+
require 'bundler/setup'
|
8
|
+
require 'evervault'
|
9
|
+
require 'pry'
|
6
10
|
|
7
11
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
12
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -11,5 +15,4 @@ require "pry"
|
|
11
15
|
# require "pry"
|
12
16
|
# Pry.start
|
13
17
|
|
14
|
-
require "pry"
|
15
18
|
Pry.start
|
data/evervault.gemspec
CHANGED
@@ -1,25 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'lib/evervault/version'
|
2
4
|
|
3
5
|
Gem::Specification.new do |spec|
|
4
|
-
spec.name =
|
6
|
+
spec.name = 'evervault'
|
5
7
|
spec.version = Evervault::VERSION
|
6
|
-
spec.authors = [
|
7
|
-
spec.email =
|
8
|
+
spec.authors = ['Evervault']
|
9
|
+
spec.email = 'support@evervault.com'
|
10
|
+
spec.summary = 'Ruby SDK to run Evervault'
|
11
|
+
spec.homepage = 'https://evervault.com'
|
12
|
+
spec.license = 'MIT'
|
13
|
+
spec.required_ruby_version = '>= 3.0.0'
|
8
14
|
|
9
|
-
spec.
|
10
|
-
spec.
|
11
|
-
spec.license = "MIT"
|
12
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
15
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
16
|
+
spec.metadata['source_code_uri'] = 'https://github.com/evervault/evervault-ruby'
|
13
17
|
|
14
|
-
spec.
|
15
|
-
spec.metadata["source_code_uri"] = "https://github.com/evervault/evervault-ruby"
|
18
|
+
spec.add_dependency 'faraday', ['>= 2.0', '< 3.0']
|
16
19
|
|
17
20
|
# Specify which files should be added to the gem when it is released.
|
18
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
-
spec.files
|
22
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
23
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
24
|
end
|
22
|
-
spec.bindir =
|
25
|
+
spec.bindir = 'exe'
|
23
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
-
spec.require_paths = [
|
27
|
+
spec.require_paths = ['lib']
|
28
|
+
|
29
|
+
spec.add_development_dependency 'dotenv'
|
30
|
+
spec.add_development_dependency 'simplecov'
|
25
31
|
end
|