From b8d59e60a7088ea522c6f164c886b6d196ef2ab8 Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Mon, 2 Aug 2021 11:54:49 +0200 Subject: [PATCH 1/9] docs: create development.md --- docs/development.md | 103 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 docs/development.md diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 0000000..9e7dcf5 --- /dev/null +++ b/docs/development.md @@ -0,0 +1,103 @@ +## Development +> Guide to local development of this plugin + +### Installation + +#### Requirements + +- Ruby +- Bundler + +#### Install system dependencies + +- Install Ruby - see the [Downloads](https://www.ruby-lang.org/en/downloads/) page. +- Install Bundler - see [Bundler](https://bundler.io/) homepage. + +#### Clone + +Clone the repo, or your fork. + +```bash +$ git clone git@github.com:jekyll/github-metadata.git +$ cd github-metadata +``` + +#### Install project dependencies + +Configure Bundler. + +```bash +$ bundle config set --local path vendor/bundle +``` + +Install gems. + +```bash +$ bundle install +``` + +Or, for a faster install. + +```bash +$ script/bootstrap +``` + +## Usage + +See the [script](/script/) directory. + +### Format + +Check formatting. + +```bash +$ script/fmt +``` + +Fix formatting issues. + +```bash +$ script/fmt -a +``` + +### Open interactive console + +```bash +$ script/console +``` + +### Test + +Run all unit tests: + +```bash +$ script/test +``` + +Run specific unit tests. + +```bash +$ script/test PATH +$ # e.g. +$ script/test spec/owner_spec.rb +``` + +### Test site + +Run dev server for sample Jekyll site. + +```bash +$ script/test-site +``` + +Then open in the browser at + +- http://127.0.0.1:4000 + +## Release + +Run tests, formatting and create a release. + +```bash +$ script/release +``` From 28a7498d5a5ef26e203c190f884a5ec06a222627 Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Mon, 2 Aug 2021 11:58:51 +0200 Subject: [PATCH 2/9] docs: update docs/README.md --- docs/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/README.md b/docs/README.md index c75d3e2..111fc71 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,22 +19,24 @@ Jekyll plugin to propagate the `site.github` namespace and set default values fo ## Usage -Usage of this gem is pretty straight-forward. Add it to your bundle like this: +Usage of this gem is pretty straight-forward. Add it to your `Gemfile` like this: ```ruby gem "jekyll-github-metadata" ``` -Now add it to your `_config.yml`: +Add it to your `_config.yml`: ```yaml plugins: - "jekyll-github-metadata" ``` -:warning: If you are using Jekyll < 3.5.0 use the `gems` key instead of `plugins`. +:warning: If you are using Jekyll < 3.5.0, use the `gems` key instead of `plugins`. -Then go ahead and run `bundle install`. Once you've done that jekyll-github-metadata will run when you run Jekyll. +Then go ahead and run `bundle install`. + +Now, whenever you build or serve with Jekyll, the `jekyll-github-metadata` plugin will run. ## Further reading @@ -43,3 +45,4 @@ Then go ahead and run `bundle install`. Once you've done that jekyll-github-meta * [Configuration](configuration.md) * [Using `site.github`](site.github.md) * [Edit on GitHub link](edit-on-github-link.md) +* [Development](development.md) From 58ebde3c11dc04831d43c2d894c471163526d22a Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Tue, 3 Aug 2021 11:46:53 +0200 Subject: [PATCH 3/9] docs: apply suggestion to development.md --- docs/development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development.md b/docs/development.md index 9e7dcf5..6bf4b43 100644 --- a/docs/development.md +++ b/docs/development.md @@ -68,7 +68,7 @@ $ script/console ### Test -Run all unit tests: +Run all unit tests. ```bash $ script/test From feaaa5f52b7459f327032548e02dd009e9f93e8a Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Tue, 3 Aug 2021 11:48:25 +0200 Subject: [PATCH 4/9] docs: apply suggestion to development.md --- docs/development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development.md b/docs/development.md index 6bf4b43..c9bf3cd 100644 --- a/docs/development.md +++ b/docs/development.md @@ -48,7 +48,7 @@ See the [script](/script/) directory. ### Format -Check formatting. +Check for code formatting issues - recommended before you commit. ```bash $ script/fmt From aa2512a3a557965eae2c487001e2835f2e064707 Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Tue, 3 Aug 2021 11:57:18 +0200 Subject: [PATCH 5/9] docs: update development.md --- docs/development.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/development.md b/docs/development.md index c9bf3cd..017f121 100644 --- a/docs/development.md +++ b/docs/development.md @@ -74,23 +74,41 @@ Run all unit tests. $ script/test ``` -Run specific unit tests. +Run a target unit test file by specifying a path. ```bash -$ script/test PATH -$ # e.g. $ script/test spec/owner_spec.rb ``` -### Test site +#### Flags -Run dev server for sample Jekyll site. +Run tests in the order they are written (not a random order). + +```bash +$ script/test --order defined +``` + +Run tests in the same random order as a previous run. + +```bash +$ script/test --seed 12345 +``` + +Run tests with verbose trace logs. + +```bash +$ script/test --format documentation +``` + +### Start dev server + +Preview the plugin in Jekyll by running the repo's sample Jekyll site. ```bash $ script/test-site ``` -Then open in the browser at +Then open in the browser at: - http://127.0.0.1:4000 From ed87f54a45a84de6b25436e0b8608d75fe51f821 Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Tue, 3 Aug 2021 11:58:55 +0200 Subject: [PATCH 6/9] docs: fix headings --- docs/development.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/development.md b/docs/development.md index 017f121..3f2d5cf 100644 --- a/docs/development.md +++ b/docs/development.md @@ -42,11 +42,11 @@ Or, for a faster install. $ script/bootstrap ``` -## Usage +### Usage See the [script](/script/) directory. -### Format +#### Format Check for code formatting issues - recommended before you commit. @@ -60,13 +60,15 @@ Fix formatting issues. $ script/fmt -a ``` -### Open interactive console +#### Open interactive console ```bash $ script/console ``` -### Test +#### Test + +##### All Run all unit tests. @@ -74,13 +76,15 @@ Run all unit tests. $ script/test ``` +##### Target + Run a target unit test file by specifying a path. ```bash $ script/test spec/owner_spec.rb ``` -#### Flags +##### Flags Run tests in the order they are written (not a random order). @@ -100,7 +104,7 @@ Run tests with verbose trace logs. $ script/test --format documentation ``` -### Start dev server +#### Start dev server Preview the plugin in Jekyll by running the repo's sample Jekyll site. @@ -112,7 +116,7 @@ Then open in the browser at: - http://127.0.0.1:4000 -## Release +### Release Run tests, formatting and create a release. From ec0ef8b1a3daf70e6fdb3745db480b378ad921e7 Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Tue, 3 Aug 2021 12:00:08 +0200 Subject: [PATCH 7/9] docs: update development.md --- docs/development.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/development.md b/docs/development.md index 3f2d5cf..2952bd1 100644 --- a/docs/development.md +++ b/docs/development.md @@ -68,23 +68,19 @@ $ script/console #### Test -##### All - Run all unit tests. ```bash $ script/test ``` -##### Target - Run a target unit test file by specifying a path. ```bash $ script/test spec/owner_spec.rb ``` -##### Flags +See some recommended flags below. Run tests in the order they are written (not a random order). From bd690d8de2caabd08d116a9ec203850c30339e8b Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Wed, 4 Aug 2021 12:47:13 +0200 Subject: [PATCH 8/9] docs: apply review suggestion to docs/development.md Co-authored-by: Matt Rogers --- docs/development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development.md b/docs/development.md index 2952bd1..2993b79 100644 --- a/docs/development.md +++ b/docs/development.md @@ -11,7 +11,7 @@ #### Install system dependencies - Install Ruby - see the [Downloads](https://www.ruby-lang.org/en/downloads/) page. -- Install Bundler - see [Bundler](https://bundler.io/) homepage. +- Install Bundler - see the [Bundler](https://bundler.io/) homepage. #### Clone From b31f32d228ac05d17a4723cf006a12e13551f4e5 Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Wed, 4 Aug 2021 12:49:20 +0200 Subject: [PATCH 9/9] docs: apply review suggestion to docs/development.md Co-authored-by: Matt Rogers --- docs/development.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/development.md b/docs/development.md index 2993b79..6c00274 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,5 +1,6 @@ ## Development -> Guide to local development of this plugin + +Guide to local development of this plugin ### Installation