Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#227] update installation info #230

Merged
merged 6 commits into from
Jan 19, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 41 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,38 @@ Read
[_PDD in Action_](http://www.yegor256.com/2017/04/05/pdd-in-action.html)
and watch [this webinar](https://www.youtube.com/watch?v=nsYGC2aUwfQ).

You should have [Ruby installed](https://www.ruby-lang.org/en/documentation/installation/).
## Installation
<details><summary>

### Prerequisites: `Ruby installed` and `Libmagic`
</summary>
<details><summary>

#### Ruby version 2.7+
</summary>

[Ruby installation instruction](https://www.ruby-lang.org/en/documentation/installation/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that at https://github.com/pnatashap/pdd/tree/227 this link wasn't rendered properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

</details>
<details>
<summary>

#### Libmagic library
</summary>

**For Debian/Ubuntu/\*nix/\*nux**
pnatashap marked this conversation as resolved.
Show resolved Hide resolved
```bash
$ apt install libmagic-dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, this applies only to Debian/Ubuntu/ALT Linux because other distros don't use apt. Perhaps, it's better to explicitly specify these distros?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

```
**For Mac**
```bash
$ brew install libmagic
```
**For Windows**
Unfortunately, there is no easy way to install, please use WSL

</details>
</details>

Then, install our gem:

```bash
Expand All @@ -38,9 +69,10 @@ Run it locally and read its output:
$ pdd --help
```

## Usage
You can exclude & include certain number of files from the search via these options:

```
```bash
$ pdd --exclude=glob
```

Expand All @@ -55,7 +87,7 @@ $ pdd --exclude=src/**/* # exclude all files in src/

You can include too:

```
```bash
$ pdd --include=glob
```

Expand All @@ -80,9 +112,9 @@ to the leading space in every consecutive line):
[related code]
```

`[]` - Replace with apropriate data (see text enclosed in brackets)
`[]` - Replace with appropriate data (see text enclosed in brackets)

`<>` - Omitable (enclosed data can be left out)
`<>` - Optional (enclosed data can be left out)

Example:

Expand Down Expand Up @@ -142,7 +174,7 @@ and put a dummy `#1` marker everywhere.
You can specify post-parsing rules for your puzzles, in command line,
for example:

```
```bash
$ pdd --rule=min-estimate:60 --rule=max-estimate:120
```

Expand Down Expand Up @@ -214,16 +246,16 @@ The most interesting parts of each puzzle are:

Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
Make sure your build is green before you contribute
your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.7+ and
[Bundler](https://bundler.io/) installed. Then:

```
```bash
$ bundle install
$ bundle exec rake
```

Next, install and run overcommit to install hooks (required once)
```
```bash
$ gem install overcommit -v '=0.58.0'
$ overcommit --install
```
Expand Down
Loading