secret_config 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d046c2ff5be65ccdd09c1fdb82fe28df303ec584ce89c4201320529d53025da
4
- data.tar.gz: 5f4973a7b9ae821ac9b511569873dff21f427793d59e846999d419473efdc022
3
+ metadata.gz: 727baa10d16e2840df8b05ee0ef5c49cccb5a37ea90bc5edf8d6735316dede12
4
+ data.tar.gz: d26a6cf7312554d45364cb4cb48419fdac8abb4c33863066b08bbc6c869b9163
5
5
  SHA512:
6
- metadata.gz: 47788fa5c66536ba5bb36eed0ba86866375400375d0474e5b566da775db3cf7142682ac34075cb9a18c787bba0c31a892613db5283e48e47191ea98b0a5a97b7
7
- data.tar.gz: f75ce0f2542a8dbde1e912a5a7bd1fec02e9b2c97fed42018dab8b7bbd84e9850a2c872aac8a0497f9bfea6042a566bc12f6345e3c26a84a5e1f8baf13513125
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
- open_timeout: secret_configrules
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
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
4
-
5
3
  require 'secret_config'
6
4
 
7
5
  SecretConfig::CLI.run!(ARGV)
@@ -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|
@@ -1,3 +1,3 @@
1
1
  module SecretConfig
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
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.0
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-18 00:00:00.000000000 Z
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.2
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.