secret_config 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/secret_config +0 -2
- data/lib/secret_config/cli.rb +13 -0
- data/lib/secret_config/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 727baa10d16e2840df8b05ee0ef5c49cccb5a37ea90bc5edf8d6735316dede12
|
4
|
+
data.tar.gz: d26a6cf7312554d45364cb4cb48419fdac8abb4c33863066b08bbc6c869b9163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37fb503a6cea04ba6c372354e72ea519dbe8e278d5f00cac6aab4e0626f6a81c259dc080014f0ec2a77ce54bf796e78e07ff15d21c63ae5f9622e40920a2a49a
|
7
|
+
data.tar.gz: 79fe890795e28d3e2919471e96b5128f9bd30acd1eab4efa6ba3cefb25c582283a6c885d89a5cd95a0fe571f2f0e01e2eeb448b878fc61e5f921ada2b3a28796
|
data/README.md
CHANGED
@@ -179,7 +179,7 @@ Then the application that uses the above library / gem just needs to add the rel
|
|
179
179
|
http_client:
|
180
180
|
url: https://test.example.com
|
181
181
|
pool_size: 20
|
182
|
-
|
182
|
+
read_timeout: 300
|
183
183
|
~~~
|
184
184
|
|
185
185
|
This avoids a custom config file just for the above library.
|
data/bin/secret_config
CHANGED
data/lib/secret_config/cli.rb
CHANGED
@@ -4,6 +4,7 @@ require 'erb'
|
|
4
4
|
require 'yaml'
|
5
5
|
require 'json'
|
6
6
|
require 'securerandom'
|
7
|
+
require 'irb'
|
7
8
|
|
8
9
|
module SecretConfig
|
9
10
|
class CLI
|
@@ -11,6 +12,7 @@ module SecretConfig
|
|
11
12
|
:export, :no_filter,
|
12
13
|
:import, :key_id, :random_size, :prune, :overwrite,
|
13
14
|
:copy_path,
|
15
|
+
:console,
|
14
16
|
:show_version
|
15
17
|
|
16
18
|
PROVIDERS = %i[ssm].freeze
|
@@ -32,6 +34,7 @@ module SecretConfig
|
|
32
34
|
@replace = false
|
33
35
|
@copy_path = nil
|
34
36
|
@show_version = false
|
37
|
+
@console = false
|
35
38
|
|
36
39
|
if argv.empty?
|
37
40
|
puts parser
|
@@ -44,6 +47,8 @@ module SecretConfig
|
|
44
47
|
if show_version
|
45
48
|
puts "Secret Config v#{VERSION}"
|
46
49
|
puts "Region: #{region}"
|
50
|
+
elsif console
|
51
|
+
run_console
|
47
52
|
elsif export
|
48
53
|
run_export(export, filtered: !no_filter)
|
49
54
|
elsif import
|
@@ -77,6 +82,10 @@ module SecretConfig
|
|
77
82
|
@copy_path = path
|
78
83
|
end
|
79
84
|
|
85
|
+
opts.on '-i', '--console', 'Start interactive console.' do
|
86
|
+
@console = true
|
87
|
+
end
|
88
|
+
|
80
89
|
opts.on '-p', '--path PATH', 'Path to import from / export to.' do |path|
|
81
90
|
@path = path
|
82
91
|
end
|
@@ -161,6 +170,10 @@ module SecretConfig
|
|
161
170
|
puts "Copied #{source_path} to #{target_path} using #{provider}"
|
162
171
|
end
|
163
172
|
|
173
|
+
def run_console
|
174
|
+
IRB.start
|
175
|
+
end
|
176
|
+
|
164
177
|
def set_config(config, path)
|
165
178
|
# TODO: prune, replace
|
166
179
|
Utils.flatten_each(config, path) do |key, value|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secret_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.0.
|
72
|
+
rubygems_version: 3.0.3
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Centralized Configuration and Secrets Management for Ruby and Rails applications.
|