voltos 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +29 -62
- data/ext/extconf.rb +1 -1
- data/lib/voltos.rb +4 -3
- data/lib/voltos/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed8f656d733354596f0d82d4117f1e201153a3e8
|
4
|
+
data.tar.gz: c2d7a4663fd1c209e9c4bbf93104df4c4c1bf280
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1f5e93b48847116ddcc583a8658322d87c29d27f4da6677a0c1e5f8b58e5291e1cde5b27904ec86814fcdd4a3974d51dcef1ac18870ff5ea08cff765f71f9d1
|
7
|
+
data.tar.gz: 0741b133e4d3852880077b045d74e155362a15cdbdfc4ac82abb084d91da3843d3bad1cd8668bef7a1c7c86e2cb8a1cfe03b76bf8711136fed371c983b9c1f8c
|
data/README.md
CHANGED
@@ -1,19 +1,21 @@
|
|
1
1
|
# Voltos Ruby bindings
|
2
2
|
|
3
|
-
This gem provides Voltos Ruby bindings to access the Voltos API from apps written in Ruby. Voltos ([https://voltos.
|
3
|
+
This gem provides Voltos Ruby bindings to access the Voltos API from apps written in Ruby. Voltos ([https://voltos.io](https://voltos.io)) provides credentials-as-a-service for app and system developers.
|
4
4
|
|
5
|
-
Voltos stores your credentials (e.g. API keys, usernames, passwords, tokens) in a secure, central location - so that your apps can access them, and you can more easily manage
|
5
|
+
Voltos stores your credentials (e.g. API keys, usernames, passwords, tokens) in a secure, central location - so that your apps can access them securely as environment variables, and you can more easily manage & access them.
|
6
6
|
|
7
7
|
## Contents
|
8
8
|
* [Installation](#installation)
|
9
|
-
* [
|
9
|
+
* [Using Voltos](#using-voltos)
|
10
|
+
* [Deploying to Heroku](#deploying-to-heroku)
|
11
|
+
* [Contributing](#contributing)
|
10
12
|
|
11
13
|
## Installation
|
12
14
|
|
13
15
|
Add this line to your application's Gemfile:
|
14
16
|
|
15
17
|
```ruby
|
16
|
-
gem 'voltos'
|
18
|
+
gem 'voltos'
|
17
19
|
```
|
18
20
|
|
19
21
|
And then execute:
|
@@ -23,85 +25,50 @@ And then execute:
|
|
23
25
|
Or install it yourself as:
|
24
26
|
|
25
27
|
$ gem install voltos
|
26
|
-
|
28
|
+
|
27
29
|
### Troubleshooting installation
|
28
30
|
|
29
31
|
**Ubuntu**
|
30
32
|
|
31
33
|
You may need to install native extensions first:
|
32
|
-
```
|
33
|
-
sudo apt-get install libcurl4-openssl-dev
|
34
|
-
```
|
35
34
|
|
36
|
-
|
35
|
+
$ sudo apt-get install libcurl4-openssl-dev
|
37
36
|
|
38
|
-
|
39
|
-
|
40
|
-
$ voltos signup
|
41
|
-
```
|
42
|
-
|
43
|
-
### Sign in
|
44
|
-
```
|
45
|
-
$ voltos auth
|
46
|
-
```
|
47
|
-
|
48
|
-
### Create bundle of credentials
|
49
|
-
```
|
50
|
-
$ voltos create piedpiper-backend
|
51
|
-
```
|
52
|
-
|
53
|
-
### Add credentials to bundle
|
54
|
-
```
|
55
|
-
## add to default bundle in use
|
56
|
-
$ voltos set MAILSERVICE=17263ed6547a7c7d8372
|
57
|
-
$ voltos set DEV_URL=https://dev.piedpiper.io
|
37
|
+
## Using Voltos
|
38
|
+
Using Voltos to manage your credentials and secrets is generally the same across all platforms. Check out the general docs at:
|
58
39
|
|
59
|
-
|
60
|
-
|
61
|
-
$ voltos set DEV_URL=https://dev.piedpiper.io piedpiper-backend
|
62
|
-
```
|
40
|
+
* [Getting started](https://github.com/gluio/voltos-docs/blob/master/README.md#getting-started)
|
41
|
+
* [Using Voltos with your apps](https://github.com/gluio/voltos-docs/blob/master/README.md#using-voltos-with-your-apps)
|
63
42
|
|
64
|
-
### List credentials in a bundle
|
65
|
-
```
|
66
|
-
$ voltos list
|
67
|
-
```
|
68
43
|
|
69
|
-
|
70
|
-
|
71
|
-
$ voltos list --all
|
72
|
-
```
|
44
|
+
## Deploying to Heroku
|
45
|
+
Ensure your Heroku app is packaging the `voltos` gem in your Gemfile.
|
73
46
|
|
74
|
-
|
75
|
-
```
|
76
|
-
$ voltos share sasha@hooli.com
|
77
|
-
```
|
47
|
+
Update your `Procfile` to run your process using `voltos`
|
78
48
|
|
79
|
-
|
80
|
-
```
|
81
|
-
$ voltos retract piedpiper-backend sasha@hooli.com
|
82
|
-
```
|
49
|
+
web: voltos run "puma -C config/puma.rb"
|
83
50
|
|
84
|
-
|
85
|
-
```
|
86
|
-
$ voltos unset piedpiper-backend DEV_URL
|
87
|
-
```
|
51
|
+
Manually retrieve the API token for the selected bundle
|
88
52
|
|
89
|
-
|
90
|
-
|
91
|
-
$ voltos destroy piedpiper-backend
|
92
|
-
```
|
53
|
+
$ voltos use your-voltos-bundle
|
54
|
+
Setting current bundle in use to 'your-voltos-bundle'... ⣻
|
93
55
|
|
56
|
+
$ voltos token
|
57
|
+
Fetching token... ⣻
|
94
58
|
|
95
|
-
|
59
|
+
New API token for 'your-voltos-bundle' is: cbff7be5112287c39dad41c643761a84
|
60
|
+
Please store this securely, this is the only time it will be displayed and it can not be retrieved again
|
61
|
+
(though you can request a new one)
|
96
62
|
|
97
|
-
|
63
|
+
Then add the API token to the Heroku config variables for your app
|
98
64
|
|
99
|
-
|
65
|
+
$ heroku config:set VOLTOS_KEY=cbff7be5112287c39dad41c643761a84
|
100
66
|
|
101
|
-
|
67
|
+
On startup, `voltos` will securely retrieve your bundle's credentials and make them available to your app.
|
102
68
|
|
69
|
+
Anytime you need to update your credentials: do so via the CLI or web app, `heroku restart` your app, and the updated credentials are loaded up to your app again.
|
103
70
|
|
104
71
|
## Contributing
|
105
72
|
|
106
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
73
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/gluio/voltos-ruby
|
107
74
|
|
data/ext/extconf.rb
CHANGED
@@ -7,7 +7,7 @@ require 'zlib'
|
|
7
7
|
|
8
8
|
def download_binary(platform)
|
9
9
|
local_bin_path = File.expand_path("../exe")
|
10
|
-
latest_binary = "https://voltos.
|
10
|
+
latest_binary = "https://voltos.io/v1/download/#{platform}"
|
11
11
|
open(latest_binary) do |remote_file|
|
12
12
|
case platform
|
13
13
|
when :osx
|
data/lib/voltos.rb
CHANGED
@@ -15,7 +15,8 @@ module Voltos
|
|
15
15
|
|
16
16
|
def self.load
|
17
17
|
json_str = Curl.get("#{Voltos.configuration.api_url}/credentials") do |http|
|
18
|
-
http.headers[
|
18
|
+
http.headers['User-Agent'] = "Voltos-ruby/#{VERSION}"
|
19
|
+
http.headers['Authorization'] = "Token token=#{Voltos.configuration.api_key}"
|
19
20
|
end
|
20
21
|
data = JSON.parse(json_str.body_str)
|
21
22
|
if data.has_key?("status")
|
@@ -23,7 +24,7 @@ module Voltos
|
|
23
24
|
Voltos.configuration.status = Voltos.configuration.json_creds["status"]
|
24
25
|
Voltos.configuration.message = Voltos.configuration.json_creds["message"]
|
25
26
|
else
|
26
|
-
data.each do |key, val|
|
27
|
+
data['env'].each do |key, val|
|
27
28
|
ENV[key] ||= val
|
28
29
|
end
|
29
30
|
end
|
@@ -57,7 +58,7 @@ module Voltos
|
|
57
58
|
attr_accessor :message
|
58
59
|
|
59
60
|
def initialize
|
60
|
-
@api_url = ENV["VOLTOS_API_URL"] || "https://voltos.
|
61
|
+
@api_url = ENV["VOLTOS_API_URL"] || "https://voltos.io/v1"
|
61
62
|
@api_key = ENV["VOLTOS_KEY"]
|
62
63
|
end
|
63
64
|
end
|
data/lib/voltos/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voltos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel May
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|