Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #592: Configuration overhaul: migrate to Figment crate
66de695 test: show error when test env is not running (Jose Celano) 757751f fix: [#581] broken tests using relative paths for fixtures (Jose Celano) 6ea859b chore(deps): [#581] remove unused dep config (Jose Celano) 018dfc3 refactor: [#581] migration to Figment (Jose Celano) ccb2fef chore(deps): add cargo dep figment (Jose Celano) 8d3c8cb refactor: [#581] move semantic validation (Jose Celano) 790e1ec refactor: [#581] rename TorrustIndex to Settings (Jose Celano) 1a28309 refactor: [#581] remove unused code (Jose Celano) 07a3fb6 reafctor: reaname TorrustIndex to Settings (Jose Celano) Pull request description: Configuration overhaul: migrate to Figment crate. ### Subtasks - [x] Rename `TorrustIndex` to `Settings`. - [x] Remove more unused code. - [x] Move semantic validation to `Settings`. - [x] Add `figment` crate. - [x] Use Figment to load the configuration from the toml file. - [x] Remove `config` crate. - [ ] ~~Move config env var constants like `ENV_VAR_CONFIG` from `src/bootstrap` to `src/config`~~ (I will do it in a new PR). ### In a new PR Use Figment convention for env vars to override tracker API token and auth secret. After this PR is merged, both options will be available (old and new names). We can remove the old ones after replacing all the old env vars in this repo and the Index GUI. Rename env vars: ``` TORRUST_INDEX_CONFIG -> TORRUST_INDEX_CONFIG_TOML TORRUST_INDEX_PATH_CONFIG -> TORRUST_INDEX_CONFIG_TOML_PATH TORRUST_INDEX_TRACKER_API_TOKEN -> TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN TORRUST_INDEX_AUTH_SECRET_KEY -> TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY ``` Top commit has no ACKs. Tree-SHA512: 67aac6bbb9ce2c1fd08b7ae32ce8b56c7121f97e638d5762ceec2ecf2dd11d8f70049d56f964a996f4e8bb185f4327579e2ddc374f5d3c0e54779248ea8ca122
- Loading branch information