configuration_service-provider-vault 2.0.18 → 2.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +3 -3
- data/.travis.yml +3 -3
- data/README.md +1 -65
- data/README.rdoc +1 -1
- data/lib/configuration_service/provider/vault/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da701529c748cdc62dd436a60a5fccf2903cd273
|
4
|
+
data.tar.gz: 13a505cb6b5de0c02fc6cc744d9c7a209deb803e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0248fc0cfa1f2bf515aa8f38085d1962814545e1ca7d22c1283d75b9be3a9a798983b09ee181039b87bf7ce768d3ff2828455477db8e01aa5255aa282f091070
|
7
|
+
data.tar.gz: c2d1e8f837fc45bfaf13b8fd2e29f922f35a194fd0328ddf0eb9a90fe65f25d3655a80d367b9137594b2fd7a1b4d87b2ed14c39b1bd375a7413e65f479d1be68
|
data/.gemspec
CHANGED
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 2.
|
21
|
+
spec.required_ruby_version = '>= 2.1'
|
22
22
|
|
23
23
|
spec.add_dependency "vault", "~> 0.4"
|
24
|
-
spec.add_dependency "configuration_service", "~> 2.
|
24
|
+
spec.add_dependency "configuration_service", "~> 2.3.0"
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.7"
|
26
|
-
spec.add_development_dependency "rake", "~>
|
26
|
+
spec.add_development_dependency "rake", "~> 11.1"
|
27
27
|
spec.add_development_dependency "cucumber", "~> 2.0"
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.4"
|
29
29
|
end
|
data/.travis.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
language: c
|
3
3
|
env:
|
4
|
-
- TRUBY=ruby-2.
|
4
|
+
- TRUBY=ruby-2.1.5 OPENSSL=openssl-1.0.1k
|
5
5
|
- TRUBY=ruby-2.3.0 OPENSSL=openssl-1.0.2f
|
6
6
|
- TRUBY=jruby-9.0.0.0 OPENSSL=none
|
7
7
|
- TRUBY=jruby-9.0.4.0 OPENSSL=none
|
@@ -14,8 +14,8 @@ install:
|
|
14
14
|
- (cd chruby && sudo ./scripts/setup.sh)
|
15
15
|
- chruby-exec ${TRUBY} -- ruby --version
|
16
16
|
- chruby-exec ${TRUBY} -- gem install --no-ri --no-rdoc bundler
|
17
|
-
- curl -O https://releases.hashicorp.com/vault/0.
|
18
|
-
- sudo unzip vault_0.
|
17
|
+
- curl -O https://releases.hashicorp.com/vault/0.5.3/vault_0.5.3_linux_amd64.zip
|
18
|
+
- sudo unzip vault_0.5.3_linux_amd64.zip -d /usr/local/bin
|
19
19
|
script:
|
20
20
|
- chruby-exec ${TRUBY} -- ruby --version
|
21
21
|
- chruby-exec ${TRUBY} -- bundle
|
data/README.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
A [HashiCorp Vault](https://vaultproject.io) service provider
|
6
6
|
for the Ruby [ConfigurationService API](https://github.com/hetznerZA/configuration_service).
|
7
7
|
|
8
|
-
|
9
8
|
## Documentation
|
10
9
|
|
11
10
|
For documentation of the released gem, see [rubydoc.info](http://www.rubydoc.info/gems/configuration_service-provider-vault).
|
@@ -14,7 +13,7 @@ For documentation of the released gem, see [rubydoc.info](http://www.rubydoc.inf
|
|
14
13
|
|
15
14
|
The following are the minimum versions of Ruby tested to work:
|
16
15
|
|
17
|
-
* MRI ruby-2.
|
16
|
+
* MRI ruby-2.1.0 with openssl-1.0.1d or later
|
18
17
|
* jruby-9.0.0.0 with jruby-openssl-0.9.7
|
19
18
|
|
20
19
|
At the time of writing, some Linux distributions, OSX and several old binary rubies used by rvm,
|
@@ -37,66 +36,3 @@ bundle exec rake
|
|
37
36
|
Note that the tests use cucumber features and support files from the `configuration_service` gem;
|
38
37
|
do not be surprised when you find no feature files in the `features` subdirectory of this repo.
|
39
38
|
|
40
|
-
## Usage
|
41
|
-
|
42
|
-
The recommended approach to creating a configuration service client is to use a factory
|
43
|
-
from the [configuration_service](https://rubygems.org/gems/configuration_service) gem.
|
44
|
-
See the documentation for ConfigurationService::Factory.
|
45
|
-
|
46
|
-
For example, we can use the factory to create and configure a configuration service client
|
47
|
-
backed by the vault provider as follows.
|
48
|
-
|
49
|
-
Our `main.rb` (or `config.ru` or whatever) is simple:
|
50
|
-
|
51
|
-
```ruby
|
52
|
-
require 'bundler'
|
53
|
-
Bundler.require(:default)
|
54
|
-
|
55
|
-
service = ConfigurationService::Factory.create_client
|
56
|
-
configuraton = service.request_configuration
|
57
|
-
AcmeApplication.new(configuration.data).run
|
58
|
-
```
|
59
|
-
|
60
|
-
This relies on a [bundler](http://bundler.io) Gemfile to provide the
|
61
|
-
configuration\_service-provider-vault gem:
|
62
|
-
|
63
|
-
```ruby
|
64
|
-
source 'https://rubygems.org'
|
65
|
-
|
66
|
-
gem 'configuration_service-provider-vault'
|
67
|
-
gem 'acme_application'
|
68
|
-
```
|
69
|
-
|
70
|
-
Now we use the process environment to configure the EnvironmentContext used by the factory:
|
71
|
-
|
72
|
-
```shell
|
73
|
-
CFGSRV_IDENTIFIER="acme" \
|
74
|
-
CFGSRV_TOKEN="0b2a80f4-54ce-45f4-8267-f6558fee64af" \
|
75
|
-
CFGSRV_PROVIDER="vault" \
|
76
|
-
CFGSRV_PROVIDER_ADDRESS="http://127.0.0.1:8200" \
|
77
|
-
bundle exec main.rb
|
78
|
-
```
|
79
|
-
|
80
|
-
Note that `main.rb` is completely decoupled from the selection of provider and
|
81
|
-
provider configuration. We could swap and/or reconfigure the provider by
|
82
|
-
manipulating only the Gemfile and the environment.
|
83
|
-
|
84
|
-
If you insist on hard-coding everything, or if your strategy for bootstrapping
|
85
|
-
the configuration service isn't expressed by an existing factory yet, you can
|
86
|
-
construct the service yourself:
|
87
|
-
|
88
|
-
```ruby
|
89
|
-
# Bad example
|
90
|
-
|
91
|
-
require 'configuration_service/provider/vault'
|
92
|
-
require 'acme_application'
|
93
|
-
|
94
|
-
service = ConfigurationService.new(
|
95
|
-
"acme",
|
96
|
-
"0b2a80f4-54ce-45f4-8267-f6558fee64af",
|
97
|
-
ConfigurationService::Provider::Vault.new(
|
98
|
-
address: "http://127.0.0.1:8200"
|
99
|
-
)
|
100
|
-
)
|
101
|
-
configuraton = service.request_configuration
|
102
|
-
AcmeApplication.new(configuration.data).run
|
data/README.rdoc
CHANGED
@@ -50,7 +50,7 @@ We could swap out the Vault provider for some other provider by manipulating onl
|
|
50
50
|
|
51
51
|
The following are the minimum versions of Ruby tested to work:
|
52
52
|
|
53
|
-
* MRI ruby-2.
|
53
|
+
* MRI ruby-2.1.0 with openssl-1.0.1d or later
|
54
54
|
* jruby-9.0.0.0 with jruby-openssl-0.9.7
|
55
55
|
|
56
56
|
At the time of writing, some Linux distributions, OSX and several old binary rubies used by rvm,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: configuration_service-provider-vault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sheldon Hearn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vault
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '11.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '11.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cucumber
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,7 +139,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
139
|
requirements:
|
140
140
|
- - ">="
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version: '2.
|
142
|
+
version: '2.1'
|
143
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
145
|
- - ">="
|
@@ -152,3 +152,4 @@ signing_key:
|
|
152
152
|
specification_version: 4
|
153
153
|
summary: Vault provider for Configuration Service
|
154
154
|
test_files: []
|
155
|
+
has_rdoc:
|