From 9d08607abd239e14c204c2f5938a5063ce6e5ffc Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 7 May 2024 16:22:29 -0400 Subject: [PATCH] Wrap markdown files at 80 chars --- .github/CONTRIBUTING.md | 121 ++++++++++++---------- .github/ISSUE_TEMPLATE/bug_report.md | 11 +- .github/ISSUE_TEMPLATE/feature_request.md | 3 +- News.md | 120 +++++++++++---------- README.md | 35 ++++--- precious.toml | 2 +- 6 files changed, 163 insertions(+), 129 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 53ec6a82db9..69256cf724a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -6,68 +6,76 @@ We are always after more contributors and suggestions. #### Does it relate to our API (backend)... ? -1. Please check the [previously reported API issues](https://github.com/CPAN-API/cpan-api/issues) -2. Please check the [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist). If you can't +1. Please check the + [previously reported API issues](https://github.com/CPAN-API/cpan-api/issues) +2. Please check the + [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist). If you can't find it already there: - If it's a wishlist idea, please edit the - [wiki](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) (add a 'wishlist_MYIDEA' page if - you need more space!) - - If it's an actual bug [create a new issue](https://github.com/CPAN-API/cpan-api/issues/new) + [wiki](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) (add a + 'wishlist_MYIDEA' page if you need more space!) + - If it's an actual bug + [create a new issue](https://github.com/CPAN-API/cpan-api/issues/new) #### If you are not sure, or it is related to https://metacpan.org/ front end: 1. Please check the [previously reported Web issues](https://github.com/CPAN-API/metacpan-web/issues) -2. Please check the [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist). If you can't +2. Please check the + [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist). If you can't find it already there: - If it's a wishlist idea, please edit the - [wiki](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) (add a 'wishlist_MYIDEA' page if - you need more space!) + [wiki](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) (add a + 'wishlist_MYIDEA' page if you need more space!) - If it's an actual bug [create a new issue](https://github.com/CPAN-API/metacpan-web/issues/new) ## Contributing code -Come talk to us on IRC (see below), or send a pull request and we'll respond there. If you implement -a new feature, please add a note about it to the News.md file at the top level of metacpan-web so -that it will appear in our news feed. +Come talk to us on IRC (see below), or send a pull request and we'll respond +there. If you implement a new feature, please add a note about it to the News.md +file at the top level of metacpan-web so that it will appear in our news feed. -If you aren't using the VM, remember to enable the pre-commit hook before you start working. +If you aren't using the VM, remember to enable the pre-commit hook before you +start working. sh git/setup.sh These links will get you going quickly: -- [Using our developer VM](https://github.com/CPAN-API/metacpan-developer) to get you going in - minutes (depending on bandwidth) +- [Using our developer VM](https://github.com/CPAN-API/metacpan-developer) to + get you going in minutes (depending on bandwidth) - [Front end bug list](https://github.com/CPAN-API/metacpan-web/issues) - [API (back end) bug list](https://github.com/CPAN-API/cpan-api/issues) -- [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) - things that probably need doing +- [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) - things that + probably need doing # Git workflow -We try to keep a clean git history, so if it all possible, please rebase to get the latest changes -from master _before_ submitting a pull request. You'll only need to do the first command (git remote -add) once in your local checkout. +We try to keep a clean git history, so if it all possible, please rebase to get +the latest changes from master _before_ submitting a pull request. You'll only +need to do the first command (git remote add) once in your local checkout. git remote add upstream https://github.com/CPAN-API/metacpan-web.git git pull --rebase upstream master -If you are comfortable rebasing, it is also helpful to squash or delete commits which are no longer -relevant to your branch before submitting your work. +If you are comfortable rebasing, it is also helpful to squash or delete commits +which are no longer relevant to your branch before submitting your work. git rebase -i master -If you are not comfortable with rebasing, but want to use it, check out the steps from -[here](https://help.github.com/articles/using-git-rebase/). +If you are not comfortable with rebasing, but want to use it, check out the +steps from [here](https://help.github.com/articles/using-git-rebase/). # Coding conventions -Please try to follow the conventions already been used in the code base. This will generally be the -right thing to do. Our standards are improving, so even if you do follow what you see, we may ask -you to make some changes, but that is a good thing. We are trying to keep things tidy. +Please try to follow the conventions already been used in the code base. This +will generally be the right thing to do. Our standards are improving, so even if +you do follow what you see, we may ask you to make some changes, but that is a +good thing. We are trying to keep things tidy. -If you are using the [developer VM](https://github.com/CPAN-API/metacpan-developer) you can run: +If you are using the +[developer VM](https://github.com/CPAN-API/metacpan-developer) you can run: ```sh /home/vagrant/carton/metacpan-web/bin/tidyall @@ -75,50 +83,55 @@ If you are using the [developer VM](https://github.com/CPAN-API/metacpan-develop ## Perl Best Practices -In general, the concepts discussed in "Perl Best Practices" are a good starting point. Use autodie -where possible and MetaCPAN::Web::Types when creating new Moose attributes. Many of the other -standards will be enforced by Perl::Critic. +In general, the concepts discussed in "Perl Best Practices" are a good starting +point. Use autodie where possible and MetaCPAN::Web::Types when creating new +Moose attributes. Many of the other standards will be enforced by Perl::Critic. ## Clear > Concise -Take pains to use variable names which are easy to understand and to write readable code. We value -readable code over concise code. Use singular nouns for class names. Use verbs for method names. +Take pains to use variable names which are easy to understand and to write +readable code. We value readable code over concise code. Use singular nouns for +class names. Use verbs for method names. ## Try::Tiny > eval { ... } -You will see many eval statements in the code. We would like to standardize on Try::Tiny, so feel -free to swap out any eval with a Try::Tiny and use Try::Tiny in all new code. +You will see many eval statements in the code. We would like to standardize on +Try::Tiny, so feel free to swap out any eval with a Try::Tiny and use Try::Tiny +in all new code. ## Prefer single quotes -Always use single quotes in cases where there is no variable interpolation. If there is a single -quote in the quoted item, use curly quotes. +Always use single quotes in cases where there is no variable interpolation. If +there is a single quote in the quoted item, use curly quotes. q{Isn't this a lovely day}; ## Include a test (or more!) -Any time when a pull request includes a test, it makes it easier for us to review and accept, so -please do test your changes whenever possible. If your pull request includes visual changes, please -include a before and after screen shot, so that we can better understand the problem you're trying -to solve. +Any time when a pull request includes a test, it makes it easier for us to +review and accept, so please do test your changes whenever possible. If your +pull request includes visual changes, please include a before and after screen +shot, so that we can better understand the problem you're trying to solve. ## Dependencies -Introducing new dependencies is fine, if they solve a specific problem which current dependencies -cannot address. If we prefer a different module to be used, we'll let you know. +Introducing new dependencies is fine, if they solve a specific problem which +current dependencies cannot address. If we prefer a different module to be used, +we'll let you know. ## It's OK to be controversial -If a pull request contains any controversial changes, we'll likely wait for some feedback from -several developers before a merge. If you think your changes may be controversial, feel free to -discuss them in a GitHub issue before starting to write any code. +If a pull request contains any controversial changes, we'll likely wait for some +feedback from several developers before a merge. If you think your changes may +be controversial, feel free to discuss them in a GitHub issue before starting to +write any code. ## Travis is your friend -We use Travis to test all code changes. After submitting your pull request, remember to check back -to see whether Travis has come back with any test failures. We do get some false negatives. If your -pull request failed for reasons unrelated to your changes, we may still be able to merge your work. +We use Travis to test all code changes. After submitting your pull request, +remember to check back to see whether Travis has come back with any test +failures. We do get some false negatives. If your pull request failed for +reasons unrelated to your changes, we may still be able to merge your work. # Additional Resources @@ -133,11 +146,13 @@ pull request failed for reasons unrelated to your changes, we may still be able ### When are issues closed? -We want to keep the issue list manageable, so we can focus on what actually needs fixing. If you -feel an issue needs opening again, please add a comment explaining why it needs re-opening and we'll -look at it again. +We want to keep the issue list manageable, so we can focus on what actually +needs fixing. If you feel an issue needs opening again, please add a comment +explaining why it needs re-opening and we'll look at it again. -- Issues will be closed and moved to [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) - if they are not actual bugs +- Issues will be closed and moved to + [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) if they are not + actual bugs - Issues we think we have addressed will be closed -- Issues we are not going to take any further action on without more information will be closed +- Issues we are not going to take any further action on without more information + will be closed diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2b5880fdf45..03065edabbc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,10 +8,10 @@ assignees: "" **PLEASE NOTE** -This issue tracker is for bugs in the https://metacpan.org web site. If you are are reporting a bug -about anything else, this is most likely not the correct venue. Please use the left side menu for -the module you are interested in and click the `Issues` link in order to find the bug tracker for -your module. +This issue tracker is for bugs in the https://metacpan.org web site. If you are +are reporting a bug about anything else, this is most likely not the correct +venue. Please use the left side menu for the module you are interested in and +click the `Issues` link in order to find the bug tracker for your module. **Describe the bug** A clear and concise description of what the bug is. @@ -22,7 +22,8 @@ your module. 3. Scroll down to '....' 4. See error -**Expected behavior** A clear and concise description of what you expected to happen. +**Expected behavior** A clear and concise description of what you expected to +happen. **Screenshots** If applicable, add screenshots to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 04687f3abda..ade111c2a2c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -12,6 +12,7 @@ assignees: "" **Expected behavior** A clear and concise description of what you expect to see. -**Volunteering** Are you willing to implement (or help to implement) this feature? +**Volunteering** Are you willing to implement (or help to implement) this +feature? **Additional context** Add any other context about the request here. diff --git a/News.md b/News.md index 3567bd5433e..d57e32854ad 100644 --- a/News.md +++ b/News.md @@ -15,9 +15,11 @@ We're now rendering .md files as HTML instead of as raw code. Date: 2018-12-02T19:30:00 -As [announced](https://log.perl.org/2018/05/goodbye-search-dot-cpan-dot-org.html) in the Perl NOC, -search.cpan.org is going to redirect all traffic to MetaCPAN from 25th of June 2018. We are doing -lots of work to prepare for this trebling of traffic. +As +[announced](https://log.perl.org/2018/05/goodbye-search-dot-cpan-dot-org.html) +in the Perl NOC, search.cpan.org is going to redirect all traffic to MetaCPAN +from 25th of June 2018. We are doing lots of work to prepare for this trebling +of traffic. ## Title: MetaHack 2 @@ -33,51 +35,57 @@ http://blogs.perl.org/users/leo_lapworth/2017/11/metahack-2.html Date: 2014-12-02T19:30:00 -Our servers have had their SSL configuration upgraded, so we now get an A rating on +Our servers have had their SSL configuration upgraded, so we now get an A rating +on [SSL Labs](https://www.ssllabs.com/ssltest/analyze.html?d=fastapi.metacpan.org). [Fastly](https://www.fastly.com) who serve all our content other than the -[api](https://fastapi.metacpan.org/) already had tight configs... and now so do we. I'd like to -thank then for providing both examples, support and an IRC channel where Donald Stufft from the -Python infrastructure team was able to help out. +[api](https://fastapi.metacpan.org/) already had tight configs... and now so do +we. I'd like to thank then for providing both examples, support and an IRC +channel where Donald Stufft from the Python infrastructure team was able to help +out. -All our configs and systems are in our [github repos](https://github.com/metacpan/) so feel free to -review / improve or 'borrow' configs from. +All our configs and systems are in our +[github repos](https://github.com/metacpan/) so feel free to review / improve or +'borrow' configs from. ## Title: Liquid Web is Sponsoring MetaCPAN Date: 2014-11-08T03:00:00 -We're immensely pleased to announce that [Liquid Web Inc.](https://www.liquidweb.com/) is our newest -hosting sponsor. This sponsorship entails 3 powerful machines which are provided and co-located by -Liquid Web Inc. Having access to this hardware will allow us greater redundancy in addition to -giving us powerful machines to use as a staging area when developing new MetaCPAN features. This is -a huge development for us and we'd like to thank Liquid Web Inc. for this very kind donation. More -details to come! +We're immensely pleased to announce that +[Liquid Web Inc.](https://www.liquidweb.com/) is our newest hosting sponsor. +This sponsorship entails 3 powerful machines which are provided and co-located +by Liquid Web Inc. Having access to this hardware will allow us greater +redundancy in addition to giving us powerful machines to use as a staging area +when developing new MetaCPAN features. This is a huge development for us and +we'd like to thank Liquid Web Inc. for this very kind donation. More details to +come! ## Title: Server move - phase 2 Date: 2014-10-21T19:00:00 -We have moved all sites over to [Fastly](https://www.fastly.com) (where possible) and they are -backed up by the new [Bytemark](https://www.bytemark.co.uk/) servers. +We have moved all sites over to [Fastly](https://www.fastly.com) (where +possible) and they are backed up by the new +[Bytemark](https://www.bytemark.co.uk/) servers. -We have further plans... but this will do for now, many thanks to our sponsors for making this -possible. +We have further plans... but this will do for now, many thanks to our sponsors +for making this possible. [network-infrastructure](https://github.com/metacpan/network-infrastructure) and -[metacpan-puppet](https://github.com/metacpan/metacpan-puppet) have all our configs if you want to -see details of anything. +[metacpan-puppet](https://github.com/metacpan/metacpan-puppet) have all our +configs if you want to see details of anything. ## Title: Server move - phase 1 Date: 2014-09-19T19:00:00 -We are moving servers, [Bytemark](https://www.bytemark.co.uk/) have asked for the old one back... -and given us 2 new ones in replacement! +We are moving servers, [Bytemark](https://www.bytemark.co.uk/) have asked for +the old one back... and given us 2 new ones in replacement! -We are moving as much as possible to [Fastly](https://www.fastly.com) CDN which makes switching -origins very easy, and instant. +We are moving as much as possible to [Fastly](https://www.fastly.com) CDN which +makes switching origins very easy, and instant. So far we have moved... @@ -87,40 +95,44 @@ So far we have moved... - http://mcpan.org/ We will be documenting this a bit more under -[Network Infrastructure](https://github.com/metacpan/network-infrastructure) but that's a work in -progress. +[Network Infrastructure](https://github.com/metacpan/network-infrastructure) but +that's a work in progress. ## Title: Let's move to Bootstrap 3 Date: 2014-08-06T08:55:22 MetaCPAN has moved to Bootstrap 3 as well as introducing cool icons from -[Font Awesome](http://fortawesome.github.io/Font-Awesome/). Let's make MetaCPAN be more colorful! +[Font Awesome](http://fortawesome.github.io/Font-Awesome/). Let's make MetaCPAN +be more colorful! ## Title: Link to Task::Kensho is now available on home page and no result page Date: 2014-06-14T23:25:11 -If you’re absolute newbies who're not even sure what to search, it will be good idea to take a look -at [Task::Kensho!](https://metacpan.org/pod/Task::Kensho) We provide a link to the module in both -Home page and No result page with the idea to help CPAN beginners to get started. +If you’re absolute newbies who're not even sure what to search, it will be good +idea to take a look at [Task::Kensho!](https://metacpan.org/pod/Task::Kensho) We +provide a link to the module in both Home page and No result page with the idea +to help CPAN beginners to get started. ## Title: Faster with Fastly Date: 2014-06-14T18:44:15 -You may have noticed an increase in speed for https://metacpan.org/ since the 22nd of May, this is -because the site is now served through [Fastly](https://www.fastly.com/). Fastly are providing this -service free of charge. We are not fully utilising is yet (we don't let Fastly cache much), but it -makes all sorts of things easier for us and we will be able to do even more for you with it in the -future. +You may have noticed an increase in speed for https://metacpan.org/ since the +22nd of May, this is because the site is now served through +[Fastly](https://www.fastly.com/). Fastly are providing this service free of +charge. We are not fully utilising is yet (we don't let Fastly cache much), but +it makes all sorts of things easier for us and we will be able to do even more +for you with it in the future. ## Title: Suggestion on incorrect number of colons Date: 2014-06-09T08:15:00 -Perl module name should contain only 2 colons, some common mistakes are we underuse or overuse it. -Now, suggestion on no result page available when search with missing colon such as +Perl module name should contain only 2 colons, some common mistakes are we +underuse or overuse it. Now, suggestion on no result page available when search +with missing colon such as [Test:More](https://metacpan.org/search?q=Test%3AMore) or too much colons like [DBIx:::Class::::ResultSet](https://metacpan.org/search?q=DBIx%3A%3A%3AClass%3A%3A%3A%3AResultSet). @@ -128,18 +140,19 @@ Now, suggestion on no result page available when search with missing colon such Date: 2014-05-19T10:50:12 -When you change the sorting of a table it will be saved in your browser's localStorage so that the -next time you view that particular table it will remember your last preference. This is saved on a -per table basis (for example, author releases, author favorites, and reverse dependency releases). -No need to set it every time when accessing that page in the same browser. +When you change the sorting of a table it will be saved in your browser's +localStorage so that the next time you view that particular table it will +remember your last preference. This is saved on a per table basis (for example, +author releases, author favorites, and reverse dependency releases). No need to +set it every time when accessing that page in the same browser. ## Title: Details of (++)plussers displayed Date: 2014-05-12T18:40:17 -To get a better insight of which Pause users have ++ed a particular distribution, a list of their -gravatar images is displayed. Also, the count of non-Pause plussers makes it easier to know how many -users have liked the module. +To get a better insight of which Pause users have ++ed a particular +distribution, a list of their gravatar images is displayed. Also, the count of +non-Pause plussers makes it easier to know how many users have liked the module. Hence, it gives us a perception of the people who recommend the module. @@ -147,19 +160,20 @@ Hence, it gives us a perception of the people who recommend the module. Date: 2014-05-13T20:50:10 -Jeffrey Thalhammer took the time this week to contribute dependency graphs to MetaCPAN. The graphs -are hosted by [Stratopan](https://stratopan.com) and they can be found on module and release pages -under the "Reverse Dependencies" link. +Jeffrey Thalhammer took the time this week to contribute dependency graphs to +MetaCPAN. The graphs are hosted by [Stratopan](https://stratopan.com) and they +can be found on module and release pages under the "Reverse Dependencies" link. -Thanks very much to [THALJEF](https://metacpan.org/author/THALJEF) for implementing this new -feature. +Thanks very much to [THALJEF](https://metacpan.org/author/THALJEF) for +implementing this new feature. ## Title: News feed of MetaCPAN created Date: 2014-04-15T21:10:10 -In this news feed you can follow the development of the MetaCPAN site. There is also an -[Atom feed](/feed/news). +In this news feed you can follow the development of the MetaCPAN site. There is +also an [Atom feed](/feed/news). -If you are interested in how the news feed itself was implemented, check out the article +If you are interested in how the news feed itself was implemented, check out the +article [Adding a News Feed to MetaCPAN](https://perlmaven.com/adding-news-feed-to-metacpan) diff --git a/README.md b/README.md index da144dd97a4..bb6c99e8505 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,9 @@ # Getting Started -We strongly recommend using [metacpan-docker](https://github.com/metacpan/metacpan-docker). This -will give you a virtual machine already configured and ready to start developing on. +We strongly recommend using +[metacpan-docker](https://github.com/metacpan/metacpan-docker). This will give +you a virtual machine already configured and ready to start developing on. If you prefer not to use Docker, the following commands will get you started: @@ -35,15 +36,15 @@ If you like, you can install `carton` via Homebrew: brew install carton ``` -If your `carton install` is having issues with SSL-related modules, you may need to use an -`OPENSSL_PREFIX`. Something like: +If your `carton install` is having issues with SSL-related modules, you may need +to use an `OPENSSL_PREFIX`. Something like: ```bash OPENSSL_PREFIX="/usr/local/Cellar/openssl@1.1/1.1.1q" carton install ``` -You may need to check `/usr/local/Cellar/openssl@1.1` to find the latest installed path on your -system. +You may need to check `/usr/local/Cellar/openssl@1.1` to find the latest +installed path on your system. ## Running Tests @@ -51,7 +52,8 @@ You can use the supplied wrapper around `prove` to run tests: ./bin/prove t -To run the tests in parallel, add `-j8` (or however many CPUs you have) to the `prove` command. +To run the tests in parallel, add `-j8` (or however many CPUs you have) to the +`prove` command. ## Running the App @@ -71,15 +73,15 @@ You will want to set up the supplied pre-commit Git hook like so: ./git/setup.sh -which causes `precious` to be run before each commit. You can manually run this with -`precious path/to/file` +which causes `precious` to be run before each commit. You can manually run this +with `precious path/to/file` ## Local Configuration Changes -The back end defaults to `fastapi.metacpan.org`. Running a local API server is optional and not -required to hack on the front end. The address to the API being used can be changed in the -`metacpan_web.conf` file. Ideally you would create a new file called `metacpan_web_local.conf` that -contains +The back end defaults to `fastapi.metacpan.org`. Running a local API server is +optional and not required to hack on the front end. The address to the API being +used can be changed in the `metacpan_web.conf` file. Ideally you would create a +new file called `metacpan_web_local.conf` that contains api http://127.0.0.1:5000 @@ -87,6 +89,7 @@ which will be loaded on top of the existing config file. ## Compatibility Notes -On Win32 (and possibly also on other platforms) when using Perl < 5.12, the server started with -plackup will generate warnings relating to date parsing. These are caused by Plack due to a bug in -the gmtime implementation and can be removed by upgrading to Perl 5.12. +On Win32 (and possibly also on other platforms) when using Perl < 5.12, the +server started with plackup will generate warnings relating to date parsing. +These are caused by Plack due to a bug in the gmtime implementation and can be +removed by upgrading to Perl 5.12. diff --git a/precious.toml b/precious.toml index 565f4fdf4f3..7e98b357df2 100644 --- a/precious.toml +++ b/precious.toml @@ -48,7 +48,7 @@ include = "**/*.md" cmd = [ "./node_modules/.bin/prettier", "--no-config", - "--print-width", "100", + "--print-width", "80", "--prose-wrap", "always", ] lint-flags = "--check"