Skip to content

Commit

Permalink
feat(release): docs skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Jul 22, 2024
1 parent 6874315 commit be2f44f
Showing 1 changed file with 63 additions and 2 deletions.
65 changes: 63 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/h1alexbel/fakehub/blob/master/LICENSE.txt)
[![Known Vulnerabilities](https://snyk.io/test/github/h1alexbel/fakehub/badge.svg)](https://snyk.io/test/github/h1alexbel/fakehub)

fakehub - A fully functional fake version of a GitHub API that supports all the
features and works locally, with no connection to GitHub at all.
fakehub - A fully functional fake version of a [GitHub API] that supports all
the features and works locally, with no connection to GitHub at all.

**Motivation**. There are many applications that use GitHub API for different
purposes. All of them need to create automated tests, which need to mock the
Expand All @@ -22,8 +22,63 @@ connection to GitHub.

## How to use?

First, install it from [crate][fakehub-crate]:

```bash
cargo install fakehub
```

or with [homebrew] (macOS):

```bash
brew install fakehub
```

Then, run it:

```bash
fakehub start --port 8080
```

Table of contents:

* [Overview](#overview)
* [Login](#login)
* [Repositories](#repositories)
* [Issues](#issues)
* [CLI Options](#cli-options)

### Overview

Fakehub is a full clone of [GitHub API]. This is very beneficial for testing,
when you should not use real GitHub API, but a mock version of it instead.
Fakehub stores all the data in [XML] format in file-system. When request
arrives, we query the storage, transform data into GitHub API-compatible format
([JSON]) and give it to you.

### Login

TBD..

### Repositories

TBD..

### Issues

TBD..

### CLI Options

You can use the following options within `fakehub` command-line tool:

| Name | Value | Default | Description |

Check failure on line 75 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length [Expected: 80; Actual: 147]
|-----------------|---------|---------|-----------------------------------------------------------------------------------------------------------|
| `port` | int | `3000` | Port to run fakehub server on. |

Check failure on line 77 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length [Expected: 80; Actual: 147]
| `v` | boolean | `false` | Verbose run output, i.e. debug logs, etc. |

Check failure on line 78 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length [Expected: 80; Actual: 147]
| `report` | boolean | `false` | Generate report after fakehub shutdown. |

Check failure on line 79 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length [Expected: 80; Actual: 147]
| `report-format` | string | - | Generated report format. Possible values: `latex` for [LaTeX], `xml` for [XML], and `txt` for plain text. |

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Line length [Expected: 80; Actual: 147]

## How to contribute?

Make sure that you have [Rust], [npm], Java 21+ and [just] installed on your
Expand All @@ -36,6 +91,12 @@ avoid frustration, before sending us your pull request please run full build:
just full
```

[GitHub API]: https://docs.github.com/en/rest?apiVersion=2022-11-28
[homebrew]: https://brew.sh
[fakehub-crate]: https://crates.io/crates/fakehub
[LaTeX]: https://en.wikipedia.org/wiki/LaTeX
[XML]: https://en.wikipedia.org/wiki/XML
[JSON]: https://en.wikipedia.org/wiki/JSON
[Rust]: https://www.rust-lang.org/tools/install
[npm]: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
[guidelines]: https://www.yegor256.com/2014/04/15/github-guidelines.html
Expand Down

0 comments on commit be2f44f

Please sign in to comment.