tty-config 0.3.1 → 0.5.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 +4 -4
- data/CHANGELOG.md +50 -1
- data/LICENSE.txt +1 -1
- data/README.md +305 -153
- data/lib/tty/config/dependency_loader.rb +55 -0
- data/lib/tty/config/generator.rb +57 -0
- data/lib/tty/config/marshaller.rb +66 -0
- data/lib/tty/config/marshaller_registry.rb +45 -0
- data/lib/tty/config/marshallers/hcl_marshaller.rb +30 -0
- data/lib/tty/config/marshallers/ini_marshaller.rb +31 -0
- data/lib/tty/config/marshallers/java_props_marshaller.rb +28 -0
- data/lib/tty/config/marshallers/json_marshaller.rb +28 -0
- data/lib/tty/config/marshallers/toml_marshaller.rb +28 -0
- data/lib/tty/config/marshallers/yaml_marshaller.rb +32 -0
- data/lib/tty/config/marshallers.rb +35 -0
- data/lib/tty/config/version.rb +3 -3
- data/lib/tty/config.rb +374 -190
- data/lib/tty-config.rb +1 -1
- metadata +66 -57
- data/Rakefile +0 -8
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/spec/spec_helper.rb +0 -54
- data/spec/unit/alias_setting_spec.rb +0 -72
- data/spec/unit/append_spec.rb +0 -26
- data/spec/unit/autoload_env_spec.rb +0 -62
- data/spec/unit/delete_spec.rb +0 -22
- data/spec/unit/exist_spec.rb +0 -24
- data/spec/unit/fetch_spec.rb +0 -45
- data/spec/unit/generate_spec.rb +0 -70
- data/spec/unit/merge_spec.rb +0 -13
- data/spec/unit/new_spec.rb +0 -6
- data/spec/unit/normalize_hash_spec.rb +0 -21
- data/spec/unit/read_spec.rb +0 -109
- data/spec/unit/remove_spec.rb +0 -16
- data/spec/unit/set_from_env_spec.rb +0 -78
- data/spec/unit/set_if_empty_spec.rb +0 -26
- data/spec/unit/set_spec.rb +0 -62
- data/spec/unit/validate_spec.rb +0 -76
- data/spec/unit/write_spec.rb +0 -197
- data/tasks/console.rake +0 -11
- data/tasks/coverage.rake +0 -11
- data/tasks/spec.rake +0 -29
- data/tty-config.gemspec +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 106bc8ef14d41383dee670ba581128d5cb22492357e1a01fa7610cc9fcdf26d1
|
4
|
+
data.tar.gz: 78e5a75dff911c39eb7355b114bbc7a511123b22050b792c99936e3b337b5d5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d94ee40e738070bd66ad3371df6ea6dc281fabb26d6b66c6e07988e637a352d01402081d9c6d8dd8979c9c712b3a932b93d0d178cb9e779058bfeb290ee7605
|
7
|
+
data.tar.gz: '0119ee7f6f3ecdade2606f3df3ebce8d814e3241de3d191ac6ee3cc947691981a3c03dad1f0af29657807c9fda9e08c2c2533614f406dc6511f9c9eb9858a37e'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,49 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.5.1] - 2022-02-04
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
* Fix reading configuration from an INI file without global properties
|
7
|
+
* Fix reading an empty config file with hcl extension to return an empty hash
|
8
|
+
|
9
|
+
## [v0.5.0] - 2021-05-23
|
10
|
+
|
11
|
+
### Added
|
12
|
+
* Add :create option to the #write method to control creating any missing directories
|
13
|
+
* Add :path option to the #write method to specify a custom file path to write to
|
14
|
+
* Add ability to specify a default value for a missing key in the #delete method
|
15
|
+
* Add #env_separator for setting a string to separate parts in environment variable name
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
* Change #delete to allow removing any subkey of a deeply nested key
|
19
|
+
* Change #remove to require from keyword
|
20
|
+
* Change #set_if_empty to use nested key fetching to check for value presence
|
21
|
+
|
22
|
+
### Fixed
|
23
|
+
* Fix Marshaller interface to copy extension names to a subclass
|
24
|
+
|
25
|
+
## [v0.4.0] - 2020-01-25
|
26
|
+
|
27
|
+
### Added
|
28
|
+
* Add DependencyLoader for a generic interface for loading marshalling dependencies
|
29
|
+
* Add Marshaller as a generic interface for building marshalling plugins
|
30
|
+
* Add MarshallerRegistry for storing all marshallers
|
31
|
+
* Add Marshallers to allow configuration of marshallers via #register_marshaller
|
32
|
+
& #unregister_marshaller
|
33
|
+
|
34
|
+
### Changed
|
35
|
+
* Change #initialize to accept hash as settings
|
36
|
+
* Change #marshal & #unmarshal to use marshalling plugins
|
37
|
+
* Change gemspec to add metadata and remove test artefacts
|
38
|
+
|
39
|
+
## [v0.3.2] - 2019-06-18
|
40
|
+
|
41
|
+
### Changed
|
42
|
+
* Change to relax development dependency versions
|
43
|
+
|
44
|
+
### Fixed
|
45
|
+
* Fix #read to allow reading empty files
|
46
|
+
|
3
47
|
## [v0.3.1] - 2019-01-24
|
4
48
|
|
5
49
|
### Fixed
|
@@ -33,6 +77,11 @@
|
|
33
77
|
|
34
78
|
* Initial implementation and release
|
35
79
|
|
80
|
+
[v0.5.1]: https://github.com/piotrmurach/tty-config/compare/v0.5.0...v0.5.1
|
81
|
+
[v0.5.0]: https://github.com/piotrmurach/tty-config/compare/v0.4.0...v0.5.0
|
82
|
+
[v0.4.0]: https://github.com/piotrmurach/tty-config/compare/v0.3.2...v0.4.0
|
83
|
+
[v0.3.2]: https://github.com/piotrmurach/tty-config/compare/v0.3.1...v0.3.2
|
84
|
+
[v0.3.1]: https://github.com/piotrmurach/tty-config/compare/v0.3.0...v0.3.1
|
36
85
|
[v0.3.0]: https://github.com/piotrmurach/tty-config/compare/v0.2.0...v0.3.0
|
37
86
|
[v0.2.0]: https://github.com/piotrmurach/tty-config/compare/v0.1.0...v0.2.0
|
38
|
-
[v0.1.0]: https://github.com/piotrmurach/tty-config/compare/v0.1.0
|
87
|
+
[v0.1.0]: https://github.com/piotrmurach/tty-config/compare/19cd277...v0.1.0
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2018 Piotr Murach
|
3
|
+
Copyright (c) 2018 Piotr Murach (piotrmurach.com)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|