consul_application_settings 4.0.0.pre.alpha → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +0 -7
- data/Gemfile.lock +1 -7
- data/README.md +4 -0
- data/consul_application_settings.gemspec +6 -1
- data/docker-compose.yml +0 -8
- data/lib/consul_application_settings/version.rb +1 -1
- metadata +8 -20
- data/lib/consul_application_settings/resolvers/vault.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 361bfff1ca209489842135445a5265240919a881bd37b6463a8f64bd6c7583bd
|
4
|
+
data.tar.gz: a71131c9eeb965821b20c027be2c27ebe6000d5f1fffaaf1e806fea61c1be86e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1218d2841e41b34762d66e8eba0bc9d1db1b790114c59e7ba2fcecab34e4eb66d163fb3b21b41be96cb5f91d4a490d410b5372e5f7052157442db9b038f574b0
|
7
|
+
data.tar.gz: 864a3e31e29382c54a9cb046d62ddc85eca46a380a92214fb4b4b378de6aab9731a88981d7c46735d9cd9e8b692932ea127ba858a7864a0a3ae117d48ff7e100
|
data/.github/workflows/main.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -9,9 +9,6 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
ast (2.4.0)
|
12
|
-
aws-eventstream (1.2.0)
|
13
|
-
aws-sigv4 (1.4.0)
|
14
|
-
aws-eventstream (~> 1, >= 1.0.2)
|
15
12
|
codecov (0.4.3)
|
16
13
|
simplecov (>= 0.15, < 0.22)
|
17
14
|
deep_merge (1.2.1)
|
@@ -65,8 +62,6 @@ GEM
|
|
65
62
|
simplecov-html (~> 0.10.0)
|
66
63
|
simplecov-html (0.10.2)
|
67
64
|
unicode-display_width (1.5.0)
|
68
|
-
vault (0.16.0)
|
69
|
-
aws-sigv4
|
70
65
|
|
71
66
|
PLATFORMS
|
72
67
|
ruby
|
@@ -80,7 +75,6 @@ DEPENDENCIES
|
|
80
75
|
rubocop (~> 0.66)
|
81
76
|
rubocop-rspec (~> 1.32.0)
|
82
77
|
simplecov (~> 0.16)
|
83
|
-
vault (~> 0.16)
|
84
78
|
|
85
79
|
BUNDLED WITH
|
86
|
-
2.1.
|
80
|
+
2.1.4
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# ConsulApplicationSettings
|
2
2
|
|
3
|
+
## Gem is Deprecated in favor of [SettingsReader](https://github.com/matic-insurance/settings_reader)
|
4
|
+
This gem is deprecated and all functionality has been moved to `SettingsReader`
|
5
|
+
See More: https://github.com/matic-insurance/settings_reader
|
6
|
+
|
3
7
|
![Build Status](https://github.com/matic-insurance/consul_application_settings/workflows/ci/badge.svg?branch=master)
|
4
8
|
[![Test Coverage](https://codecov.io/gh/matic-insurance/consul_application_settings/branch/master/graph/badge.svg?token=5E8NA8EE8L)](https://codecov.io/gh/matic-insurance/consul_application_settings)
|
5
9
|
|
@@ -39,5 +39,10 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency 'rubocop', '~> 0.66'
|
40
40
|
spec.add_development_dependency 'rubocop-rspec', '~> 1.32.0'
|
41
41
|
spec.add_development_dependency 'simplecov', '~> 0.16'
|
42
|
-
|
42
|
+
|
43
|
+
spec.post_install_message = <<~MESSAGE
|
44
|
+
! The 'consul_application_settings' gem has been deprecated and has been replaced by 'settings_reader'.
|
45
|
+
! See: https://rubygems.org/gems/settings_reader
|
46
|
+
! And: https://github.com/matic-insurance/settings_reader
|
47
|
+
MESSAGE
|
43
48
|
end
|
data/docker-compose.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consul_application_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Volodymyr Mykhailyk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deep_merge
|
@@ -136,20 +136,6 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0.16'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: vault
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0.16'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0.16'
|
153
139
|
description: |-
|
154
140
|
Gem that simplifies usage of Consul (via Diplomat gem) to host application settings.
|
155
141
|
Gem provides defaults and utilities
|
@@ -187,7 +173,6 @@ files:
|
|
187
173
|
- lib/consul_application_settings/resolvers/abstract.rb
|
188
174
|
- lib/consul_application_settings/resolvers/env.rb
|
189
175
|
- lib/consul_application_settings/resolvers/erb.rb
|
190
|
-
- lib/consul_application_settings/resolvers/vault.rb
|
191
176
|
- lib/consul_application_settings/utils.rb
|
192
177
|
- lib/consul_application_settings/version.rb
|
193
178
|
homepage: https://github.com/matic-insurance/consul_application_settings
|
@@ -197,7 +182,10 @@ metadata:
|
|
197
182
|
homepage_uri: https://github.com/matic-insurance/consul_application_settings
|
198
183
|
source_code_uri: https://github.com/matic-insurance/consul_application_settings
|
199
184
|
changelog_uri: https://github.com/matic-insurance/consul_application_settings/blob/master/CHANGELOG.md
|
200
|
-
post_install_message:
|
185
|
+
post_install_message: |
|
186
|
+
! The 'consul_application_settings' gem has been deprecated and has been replaced by 'settings_reader'.
|
187
|
+
! See: https://rubygems.org/gems/settings_reader
|
188
|
+
! And: https://github.com/matic-insurance/settings_reader
|
201
189
|
rdoc_options: []
|
202
190
|
require_paths:
|
203
191
|
- lib
|
@@ -208,9 +196,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
208
196
|
version: '0'
|
209
197
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
198
|
requirements:
|
211
|
-
- - "
|
199
|
+
- - ">="
|
212
200
|
- !ruby/object:Gem::Version
|
213
|
-
version:
|
201
|
+
version: '0'
|
214
202
|
requirements: []
|
215
203
|
rubygems_version: 3.0.3.1
|
216
204
|
signing_key:
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module ConsulApplicationSettings
|
2
|
-
module Resolvers
|
3
|
-
# Resolve values using vault
|
4
|
-
class Vault
|
5
|
-
IDENTIFIER = 'vault://'.freeze
|
6
|
-
|
7
|
-
def resolvable?(value, _path)
|
8
|
-
return unless value.respond_to?(:start_with?)
|
9
|
-
|
10
|
-
value.start_with?(IDENTIFIER)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Expect value in format `vault://mount/path/to/secret?attribute_name`
|
14
|
-
def resolve(value, _path)
|
15
|
-
value = value.delete_prefix(IDENTIFIER)
|
16
|
-
mount, secret = value.split('/', 2)
|
17
|
-
secret, attribute = secret.split('?')
|
18
|
-
attribute ||= 'value'
|
19
|
-
secret = ::Vault.kv(mount).read(secret)
|
20
|
-
secret && secret.data[attribute.to_sym]
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|