From 8ce65c6f85ddcf198ab73d98c7c1b1040b975d55 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 21 Mar 2021 02:58:28 +0100 Subject: [PATCH 1/5] README: fix code block The homepage of the https://requests.ryanmccue.info/ website is automatically generated from the `readme` file. The last time the site was generated was in 2016. Since then a lot has changed in GH Pages and a lot of the [dependencies](https://pages.github.com/versions/) used to generate a site have been updated to newer releases. Most notable, the kramdown engine has moved from v1 to v2 which has implications for how code blocks are shown on the website. For the best results, it is strongly recommended to not use "whitespace" marked code blocks, but to use code block fencing with a language indicator to enable syntax highlighting as well. This commit fixes up the `README` file in anticipation of the release. --- README.md | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 7893971ee..f5a6f458e 100644 --- a/README.md +++ b/README.md @@ -63,33 +63,37 @@ composer require rmccue/requests ``` or - - { - "require": { - "rmccue/requests": ">=1.0" - } +```json +{ + "require": { + "rmccue/requests": ">=1.0" } +} ### Install source from GitHub To install the source code: - - $ git clone git://github.com/WordPress/Requests.git +```bash +$ git clone git://github.com/WordPress/Requests.git +``` And include it in your scripts: - - require_once '/path/to/Requests/library/Requests.php'; +```php +require_once '/path/to/Requests/library/Requests.php'; +``` You'll probably also want to register an autoloader: - +```php Requests::register_autoloader(); - +``` ### Install source from zip/tarball Alternatively, you can fetch a [tarball][] or [zipball][]: - $ curl -L https://github.com/WordPress/Requests/tarball/master | tar xzv - (or) - $ wget https://github.com/WordPress/Requests/tarball/master -O - | tar xzv +```bash +$ curl -L https://github.com/WordPress/Requests/tarball/master | tar xzv +or) +$ wget https://github.com/WordPress/Requests/tarball/master -O - | tar xzv +``` [tarball]: https://github.com/WordPress/Requests/tarball/master [zipball]: https://github.com/WordPress/Requests/zipball/master @@ -98,8 +102,9 @@ Alternatively, you can fetch a [tarball][] or [zipball][]: ### Using a Class Loader If you're using a class loader (e.g., [Symfony Class Loader][]) for [PSR-0][]-style class loading: - - $loader->registerPrefix('Requests', 'path/to/vendor/Requests/library'); +```php +$loader->registerPrefix('Requests', 'path/to/vendor/Requests/library'); +``` [Symfony Class Loader]: https://github.com/symfony/ClassLoader [PSR-0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md @@ -132,12 +137,14 @@ set of tests. We're not quite there yet, but [we're getting close][codecov]. To run the test suite, first check that you have the [PHP JSON extension ](http://php.net/manual/en/book.json.php) enabled. Then simply: - - $ phpunit +```bash +$ phpunit +``` If you'd like to run a single set of tests, specify just the name: - - $ phpunit Transport/cURL +```bash +$ phpunit Transport/cURL +``` Contribute ---------- From a4a72a244c85875f78039ae7c5f9080ec00ec755 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Fri, 16 Apr 2021 12:20:32 +0100 Subject: [PATCH 2/5] Close unclosed code block --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f5a6f458e..74c792a10 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ or "rmccue/requests": ">=1.0" } } +``` ### Install source from GitHub To install the source code: From 1895cb01a70018e6d09964b1a653a7e364ecb87a Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Fri, 16 Apr 2021 12:21:08 +0100 Subject: [PATCH 3/5] Remove redundant indentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74c792a10..561257a8d 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ require_once '/path/to/Requests/library/Requests.php'; You'll probably also want to register an autoloader: ```php - Requests::register_autoloader(); +Requests::register_autoloader(); ``` ### Install source from zip/tarball From ee78ae7b757675cab047aac017c683d60e662a48 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Fri, 16 Apr 2021 12:22:06 +0100 Subject: [PATCH 4/5] Fix (or) separator --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 561257a8d..35dddf555 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,9 @@ Alternatively, you can fetch a [tarball][] or [zipball][]: ```bash $ curl -L https://github.com/WordPress/Requests/tarball/master | tar xzv -or) +``` +(or) +```bash $ wget https://github.com/WordPress/Requests/tarball/master -O - | tar xzv ``` From 413e499fd778771e9a09c7543d2753d113dd47c0 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Fri, 16 Apr 2021 12:23:27 +0100 Subject: [PATCH 5/5] Keep intended (or) formatting --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 35dddf555..1af19cda8 100644 --- a/README.md +++ b/README.md @@ -92,9 +92,7 @@ Alternatively, you can fetch a [tarball][] or [zipball][]: ```bash $ curl -L https://github.com/WordPress/Requests/tarball/master | tar xzv -``` (or) -```bash $ wget https://github.com/WordPress/Requests/tarball/master -O - | tar xzv ```