secret_config 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +84 -42
- data/Rakefile +7 -7
- data/bin/secret_config +1 -1
- data/lib/secret_config.rb +30 -1
- data/lib/secret_config/config.rb +44 -0
- data/lib/secret_config/parser.rb +75 -0
- data/lib/secret_config/providers/file.rb +17 -4
- data/lib/secret_config/providers/ssm.rb +9 -2
- data/lib/secret_config/registry.rb +42 -29
- data/lib/secret_config/setting_interpolator.rb +4 -17
- data/lib/secret_config/string_interpolator.rb +5 -4
- data/lib/secret_config/utils.rb +1 -1
- data/lib/secret_config/version.rb +1 -1
- data/test/config/application.yml +34 -4
- data/test/parser_test.rb +82 -0
- data/test/providers/file_test.rb +4 -4
- data/test/providers/ssm_test.rb +37 -12
- data/test/registry_test.rb +51 -26
- data/test/secret_config_test.rb +35 -4
- data/test/setting_interpolator_test.rb +17 -17
- data/test/test_helper.rb +6 -6
- data/test/utils_test.rb +4 -4
- metadata +7 -3
data/test/test_helper.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) +
|
1
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
3
|
+
require "yaml"
|
4
|
+
require "minitest/autorun"
|
5
|
+
require "minitest/reporters"
|
6
|
+
require "secret_config"
|
7
|
+
require "awesome_print"
|
8
8
|
|
9
9
|
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
|
data/test/utils_test.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative
|
1
|
+
require_relative "test_helper"
|
2
2
|
|
3
3
|
class UtilsTest < Minitest::Test
|
4
4
|
describe SecretConfig::Utils do
|
@@ -9,7 +9,7 @@ class UtilsTest < Minitest::Test
|
|
9
9
|
"test/my_application/mysql/username" => "secret_config",
|
10
10
|
"test/my_application/mysql/host" => "127.0.0.1",
|
11
11
|
"test/my_application/secrets" => "both_a_path_and_a_value",
|
12
|
-
"test/my_application/secrets/secret_key_base" => "somereallylongteststring"
|
12
|
+
"test/my_application/secrets/secret_key_base" => "somereallylongteststring"
|
13
13
|
}
|
14
14
|
end
|
15
15
|
|
@@ -17,8 +17,8 @@ class UtilsTest < Minitest::Test
|
|
17
17
|
SecretConfig::Utils.hierarchical(flat_registry)
|
18
18
|
end
|
19
19
|
|
20
|
-
describe
|
21
|
-
it
|
20
|
+
describe ".flatten" do
|
21
|
+
it "returns a copy of the config" do
|
22
22
|
h = SecretConfig::Utils.flatten(hash_registry, path = nil)
|
23
23
|
assert_equal(flat_registry, h)
|
24
24
|
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
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -38,7 +38,9 @@ files:
|
|
38
38
|
- bin/secret_config
|
39
39
|
- lib/secret_config.rb
|
40
40
|
- lib/secret_config/cli.rb
|
41
|
+
- lib/secret_config/config.rb
|
41
42
|
- lib/secret_config/errors.rb
|
43
|
+
- lib/secret_config/parser.rb
|
42
44
|
- lib/secret_config/providers/file.rb
|
43
45
|
- lib/secret_config/providers/provider.rb
|
44
46
|
- lib/secret_config/providers/ssm.rb
|
@@ -49,6 +51,7 @@ files:
|
|
49
51
|
- lib/secret_config/utils.rb
|
50
52
|
- lib/secret_config/version.rb
|
51
53
|
- test/config/application.yml
|
54
|
+
- test/parser_test.rb
|
52
55
|
- test/providers/file_test.rb
|
53
56
|
- test/providers/ssm_test.rb
|
54
57
|
- test/registry_test.rb
|
@@ -75,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
78
|
- !ruby/object:Gem::Version
|
76
79
|
version: '0'
|
77
80
|
requirements: []
|
78
|
-
rubygems_version: 3.0.
|
81
|
+
rubygems_version: 3.0.8
|
79
82
|
signing_key:
|
80
83
|
specification_version: 4
|
81
84
|
summary: Centralized Configuration and Secrets Management for Ruby and Rails applications.
|
@@ -85,6 +88,7 @@ test_files:
|
|
85
88
|
- test/providers/file_test.rb
|
86
89
|
- test/registry_test.rb
|
87
90
|
- test/setting_interpolator_test.rb
|
91
|
+
- test/parser_test.rb
|
88
92
|
- test/test_helper.rb
|
89
93
|
- test/utils_test.rb
|
90
94
|
- test/secret_config_test.rb
|