arkadiy/php-project2

There is no license information available for the latest version (0.1.3) of this package.

A command-line tool educational project

0.1.3 2019-07-13 13:31 UTC

This package is auto-updated.

Last update: 2024-02-29 03:44:36 UTC


README

MaintainabilityBuild Status

Description

A command line utility for generating differences between two configurational files. Supporting file formats:

  • json
  • yaml

This is an educational project for hexlet.

Installation

In order to install and run the utility:

composer global require arkadiy/php-project2

asciicast

Usage

gendiff -h

Generate diff

Usage:
  gendiff (-h|--help)
  gendiff [--format <fmt>] <firstFile> <secondFile>

Options:
  -h --help                     Show this screen
  --format <fmt>                Report format [default: pretty]

It is possible to run the utility directly in the terminal with the command:

composer global require arkadiy/php-project2

It is possible to use the code as a library as well:

use function \Gendiff\genDiff;

Supported config formats

This util supports two different configuration files formats:

  • json
  • yaml

JSON

asciicast

YAML

asciicast

Deep nested configurational files

The util is able to read config files with deep nesting also.

asciicast

Output formats

The output formats are 3:

  • pretty (default format, example is shown in previous videp)
  • plain
  • json

PLAIN FORMAT

asciicast

JSON FORMAT

asciicast

Tests

This project includes unit testing. It is possible to run the tests with:

make test