biserg/gendiff 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

biserg/gendiff

Composer 安装命令:

composer require biserg/gendiff

包简介

Gendiff - CLI, Hexlet education project

README 文档

README

CI

GenDiff

This app was created to help you find out the difference between two versions of file or two same type files. You are able to use it with .json or .yaml files. Also you can choose format of difference presentation. For example:

basic ('pretty') format

{
  - follow: false
    host: hexlet.io
  - proxy: 123.234.53.22
  - timeout: 50
  + timeout: 20
  + verbose: true
}

plain format

Property 'common.follow' was added with value: false
Property 'common.setting2' was removed
Property 'common.setting3' was updated. From true to [complex value]
Property 'common.setting4' was added with value: 'blah blah'
Property 'common.setting5' was added with value: [complex value]
Property 'common.setting6.doge.wow' was updated. From 'too much' to 'so much'
Property 'common.setting6.ops' was added with value: 'vops'
Property 'group1.baz' was updated. From 'bas' to 'bars'
Property 'group1.nest' was updated. From [complex value] to 'str'
Property 'group2' was removed
Property 'group3' was added with value: [complex value]

json format

[{"type":"parent","key":"common","children":[{"type":"unchanged","key":"setting1","value":"Value 1"},{"type":"deleted","key":"setting2","value":200},{"type":"changed","key":"setting3","oldValue":true,"newValue":{"key":"value"}},{"type":"parent","key":"setting6","children":[{"type":"unchanged","key":"key","value":"value"},{"type":"parent","key":"doge","children":[{"type":"changed","key":"wow","oldValue":"too much","newValue":"so much"}]},{"type":"added","key":"ops","value":"vops"}]},{"type":"added","key":"follow","value":false},{"type":"added","key":"setting4","value":"blah blah"},{"type":"added","key":"setting5","value":{"key5":"value5"}}]},{"type":"parent","key":"group1","children":[{"type":"changed","key":"baz","oldValue":"bas","newValue":"bars"},{"type":"unchanged","key":"foo","value":"bar"},{"type":"changed","key":"nest","oldValue":{"key":"value"},"newValue":"str"}]},{"type":"deleted","key":"group2","value":{"abc":12345,"deep":{"id":45}}},{"type":"added","key":"group3","value":{"fee":100500,"deep":{"id":{"number":45}}}}]

Gendiff app is avaliable fo nested structures.

Setup

$ git clone https://github.com/IgBuS/php-project-lvl2.git

$ make install

If you use Composer, for package install use:

$ composer require biserg/gendiff

If you want app to be available globally, use global installation:

$ composer global require biserg/gendiff

How to run

Local installation: (you have to be in package bin directory)

$ php gendiff

Global installation:

$ gendiff

Result video

asciicast

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-09-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固