README.md in voltos-0.3.0.rc14 vs README.md in voltos-0.3.0

- old
+ new

@@ -2,91 +2,105 @@ This gem provides Voltos Ruby bindings to access the Voltos API from apps written in Ruby. Voltos ([https://voltos.online](https://voltos.online)) provides credentials-as-a-service for app and system developers. 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 them & access to them. +## Contents +* [Installation](#installation) +* [Getting started](#getting-started) + ## Installation Add this line to your application's Gemfile: ```ruby -gem 'voltos' +gem 'voltos', '~> 0.3.0rc14' ``` And then execute: - $ bundle + $ bundle install Or install it yourself as: $ gem install voltos + +### Troubleshooting installation +**Ubuntu** + +You may need to install native extensions first: +``` +sudo apt-get install libcurl4-openssl-dev +``` + ## Getting started -You'll use Voltos to load up a **bundle** of credentials each time. Think of a bundle as credentials that have been logically grouped together, e.g. a ``PROD`` bundle. +### Sign up +``` +$ voltos signup +``` -1. Ensure your bundle(s) are organised how you want, on your Voltos account (https://voltos.online). +### Sign in +``` +$ voltos auth +``` -2. Find the API key for the bundle that you want your app to load (e.g. bundle ``PROD``'s API key: 13579def13579def) +### Create bundle of credentials +``` +$ voltos create piedpiper-backend +``` -2. Set this key as an environment variable in your app, e.g. - ```ruby - $ export VOLTOS_KEY=13579def13579def +### Add credentials to bundle +``` +## add to default bundle in use +$ voltos set MAILSERVICE=17263ed6547a7c7d8372 +$ voltos set DEV_URL=https://dev.piedpiper.io - # or on a platform like Heroku - $ heroku config:set VOLTOS_KEY=13579def13579def - ``` - In a moment, we'll use this key to load up the matching Voltos bundle of credentials (and don't worry, you'll only need to set one environment variable this way). +## or explicitly specify which bundle: +$ voltos set MAILSERVICE=17263ed6547a7c7d8372 piedpiper-backend +$ voltos set DEV_URL=https://dev.piedpiper.io piedpiper-backend +``` -3. Require the `voltos` gem early on, before you use the credentials: - ```ruby - require 'voltos' - - # Voltos will automatically load the bundle matching the key you've specified in VOLTOS_KEY - # and load those credentials into ENV, ready to use - - puts ENV['MY_SECRET_KEY'] - ``` +### List credentials in a bundle +``` +$ voltos list +``` -### Multiple bundles +### List all bundles of credentials that you can access +``` +$ voltos list --all +``` -Sometimes, you need to load up more than one bundle (e.g. you have ``DEV`` and ``PROD`` bundles to load when deploying on different environments). +### Share bundle of credentials +``` +$ voltos share sasha@hooli.com +``` -1. Get the respective API keys for those bundles (e.g. ``VOLTOS_COMMON`` and ``VOLTOS_PROD``). +### Unshare bundle of credentials +``` +$ voltos retract piedpiper-backend sasha@hooli.com +``` -2. Set environment variables for these bundle keys: - ```ruby - $ export VOLTOS_COMMON=1294854fe52417a - $ export VOLTOS_PROD=8646ec352729c3 - - # or on a platform like Heroku - $ heroku config:set VOLTOS_COMMON=1294854fe52417a VOLTOS_PROD=8646ec352729c3 - ``` +### Remove credentials +``` +$ voltos unset piedpiper-backend DEV_URL +``` -2. Manually load up each bundle of credentials at appropriate time for your app: - ```ruby - - ## environment.rb - load up COMMON bundle with credentials common to all environments - Voltos.configure do |config| - config.api_key = ENV["VOLTOS_COMMON"] - end - - voltos_creds = Voltos.load - voltos_creds.each do |key,val| - ENV[key] ||= val - end +### Destroy bundle of credentials +``` +$ voltos destroy piedpiper-backend +``` - ## production.rb - load up PROD bundle with credentials specific to prod environment - Voltos.configure do |config| - config.api_key = ENV["VOLTOS_PROD"] - end - - voltos_creds = Voltos.load - voltos_creds.each do |key,val| - ENV[key] ||= val - end - ``` +## Using Voltos with your apps + +When you're done loading up your bundles with credentials, you'll want to start using them with your apps. + +### Running locally + +### Deploying to Heroku + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/voltos-online/voltos-ruby