В рамках данного проекта необходимо реализовать утилиту для поиска отличий в конфигурационных файлах.
- Поддержка разных форматов
- Генерация отчета в виде plain text, pretty и json
##Пример использования:
$ gendiff --format pretty first.json second.json
{
common: {
setting1: Value 1
- setting2: 200
setting3: true
- setting6: {
key: value
}
+ setting4: blah blah
+ setting5: {
key5: value5
}
}
group1: {
+ baz: bars
- baz: bas
foo: bar
}
- group2: {
abc: 12345
}
+ group3: {
fee: 100500
}
}
before.json:
{
"common": {
"setting1": "Value 1",
"setting2": "200",
"setting3": true,
"setting6": {
"key": "value"
}
},
"group1": {
"baz": "bas",
"foo": "bar"
},
"group2": {
"abc": "12345"
}
}
after.json
{
"common": {
"setting1": "Value 1",
"setting3": true,
"setting4": "blah blah",
"setting5": {
"key5": "value5"
}
},
"group1": {
"foo": "bar",
"baz": "bars"
},
"group3": {
"fee": "100500"
}
}
step 1: https://asciinema.org/a/8x4wDjVTg7Cv9LTkpDuuXmDvs
step 2: https://asciinema.org/a/zRXFVy4E9RdNhknXlkRS7TBPe
step 3: https://asciinema.org/a/4ISzdOndjPNEUS4wYUX2TG0bm
step 2 with fixes: https://asciinema.org/a/bHPgSDc7Kozls1S2ipbZVpjHj
step 2 with fixes: https://asciinema.org/a/MuHNXUFvOnnlxXEmagl18PnM1
step 4: https://asciinema.org/a/nbKIEUb5jmhUZAF9odpBWdcQ4
step 4 with fixes: https://asciinema.org/a/VHyuw0pRe7SXoxLqgi0YtP0gH