From 8fe48f1ce879095d5a9e2fb6fcad590d9870c4c2 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Mon, 15 Jan 2024 22:44:55 -0500 Subject: [PATCH 1/4] [#227] Add installation instruction info --- README.md | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 75cd455..0e7bdbe 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,37 @@ 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 +
+ +### Prerequisites: `Ruby installed` and `Libmagic` + +
+ +#### Ruby version 2.7+ + +[Ruby installation instruction](https://www.ruby-lang.org/en/documentation/installation/) +
+
+ + +#### Libmagic library + + +**For \*nix** +```bash +$ apt install libmagic-dev +``` +**For Mac** +```bash +$ brew install libmagic +``` +**For Windows** +Unfortunately, there is no easy way to install, please use WSL + +
+
+ Then, install our gem: ```bash @@ -38,9 +68,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 ``` @@ -55,7 +86,7 @@ $ pdd --exclude=src/**/* # exclude all files in src/ You can include too: -``` +```bash $ pdd --include=glob ``` @@ -80,9 +111,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: @@ -142,7 +173,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 ``` @@ -217,13 +248,13 @@ 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 [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 ``` From 34a35bf303a89fe7b29ef17e0294083f9612e9d7 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Tue, 16 Jan 2024 23:59:54 -0500 Subject: [PATCH 2/4] [#227] Add a space to display the link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0e7bdbe..c3e2039 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ and watch [this webinar](https://www.youtube.com/watch?v=nsYGC2aUwfQ). #### Ruby version 2.7+ + [Ruby installation instruction](https://www.ruby-lang.org/en/documentation/installation/)
From 2877165b2145bcdaed070ccf318a75c2025b6013 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Wed, 17 Jan 2024 00:36:06 -0500 Subject: [PATCH 3/4] [#227] Fix for Ruby version and os names --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c3e2039..3e49ee1 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ and watch [this webinar](https://www.youtube.com/watch?v=nsYGC2aUwfQ). #### Libmagic library -**For \*nix** +**For Debian/Ubuntu/\*nix/\*nux** ```bash $ apt install libmagic-dev ``` @@ -246,7 +246,7 @@ 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 From 98876b61a6aeac9b22309251b06e39fdb26d329a Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Wed, 17 Jan 2024 10:58:33 -0500 Subject: [PATCH 4/4] Update README.md Co-authored-by: Slava Semushin --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e49ee1..bad939c 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ and watch [this webinar](https://www.youtube.com/watch?v=nsYGC2aUwfQ). #### Libmagic library -**For Debian/Ubuntu/\*nix/\*nux** +**For Debian/Ubuntu:** ```bash $ apt install libmagic-dev ```