Source code for modules.perl6.org - Perl 6 module listing
Clone or download
Pull request Compare This branch is 791 commits ahead, 18 commits behind masak:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Toss useless `!important` on property Apr 2, 2018
bin Throw away unique run handling in Perl script Apr 2, 2018
lib Remove stray regex quantifier (cpan?) Nov 19, 2018
public Add larger icons indicating dist source Oct 4, 2017
t Fix @inc for newer perls Jul 29, 2018
templates Update donation URL Aug 10, 2018
.gitignore
Build.PL Add missing LWP::Protocol::https Apr 15, 2018
DEPLOYMENT.md Update docs to use newer --restart-app switch Aug 12, 2016
LICENSE
README.md Implement CPAN metas fetcher Oct 1, 2017
TODO-IDEAS.md [REBUILD] Trigger full rebuild Aug 4, 2017
modules.perl6.org-init.d
modules_perl6.conf Remove superfluous "web" dir Nov 22, 2015
site-tips.txt Add a couple more site tips Aug 7, 2017
tag-aliases.json
update-modules.perl6.org Defend against potential commit trigger conflict Aug 8, 2017
use-me-for-commit-triggers [NEWDB] Flush old CPAN dists Oct 18, 2018

README.md

modules.perl6.org

These are the scripts to generate the website on http://modules.perl6.org/

TODOs

Want to help out? Check if any open Issues exist that you might be able to solve. We also have a list of TODO ideas you might be interested in.

Development

Please use the following steps to aid you in your development:

  • Create a token with access to public repositories. To run the scripts, you need a GitHub token with rights to query Perl 6 module GitHub repository information.

  • Save the token in file named github-token

  • Install prerequisites for build script:

    $ perl Build.PL
    $ ./Build installdeps
  • Run build script
    $ perl bin/build-project-list.pl --limit=<number-of-modules>

You can also create file META.list.local that contains specific URLs you may wish to fetch for debug purposes. Use the --meta-list argument to specify the location of that file. See --help for all options.

  • The build script can start the Mojolicious app that powers the front end of you pass the --restart-app option:
    $ perl bin/build-project-list.pl --restart-app

For development purposes, you can use bin/morbo to power the web app, as it will watch for changes and auto-restart the app.

Changes to database

The build script uses a caching mechanism that avoids fetching extra info for a distro if no commits to it were made. If you made a change that needs to update database information for all dists, include string [REBUILD] (including the brackets) as the first thing in your commit message title. That will clear the cache and cause full rebuild.

If you made a change to the structure of the database, specify [NEWDB] as the first thing in the commit's title, to re-deploy site's database. When testing locally, you can just delete existing database file (the tables will be created by deploy from DBIC automatically).

Browser Support

We support the current and previous major releases of Chrome, Firefox, Internet Explorer (Edge), and Safari. Please test layout changes. Lacking actual browsers to test in, you can use browsershots.org or browserstack.com.

Front-End App

This is the app that reads the database generated by the build-project-list.pl script and displays web pages. See DEPLOYMENT.md

Seeing your changes

Once committed, the production cron job will pick up your changes on the 20th and 50th minutes of every hour. The script can take up to 10 minutes to complete.

20,50   *       *       *       *       sh update-modules.perl6.org > log/update.log 2>&1; cp log/update.log /var/www/modules.perl6.org/public/update.log

The cron job results can be found here.

If you only made changes to the web app, you can get them live a bit faster by using [REAPP] as first thing in commit message title (including brackets), which will cause the updater to restart the app after pulling and before rebuilding the db (which takes ~1.5hr)

Note About Cache

Certain data is cached by the site and is only updated when some event (like new commits to the dist's repo) happens. This includes travis statuses, logotypes, and Koality metrics. If your changes require doing so, you can trigger a full rebuild of the database and refresh of caches by including [REBUILD] as part of the title of your commit message.

If you are adding a feature that caches something, it needs to watch for FULL_REBUILD environmental variable and refresh the caches if that variable is set to a true value.

Author

Intial version contributed by patrickas++ on #perl6

LICENSE

See LICENSE file for the details of the license of the code in this repository.

This repository also contains code authored by third parties that may be licensed under a different license. Such files indicate the copyright and license terms at the top of the file. Currently these include: