Compare commits
2 commits
963e82b434
...
9b202495f8
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b202495f8 | |||
| d156d7afc5 |
6 changed files with 20 additions and 10 deletions
|
|
@ -1,3 +1,9 @@
|
|||
## 0.2.0a38 (2026-01-01)
|
||||
|
||||
### Fix
|
||||
|
||||
- more than two layers
|
||||
|
||||
## 0.2.0a37 (2025-12-30)
|
||||
|
||||
### Fix
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
|||
|
||||
[project]
|
||||
name = "rougail.cli"
|
||||
version = "0.2.0a37"
|
||||
version = "0.2.0a38"
|
||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||
readme = "README.md"
|
||||
description = "CLI for Rougail"
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ def load_user_data(rougailconfig):
|
|||
subconfig.information.set("description_type", rougailconfig["cli.description_type"])
|
||||
metaconfig = subconfig
|
||||
if last_layers:
|
||||
for layer in layers[:-1]:
|
||||
for layer in reversed(layers[:-1]):
|
||||
layer_name = "_".join(layer)
|
||||
metaconfig = MetaConfig([metaconfig], name=layer_name)
|
||||
metaconfig.owner.set(metaconfig.path())
|
||||
|
|
@ -225,10 +225,8 @@ def load_user_data(rougailconfig):
|
|||
for idx, layer in enumerate(layers):
|
||||
if idx:
|
||||
subconfig = subconfig.config("_".join(layer))
|
||||
layer_name = subconfig.path()
|
||||
subconfig.owner.set(subconfig.path())
|
||||
else:
|
||||
layer_name = None
|
||||
layer_name = subconfig.path()
|
||||
# data user
|
||||
user_data = []
|
||||
if has_layers:
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.2.0a37"
|
||||
__version__ = "0.2.0a38"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
╭────────────── Caption ───────────────╮
|
||||
│ Variable [32mModified value[0m │
|
||||
│ Variable [38;5;220mDefault value[0m │
|
||||
│ (⏳ Original default value) │
|
||||
╰──────────────────────────────────────╯
|
||||
╭─────────── Layers ────────────╮
|
||||
│ environment variable │
|
||||
│ the YAML file "yaml/file.yml" │
|
||||
│ Bitwarden │
|
||||
╰───────────────────────────────╯
|
||||
Variables:
|
||||
[94m┗━━ [0m📓 a description: [32ma yaml value[0m ◀ loaded from the YAML file "yaml/file.yml"
|
||||
[94m [0m(⏳ my env value ◀ loaded from environment variable ⏳ my_value)
|
||||
[94m┗━━ [0m📓 a description: [38;5;220ma yaml value[0m (⏳ a yaml value ◀ loaded from the YAML file
|
||||
[94m [0m"yaml/file.yml" ⏳ my env value ◀ loaded from environment variable ⏳
|
||||
[94m [0mmy_value)
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ def test_cli_user_datas_user_datas_layers():
|
|||
save = os.environ.copy()
|
||||
os.environ["ROUGAIL_MY_VARIABLE"] = "my env value"
|
||||
with chdir(test_dir / 'cli'):
|
||||
ret = main(['--main_structural_directories', 'structures', '--cli.layers', '--step.user_data', 'environment', 'yaml', '--yaml.filename', 'yaml/file.yml'], do_not_print=True)
|
||||
ret = main(['--main_structural_directories', 'structures', '--cli.layers', '--step.user_data', 'environment', 'yaml', 'bitwarden', '--yaml.filename', 'yaml/file.yml', '--bitwarden.mock_enable'], do_not_print=True)
|
||||
filename = Path('result_user_datas_layers.txt')
|
||||
if not filename.is_file():
|
||||
with filename.open('w') as fh:
|
||||
|
|
|
|||
Loading…
Reference in a new issue