secret_garden 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +23 -0
- data/lib/secret_garden/version.rb +1 -1
- data/lib/secret_garden.rb +4 -0
- 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: 5fd8b035c1e983a5197765165fbfa569c6d5afc8
|
|
4
|
+
data.tar.gz: 8324c7d980b1e747c8ae95e6a4b316bcdaba0f25
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c4d29092775b47efd8ae2da86793b5b9bc932fffa375ccc846a4d262e9e8dd1036173da8b36e6606bde6fc7be3da4d712ab90d3a4b8c179aff44eeb545eaddb7
|
|
7
|
+
data.tar.gz: 19d7393bc1eec088cd1dce7cfcb2f22b8f2be6bdfc49b3871182d4a5273e62d2f93819340d52cdc60252ec2f0f51a3e49bb428d751ae4ec5e161a19051f38a50
|
data/README.md
CHANGED
|
@@ -51,6 +51,29 @@ SecretGarden.add_backend :vault
|
|
|
51
51
|
s3 = AWS::S3.new access_key_id: SecretGarden.fetch('AWS_ACCESS_KEY_ID')
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
### In Rails
|
|
55
|
+
|
|
56
|
+
Your app may need certain environment variables that should fall back to being
|
|
57
|
+
read from vault if not set, such as DATABASE_URL. Simply modify
|
|
58
|
+
config/application.rb to pre-load them:
|
|
59
|
+
|
|
60
|
+
``` ruby
|
|
61
|
+
# config/application.rb
|
|
62
|
+
require File.expand_path('../boot', __FILE__)
|
|
63
|
+
require File.expand_path('../preinitialize', __FILE__)
|
|
64
|
+
|
|
65
|
+
require "rails"
|
|
66
|
+
# etc ...
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
``` ruby
|
|
70
|
+
# config/preinitialize.rb
|
|
71
|
+
require 'secret_garden'
|
|
72
|
+
require 'vault'
|
|
73
|
+
|
|
74
|
+
SecretGarden.export 'DATABASE_URL'
|
|
75
|
+
```
|
|
76
|
+
|
|
54
77
|
## Development
|
|
55
78
|
|
|
56
79
|
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.
|
data/lib/secret_garden.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: secret_garden
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Derek Kastner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|