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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -1
  3. data/LICENSE.txt +1 -1
  4. data/README.md +305 -153
  5. data/lib/tty/config/dependency_loader.rb +55 -0
  6. data/lib/tty/config/generator.rb +57 -0
  7. data/lib/tty/config/marshaller.rb +66 -0
  8. data/lib/tty/config/marshaller_registry.rb +45 -0
  9. data/lib/tty/config/marshallers/hcl_marshaller.rb +30 -0
  10. data/lib/tty/config/marshallers/ini_marshaller.rb +31 -0
  11. data/lib/tty/config/marshallers/java_props_marshaller.rb +28 -0
  12. data/lib/tty/config/marshallers/json_marshaller.rb +28 -0
  13. data/lib/tty/config/marshallers/toml_marshaller.rb +28 -0
  14. data/lib/tty/config/marshallers/yaml_marshaller.rb +32 -0
  15. data/lib/tty/config/marshallers.rb +35 -0
  16. data/lib/tty/config/version.rb +3 -3
  17. data/lib/tty/config.rb +374 -190
  18. data/lib/tty-config.rb +1 -1
  19. metadata +66 -57
  20. data/Rakefile +0 -8
  21. data/bin/console +0 -14
  22. data/bin/setup +0 -8
  23. data/spec/spec_helper.rb +0 -54
  24. data/spec/unit/alias_setting_spec.rb +0 -72
  25. data/spec/unit/append_spec.rb +0 -26
  26. data/spec/unit/autoload_env_spec.rb +0 -62
  27. data/spec/unit/delete_spec.rb +0 -22
  28. data/spec/unit/exist_spec.rb +0 -24
  29. data/spec/unit/fetch_spec.rb +0 -45
  30. data/spec/unit/generate_spec.rb +0 -70
  31. data/spec/unit/merge_spec.rb +0 -13
  32. data/spec/unit/new_spec.rb +0 -6
  33. data/spec/unit/normalize_hash_spec.rb +0 -21
  34. data/spec/unit/read_spec.rb +0 -109
  35. data/spec/unit/remove_spec.rb +0 -16
  36. data/spec/unit/set_from_env_spec.rb +0 -78
  37. data/spec/unit/set_if_empty_spec.rb +0 -26
  38. data/spec/unit/set_spec.rb +0 -62
  39. data/spec/unit/validate_spec.rb +0 -76
  40. data/spec/unit/write_spec.rb +0 -197
  41. data/tasks/console.rake +0 -11
  42. data/tasks/coverage.rake +0 -11
  43. data/tasks/spec.rake +0 -29
  44. data/tty-config.gemspec +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ced352997dfe10cdccdabd33fd516fc3f338d6296f365e28b1c5e520e17d6e91
4
- data.tar.gz: 89fdfdb47fae4a829a214341409b54441ca2758e94c4b3ed3e5da8ef60e18db0
3
+ metadata.gz: 106bc8ef14d41383dee670ba581128d5cb22492357e1a01fa7610cc9fcdf26d1
4
+ data.tar.gz: 78e5a75dff911c39eb7355b114bbc7a511123b22050b792c99936e3b337b5d5e
5
5
  SHA512:
6
- metadata.gz: 9eac9be8ab748ce5d2f0efca73ab900ccc18723a7b9370ed7c02f227755363d51578a6035e47499cc09be2163947079156e00e8824d8e21667a292fafa2faba3
7
- data.tar.gz: 42b892aeb8fe566c6ba28c1eae57fc2fc07212d42bc699526aed4fcf40df5b40041f4acd03ddbbfbd1c8a20695c1df7f2110bd66502123bde87509da9a526244
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