qonfig 0.25.0 → 0.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -2
- data/.rubocop.yml +19 -1
- data/.travis.yml +7 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +102 -0
- data/README.md +2 -0
- data/gemfiles/with_external_deps.gemfile.lock +112 -0
- data/gemfiles/without_external_deps.gemfile.lock +102 -0
- data/lib/qonfig.rb +1 -1
- data/lib/qonfig/commands/definition/load_from_env.rb +2 -0
- data/lib/qonfig/commands/definition/load_from_env/value_converter.rb +2 -0
- data/lib/qonfig/imports/direct_key.rb +8 -2
- data/lib/qonfig/imports/mappings.rb +8 -2
- data/lib/qonfig/loaders/basic.rb +2 -0
- data/lib/qonfig/loaders/json.rb +2 -1
- data/lib/qonfig/settings.rb +5 -1
- data/lib/qonfig/settings/key_matcher.rb +1 -1
- data/lib/qonfig/uploaders/base.rb +2 -0
- data/lib/qonfig/uploaders/yaml.rb +2 -0
- data/lib/qonfig/version.rb +1 -1
- data/qonfig.gemspec +4 -6
- data/sig/.keep +0 -0
- data/spec/features/clear_options_spec.rb +92 -0
- data/spec/features/compacted_config_spec.rb +308 -0
- data/spec/features/composition_spec.rb +207 -0
- data/spec/features/config_definition_and_representation_spec.rb +535 -0
- data/spec/features/definition_order_spec.rb +69 -0
- data/spec/features/dig_functionality_spec.rb +47 -0
- data/spec/features/dot_notation_spec.rb +159 -0
- data/spec/features/export_settings_spec.rb +138 -0
- data/spec/features/expose_json_spec.rb +281 -0
- data/spec/features/expose_self/format_option_dynamic_spec.rb +69 -0
- data/spec/features/expose_self/format_option_json_spec.rb +74 -0
- data/spec/features/expose_self/format_option_unsupported_spec.rb +27 -0
- data/spec/features/expose_self/format_option_yaml_spec.rb +77 -0
- data/spec/features/expose_self_spec.rb +97 -0
- data/spec/features/expose_yaml_spec.rb +263 -0
- data/spec/features/freeze_state_spec.rb +122 -0
- data/spec/features/get_config_keys_spec.rb +62 -0
- data/spec/features/get_config_values_spec.rb +41 -0
- data/spec/features/has_a_key_spec.rb +48 -0
- data/spec/features/import_settings_spec.rb +323 -0
- data/spec/features/indifferent_access_spec.rb +57 -0
- data/spec/features/inheritance_spec.rb +110 -0
- data/spec/features/instantiation_without_class_definition_spec.rb +59 -0
- data/spec/features/iteration_over_setting_keys_spec.rb +48 -0
- data/spec/features/load_from_env_spec.rb +240 -0
- data/spec/features/load_from_json_spec.rb +97 -0
- data/spec/features/load_from_self/format_option_json_spec.rb +31 -0
- data/spec/features/load_from_self/format_option_unsupported_spec.rb +27 -0
- data/spec/features/load_from_self/format_option_yaml_spec.rb +49 -0
- data/spec/features/load_from_self/with_erb_instructions_spec.rb +33 -0
- data/spec/features/load_from_self/with_hash_like_data_representation_spec.rb +66 -0
- data/spec/features/load_from_self/with_non_hash_like_data_representation_spec.rb +19 -0
- data/spec/features/load_from_self/without_end_data_spec.rb +11 -0
- data/spec/features/load_from_yaml_spec.rb +110 -0
- data/spec/features/load_setting_values_from_file/by_instance_method_examples.rb +171 -0
- data/spec/features/load_setting_values_from_file/by_macros_examples.rb +165 -0
- data/spec/features/load_setting_values_from_file/load_from_json_spec.rb +21 -0
- data/spec/features/load_setting_values_from_file/load_from_self/json_format/end_data_with_env_spec.rb +100 -0
- data/spec/features/load_setting_values_from_file/load_from_self/json_format/with_end_data_spec.rb +129 -0
- data/spec/features/load_setting_values_from_file/load_from_self/json_format/with_incorrect_end_data_spec.rb +34 -0
- data/spec/features/load_setting_values_from_file/load_from_self/json_format/without_end_data_spec.rb +65 -0
- data/spec/features/load_setting_values_from_file/load_from_self/yaml_format/end_data_with_env_spec.rb +94 -0
- data/spec/features/load_setting_values_from_file/load_from_self/yaml_format/with_end_data_spec.rb +126 -0
- data/spec/features/load_setting_values_from_file/load_from_self/yaml_format/with_incorrect_end_data_spec.rb +32 -0
- data/spec/features/load_setting_values_from_file/load_from_self/yaml_format/without_end_data_spec.rb +65 -0
- data/spec/features/load_setting_values_from_file/load_from_yaml_spec.rb +21 -0
- data/spec/features/load_setting_values_from_file/shared_behavior_spec.rb +33 -0
- data/spec/features/mixin_spec.rb +387 -0
- data/spec/features/non_redefineable_core_methods_spec.rb +29 -0
- data/spec/features/plugins/pretty_print_spec.rb +86 -0
- data/spec/features/plugins/toml/expose_self/format_option_toml_spec.rb +71 -0
- data/spec/features/plugins/toml/expose_toml_spec.rb +221 -0
- data/spec/features/plugins/toml/load_from_self/format_option_toml_spec.rb +27 -0
- data/spec/features/plugins/toml/load_from_toml_spec.rb +109 -0
- data/spec/features/plugins/toml/load_setting_values_from_file/load_from_toml_spec.rb +27 -0
- data/spec/features/plugins/toml/load_setting_values_from_file/load_toml_from_self/end_data_with_env_spec.rb +95 -0
- data/spec/features/plugins/toml/load_setting_values_from_file/load_toml_from_self/with_end_data_spec.rb +125 -0
- data/spec/features/plugins/toml/load_setting_values_from_file/load_toml_from_self/with_incorrect_end_data_spec.rb +34 -0
- data/spec/features/plugins/toml/load_setting_values_from_file/load_toml_from_self/without_end_data_spec.rb +65 -0
- data/spec/features/plugins/toml/load_setting_values_from_file/shared_behavior_spec.rb +34 -0
- data/spec/features/plugins/toml/save_to_toml_spec.rb +149 -0
- data/spec/features/plugins/vault/expose_vault_spec.rb +117 -0
- data/spec/features/plugins/vault/load_from_vault_spec.rb +80 -0
- data/spec/features/plugins_spec.rb +89 -0
- data/spec/features/reload_spec.rb +75 -0
- data/spec/features/run_code_with_temporary_settings_spec.rb +104 -0
- data/spec/features/save_to_file/save_to_json_spec.rb +157 -0
- data/spec/features/save_to_file/save_to_yaml_spec.rb +189 -0
- data/spec/features/settings_as_predicates_spec.rb +47 -0
- data/spec/features/settings_redefinition_spec.rb +30 -0
- data/spec/features/slice_functionality_spec.rb +69 -0
- data/spec/features/subset_functionality_spec.rb +49 -0
- data/spec/features/validation_spec.rb +916 -0
- data/spec/fixtures/array_settings.yml +3 -0
- data/spec/fixtures/expose_json/incompatible_root_structure.json +6 -0
- data/spec/fixtures/expose_json/incompatible_structure.json +4 -0
- data/spec/fixtures/expose_json/project.development.json +7 -0
- data/spec/fixtures/expose_json/project.json +30 -0
- data/spec/fixtures/expose_json/project.production.json +7 -0
- data/spec/fixtures/expose_json/project.staging.json +7 -0
- data/spec/fixtures/expose_json/project.test.json +7 -0
- data/spec/fixtures/expose_yaml/incompatible_structure.yml +2 -0
- data/spec/fixtures/expose_yaml/project.development.yml +4 -0
- data/spec/fixtures/expose_yaml/project.production.yml +4 -0
- data/spec/fixtures/expose_yaml/project.staging.yml +4 -0
- data/spec/fixtures/expose_yaml/project.test.yml +4 -0
- data/spec/fixtures/expose_yaml/project.yml +25 -0
- data/spec/fixtures/json_array_sample.json +14 -0
- data/spec/fixtures/json_object_sample.json +9 -0
- data/spec/fixtures/json_with_empty_object.json +6 -0
- data/spec/fixtures/json_with_erb.json +6 -0
- data/spec/fixtures/plugins/toml/expose_toml/project.development.toml +4 -0
- data/spec/fixtures/plugins/toml/expose_toml/project.production.toml +4 -0
- data/spec/fixtures/plugins/toml/expose_toml/project.staging.toml +4 -0
- data/spec/fixtures/plugins/toml/expose_toml/project.test.toml +4 -0
- data/spec/fixtures/plugins/toml/expose_toml/project.toml +27 -0
- data/spec/fixtures/plugins/toml/mini_file.toml +6 -0
- data/spec/fixtures/plugins/toml/toml_sample_with_all_types.toml +72 -0
- data/spec/fixtures/plugins/toml/values_file/with_env.toml +13 -0
- data/spec/fixtures/plugins/toml/values_file/without_env.toml +6 -0
- data/spec/fixtures/rubocop_settings.yml +12 -0
- data/spec/fixtures/shared_settings_with_aliases.yml +10 -0
- data/spec/fixtures/travis_settings.yml +6 -0
- data/spec/fixtures/values_file/with_env.json +19 -0
- data/spec/fixtures/values_file/with_env.yml +17 -0
- data/spec/fixtures/values_file/without_env.json +8 -0
- data/spec/fixtures/values_file/without_env.yml +5 -0
- data/spec/fixtures/with_empty_hash.yml +4 -0
- data/spec/fixtures/with_erb_instructions.yml +3 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/support/meta_scopes.rb +20 -0
- data/spec/support/spec_support.rb +42 -0
- metadata +128 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc38d7dba82dac66de4b7c240ae589cde85ff7266e87ae8055df1706d0877ebf
|
4
|
+
data.tar.gz: 213899d6509a51c3ac0434cf9a60467460a61294788a3489e6088417d4c82214
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f285e423068f4e5d56e6b0bb74a23c027a6056683ba8c873d37995f733edac9eacdf98a8e2f7222d45fb3fe5d55fc42218f55942a644cfdd7381f2620e0f9903
|
7
|
+
data.tar.gz: eb17c02d38048fa1004055b8b7ca19f757885d11e0ec20c716f9c81cfde73ddb1b470a3fee4e79a8bb8be759abbe18dbbb1ee734326ee56b9683c11db567b1fc
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -5,13 +5,15 @@ inherit_gem:
|
|
5
5
|
- lib/rubocop.rspec.yml
|
6
6
|
|
7
7
|
AllCops:
|
8
|
-
TargetRubyVersion:
|
8
|
+
TargetRubyVersion: 3.0.0
|
9
|
+
NewCops: enable
|
9
10
|
Include:
|
10
11
|
- lib/**/*.rb
|
11
12
|
- spec/**/*.rb
|
12
13
|
- Gemfile
|
13
14
|
- Rakefile
|
14
15
|
- qonfig.gemspec
|
16
|
+
- gemfiles/*.gemfile
|
15
17
|
- bin/console
|
16
18
|
- bin/rspec
|
17
19
|
|
@@ -26,3 +28,19 @@ Style/RedundantBegin:
|
|
26
28
|
# NOTE: too situative
|
27
29
|
Metrics/ParameterLists:
|
28
30
|
Enabled: false
|
31
|
+
|
32
|
+
# NOTE: too situative in current code base
|
33
|
+
Style/NilComparison:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
# NOTE: too situative in current code base
|
37
|
+
Style/NonNilCheck:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
# NOTE: too situative in current code base
|
41
|
+
Lint/MissingSuper:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
# NOTE: too situative in current code base
|
45
|
+
Lint/EmptyBlock:
|
46
|
+
Enabled: false
|
data/.travis.yml
CHANGED
@@ -16,7 +16,10 @@ jobs:
|
|
16
16
|
- rvm: 2.6.6
|
17
17
|
gemfile: gemfiles/with_external_deps.gemfile
|
18
18
|
env: TEST_PLUGINS=true FULL_TEST_COVERAGE_CHECK=true
|
19
|
-
- rvm: 2.7.
|
19
|
+
- rvm: 2.7.2
|
20
|
+
gemfile: gemfiles/with_external_deps.gemfile
|
21
|
+
env: TEST_PLUGINS=true FULL_TEST_COVERAGE_CHECK=true
|
22
|
+
- rvm: 3.0.0
|
20
23
|
gemfile: gemfiles/with_external_deps.gemfile
|
21
24
|
env: TEST_PLUGINS=true FULL_TEST_COVERAGE_CHECK=true
|
22
25
|
- rvm: ruby-head
|
@@ -34,7 +37,9 @@ jobs:
|
|
34
37
|
gemfile: gemfiles/without_external_deps.gemfile
|
35
38
|
- rvm: 2.6.6
|
36
39
|
gemfile: gemfiles/without_external_deps.gemfile
|
37
|
-
- rvm: 2.7.
|
40
|
+
- rvm: 2.7.2
|
41
|
+
gemfile: gemfiles/without_external_deps.gemfile
|
42
|
+
- rvm: 3.0.0
|
38
43
|
gemfile: gemfiles/without_external_deps.gemfile
|
39
44
|
- rvm: ruby-head
|
40
45
|
gemfile: gemfiles/without_external_deps.gemfile
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
qonfig (0.26.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
activesupport (6.1.0)
|
10
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
11
|
+
i18n (>= 1.6, < 2)
|
12
|
+
minitest (>= 5.1)
|
13
|
+
tzinfo (~> 2.0)
|
14
|
+
zeitwerk (~> 2.3)
|
15
|
+
armitage-rubocop (1.7.0.1)
|
16
|
+
rubocop (= 1.7.0)
|
17
|
+
rubocop-performance (= 1.9.1)
|
18
|
+
rubocop-rails (= 2.9.1)
|
19
|
+
rubocop-rake (= 0.5.1)
|
20
|
+
rubocop-rspec (= 2.1.0)
|
21
|
+
ast (2.4.1)
|
22
|
+
coderay (1.1.3)
|
23
|
+
concurrent-ruby (1.1.7)
|
24
|
+
diff-lcs (1.4.4)
|
25
|
+
docile (1.3.4)
|
26
|
+
i18n (1.8.5)
|
27
|
+
concurrent-ruby (~> 1.0)
|
28
|
+
method_source (1.0.0)
|
29
|
+
minitest (5.14.2)
|
30
|
+
parallel (1.20.1)
|
31
|
+
parser (3.0.0.0)
|
32
|
+
ast (~> 2.4.1)
|
33
|
+
pry (0.13.1)
|
34
|
+
coderay (~> 1.1)
|
35
|
+
method_source (~> 1.0)
|
36
|
+
rack (2.2.3)
|
37
|
+
rainbow (3.0.0)
|
38
|
+
rake (13.0.3)
|
39
|
+
regexp_parser (2.0.2)
|
40
|
+
rexml (3.2.4)
|
41
|
+
rspec (3.10.0)
|
42
|
+
rspec-core (~> 3.10.0)
|
43
|
+
rspec-expectations (~> 3.10.0)
|
44
|
+
rspec-mocks (~> 3.10.0)
|
45
|
+
rspec-core (3.10.0)
|
46
|
+
rspec-support (~> 3.10.0)
|
47
|
+
rspec-expectations (3.10.0)
|
48
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
49
|
+
rspec-support (~> 3.10.0)
|
50
|
+
rspec-mocks (3.10.0)
|
51
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
52
|
+
rspec-support (~> 3.10.0)
|
53
|
+
rspec-support (3.10.0)
|
54
|
+
rubocop (1.7.0)
|
55
|
+
parallel (~> 1.10)
|
56
|
+
parser (>= 2.7.1.5)
|
57
|
+
rainbow (>= 2.2.2, < 4.0)
|
58
|
+
regexp_parser (>= 1.8, < 3.0)
|
59
|
+
rexml
|
60
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
61
|
+
ruby-progressbar (~> 1.7)
|
62
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
63
|
+
rubocop-ast (1.3.0)
|
64
|
+
parser (>= 2.7.1.5)
|
65
|
+
rubocop-performance (1.9.1)
|
66
|
+
rubocop (>= 0.90.0, < 2.0)
|
67
|
+
rubocop-ast (>= 0.4.0)
|
68
|
+
rubocop-rails (2.9.1)
|
69
|
+
activesupport (>= 4.2.0)
|
70
|
+
rack (>= 1.1)
|
71
|
+
rubocop (>= 0.90.0, < 2.0)
|
72
|
+
rubocop-rake (0.5.1)
|
73
|
+
rubocop
|
74
|
+
rubocop-rspec (2.1.0)
|
75
|
+
rubocop (~> 1.0)
|
76
|
+
rubocop-ast (>= 1.1.0)
|
77
|
+
ruby-progressbar (1.10.1)
|
78
|
+
simplecov (0.20.0)
|
79
|
+
docile (~> 1.1)
|
80
|
+
simplecov-html (~> 0.11)
|
81
|
+
simplecov_json_formatter (~> 0.1)
|
82
|
+
simplecov-html (0.12.3)
|
83
|
+
simplecov_json_formatter (0.1.2)
|
84
|
+
tzinfo (2.0.4)
|
85
|
+
concurrent-ruby (~> 1.0)
|
86
|
+
unicode-display_width (1.7.0)
|
87
|
+
zeitwerk (2.4.2)
|
88
|
+
|
89
|
+
PLATFORMS
|
90
|
+
ruby
|
91
|
+
|
92
|
+
DEPENDENCIES
|
93
|
+
armitage-rubocop (~> 1.7)
|
94
|
+
bundler
|
95
|
+
pry
|
96
|
+
qonfig!
|
97
|
+
rake (>= 13)
|
98
|
+
rspec (~> 3.10)
|
99
|
+
simplecov (~> 0.20)
|
100
|
+
|
101
|
+
BUNDLED WITH
|
102
|
+
2.2.21
|
data/README.md
CHANGED
@@ -2240,6 +2240,7 @@ config.settings.web.password # => staging_password (from sidekiq.staging.yml)
|
|
2240
2240
|
|
2241
2241
|
### Load from JSON file
|
2242
2242
|
|
2243
|
+
- supports `ERB`;
|
2243
2244
|
- `:strict` mode (fail behaviour when the required yaml file doesnt exist):
|
2244
2245
|
- `true` (by default) - causes `Qonfig::FileNotFoundError`;
|
2245
2246
|
- `false` - do nothing, ignore current command;
|
@@ -3314,6 +3315,7 @@ Qonfig.plugin(:vault)
|
|
3314
3315
|
- support for persistent data storages (we want to store configs in multiple databases and files);
|
3315
3316
|
- rails plugin;
|
3316
3317
|
- support for pattern matching;
|
3318
|
+
- support for type checking (via `rbs`, `typeprof`, `steep`);
|
3317
3319
|
- **Minor**:
|
3318
3320
|
- An ability to flag `Qonfig::Configurable`'s config object as `compacted` (`Qonfig::Compacted`);
|
3319
3321
|
- Instance-based behavior for `Vault` plugin, also use instance of `Vault` client instead of `Singleton`;
|
@@ -0,0 +1,112 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
qonfig (0.25.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
activesupport (6.1.0)
|
10
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
11
|
+
i18n (>= 1.6, < 2)
|
12
|
+
minitest (>= 5.1)
|
13
|
+
tzinfo (~> 2.0)
|
14
|
+
zeitwerk (~> 2.3)
|
15
|
+
armitage-rubocop (1.7.0.1)
|
16
|
+
rubocop (= 1.7.0)
|
17
|
+
rubocop-performance (= 1.9.1)
|
18
|
+
rubocop-rails (= 2.9.1)
|
19
|
+
rubocop-rake (= 0.5.1)
|
20
|
+
rubocop-rspec (= 2.1.0)
|
21
|
+
ast (2.4.1)
|
22
|
+
aws-eventstream (1.1.0)
|
23
|
+
aws-sigv4 (1.2.2)
|
24
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
25
|
+
citrus (3.0.2)
|
26
|
+
coderay (1.1.3)
|
27
|
+
concurrent-ruby (1.1.7)
|
28
|
+
diff-lcs (1.4.4)
|
29
|
+
docile (1.3.4)
|
30
|
+
i18n (1.8.5)
|
31
|
+
concurrent-ruby (~> 1.0)
|
32
|
+
method_source (1.0.0)
|
33
|
+
minitest (5.14.2)
|
34
|
+
parallel (1.20.1)
|
35
|
+
parser (3.0.0.0)
|
36
|
+
ast (~> 2.4.1)
|
37
|
+
pry (0.13.1)
|
38
|
+
coderay (~> 1.1)
|
39
|
+
method_source (~> 1.0)
|
40
|
+
rack (2.2.3)
|
41
|
+
rainbow (3.0.0)
|
42
|
+
rake (13.0.3)
|
43
|
+
regexp_parser (2.0.2)
|
44
|
+
rexml (3.2.4)
|
45
|
+
rspec (3.10.0)
|
46
|
+
rspec-core (~> 3.10.0)
|
47
|
+
rspec-expectations (~> 3.10.0)
|
48
|
+
rspec-mocks (~> 3.10.0)
|
49
|
+
rspec-core (3.10.0)
|
50
|
+
rspec-support (~> 3.10.0)
|
51
|
+
rspec-expectations (3.10.0)
|
52
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
+
rspec-support (~> 3.10.0)
|
54
|
+
rspec-mocks (3.10.0)
|
55
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
+
rspec-support (~> 3.10.0)
|
57
|
+
rspec-support (3.10.0)
|
58
|
+
rubocop (1.7.0)
|
59
|
+
parallel (~> 1.10)
|
60
|
+
parser (>= 2.7.1.5)
|
61
|
+
rainbow (>= 2.2.2, < 4.0)
|
62
|
+
regexp_parser (>= 1.8, < 3.0)
|
63
|
+
rexml
|
64
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
65
|
+
ruby-progressbar (~> 1.7)
|
66
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
67
|
+
rubocop-ast (1.3.0)
|
68
|
+
parser (>= 2.7.1.5)
|
69
|
+
rubocop-performance (1.9.1)
|
70
|
+
rubocop (>= 0.90.0, < 2.0)
|
71
|
+
rubocop-ast (>= 0.4.0)
|
72
|
+
rubocop-rails (2.9.1)
|
73
|
+
activesupport (>= 4.2.0)
|
74
|
+
rack (>= 1.1)
|
75
|
+
rubocop (>= 0.90.0, < 2.0)
|
76
|
+
rubocop-rake (0.5.1)
|
77
|
+
rubocop
|
78
|
+
rubocop-rspec (2.1.0)
|
79
|
+
rubocop (~> 1.0)
|
80
|
+
rubocop-ast (>= 1.1.0)
|
81
|
+
ruby-progressbar (1.10.1)
|
82
|
+
simplecov (0.20.0)
|
83
|
+
docile (~> 1.1)
|
84
|
+
simplecov-html (~> 0.11)
|
85
|
+
simplecov_json_formatter (~> 0.1)
|
86
|
+
simplecov-html (0.12.3)
|
87
|
+
simplecov_json_formatter (0.1.2)
|
88
|
+
toml-rb (2.0.1)
|
89
|
+
citrus (~> 3.0, > 3.0)
|
90
|
+
tzinfo (2.0.4)
|
91
|
+
concurrent-ruby (~> 1.0)
|
92
|
+
unicode-display_width (1.7.0)
|
93
|
+
vault (0.15.0)
|
94
|
+
aws-sigv4
|
95
|
+
zeitwerk (2.4.2)
|
96
|
+
|
97
|
+
PLATFORMS
|
98
|
+
x86_64-darwin-19
|
99
|
+
|
100
|
+
DEPENDENCIES
|
101
|
+
armitage-rubocop (~> 1.7)
|
102
|
+
bundler
|
103
|
+
pry
|
104
|
+
qonfig!
|
105
|
+
rake (>= 13)
|
106
|
+
rspec (~> 3.10)
|
107
|
+
simplecov (~> 0.20)
|
108
|
+
toml-rb (>= 2)
|
109
|
+
vault (>= 0.1)
|
110
|
+
|
111
|
+
BUNDLED WITH
|
112
|
+
2.2.3
|
@@ -0,0 +1,102 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
qonfig (0.25.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
activesupport (6.1.0)
|
10
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
11
|
+
i18n (>= 1.6, < 2)
|
12
|
+
minitest (>= 5.1)
|
13
|
+
tzinfo (~> 2.0)
|
14
|
+
zeitwerk (~> 2.3)
|
15
|
+
armitage-rubocop (1.7.0.1)
|
16
|
+
rubocop (= 1.7.0)
|
17
|
+
rubocop-performance (= 1.9.1)
|
18
|
+
rubocop-rails (= 2.9.1)
|
19
|
+
rubocop-rake (= 0.5.1)
|
20
|
+
rubocop-rspec (= 2.1.0)
|
21
|
+
ast (2.4.1)
|
22
|
+
coderay (1.1.3)
|
23
|
+
concurrent-ruby (1.1.7)
|
24
|
+
diff-lcs (1.4.4)
|
25
|
+
docile (1.3.4)
|
26
|
+
i18n (1.8.5)
|
27
|
+
concurrent-ruby (~> 1.0)
|
28
|
+
method_source (1.0.0)
|
29
|
+
minitest (5.14.2)
|
30
|
+
parallel (1.20.1)
|
31
|
+
parser (3.0.0.0)
|
32
|
+
ast (~> 2.4.1)
|
33
|
+
pry (0.13.1)
|
34
|
+
coderay (~> 1.1)
|
35
|
+
method_source (~> 1.0)
|
36
|
+
rack (2.2.3)
|
37
|
+
rainbow (3.0.0)
|
38
|
+
rake (13.0.3)
|
39
|
+
regexp_parser (2.0.2)
|
40
|
+
rexml (3.2.4)
|
41
|
+
rspec (3.10.0)
|
42
|
+
rspec-core (~> 3.10.0)
|
43
|
+
rspec-expectations (~> 3.10.0)
|
44
|
+
rspec-mocks (~> 3.10.0)
|
45
|
+
rspec-core (3.10.0)
|
46
|
+
rspec-support (~> 3.10.0)
|
47
|
+
rspec-expectations (3.10.0)
|
48
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
49
|
+
rspec-support (~> 3.10.0)
|
50
|
+
rspec-mocks (3.10.0)
|
51
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
52
|
+
rspec-support (~> 3.10.0)
|
53
|
+
rspec-support (3.10.0)
|
54
|
+
rubocop (1.7.0)
|
55
|
+
parallel (~> 1.10)
|
56
|
+
parser (>= 2.7.1.5)
|
57
|
+
rainbow (>= 2.2.2, < 4.0)
|
58
|
+
regexp_parser (>= 1.8, < 3.0)
|
59
|
+
rexml
|
60
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
61
|
+
ruby-progressbar (~> 1.7)
|
62
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
63
|
+
rubocop-ast (1.3.0)
|
64
|
+
parser (>= 2.7.1.5)
|
65
|
+
rubocop-performance (1.9.1)
|
66
|
+
rubocop (>= 0.90.0, < 2.0)
|
67
|
+
rubocop-ast (>= 0.4.0)
|
68
|
+
rubocop-rails (2.9.1)
|
69
|
+
activesupport (>= 4.2.0)
|
70
|
+
rack (>= 1.1)
|
71
|
+
rubocop (>= 0.90.0, < 2.0)
|
72
|
+
rubocop-rake (0.5.1)
|
73
|
+
rubocop
|
74
|
+
rubocop-rspec (2.1.0)
|
75
|
+
rubocop (~> 1.0)
|
76
|
+
rubocop-ast (>= 1.1.0)
|
77
|
+
ruby-progressbar (1.10.1)
|
78
|
+
simplecov (0.20.0)
|
79
|
+
docile (~> 1.1)
|
80
|
+
simplecov-html (~> 0.11)
|
81
|
+
simplecov_json_formatter (~> 0.1)
|
82
|
+
simplecov-html (0.12.3)
|
83
|
+
simplecov_json_formatter (0.1.2)
|
84
|
+
tzinfo (2.0.4)
|
85
|
+
concurrent-ruby (~> 1.0)
|
86
|
+
unicode-display_width (1.7.0)
|
87
|
+
zeitwerk (2.4.2)
|
88
|
+
|
89
|
+
PLATFORMS
|
90
|
+
x86_64-darwin-19
|
91
|
+
|
92
|
+
DEPENDENCIES
|
93
|
+
armitage-rubocop (~> 1.7)
|
94
|
+
bundler
|
95
|
+
pry
|
96
|
+
qonfig!
|
97
|
+
rake (>= 13)
|
98
|
+
rspec (~> 3.10)
|
99
|
+
simplecov (~> 0.20)
|
100
|
+
|
101
|
+
BUNDLED WITH
|
102
|
+
2.2.3
|
data/lib/qonfig.rb
CHANGED
@@ -58,7 +58,7 @@ module Qonfig
|
|
58
58
|
# @since 0.20.0
|
59
59
|
define_validator(:module) { |value| value.is_a?(Module) }
|
60
60
|
# @since 0.20.0
|
61
|
-
define_validator(:not_nil) { |value|
|
61
|
+
define_validator(:not_nil) { |value| value == nil }
|
62
62
|
|
63
63
|
# @since 0.12.0
|
64
64
|
register_plugin('toml', Qonfig::Plugins::TOML)
|
@@ -55,6 +55,8 @@ class Qonfig::Commands::Definition::LoadFromENV < Qonfig::Commands::Base
|
|
55
55
|
@convert_values = convert_values
|
56
56
|
@prefix_pattern = prefix.is_a?(Regexp) ? prefix : /\A#{Regexp.escape(prefix.to_s)}.*\z/m
|
57
57
|
@trim_prefix = trim_prefix
|
58
|
+
|
59
|
+
# TODO: mb trim_prefix ?
|
58
60
|
@trim_pattern = prefix.is_a?(Regexp) ? prefix : /\A(#{Regexp.escape(prefix.to_s)})/m
|
59
61
|
end
|
60
62
|
|