Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Document and improve handling of META.list.local
  • Loading branch information
zoffixznet committed Nov 21, 2015
1 parent 0c3b817 commit 0fb8a2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -17,6 +17,7 @@ web/building-modulesperl6.db
web/bin/hypnotoad.pid
web/secrets
web/dist.ini
web/META.list.local
web/ModulesPerl6-*
web/.build
web/public/proto.json
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -26,6 +26,9 @@ Please use the following steps to aid you in your development:
$ perl 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.

- The build script automatically starts the Mojolicious app that powers the
front end. To disable that behaviour, specify the `--no-app-start` flag:
```bash
Expand Down
8 changes: 7 additions & 1 deletion web/lib-db-builder/P6Project/Info.pm
Expand Up @@ -25,7 +25,13 @@ sub get_projects {
my $ua = $self->p6p->ua;
my $stats = $self->p6p->stats;
my $projects = {};
my $contents = eval { read_file('META.list.local') } || $ua->get($list_url)->res->body;
my $contents = eval {
my $c = read_file('META.list.local')
and warn '## Foregoing fetching META.list and '
. 'using META.list.local instead';
$c;
} || $ua->get($list_url)->res->body;

my $hosts = {
'github' => P6Project::Hosts::Github->new(p6p=>$self->p6p)
};
Expand Down

0 comments on commit 0fb8a2f

Please sign in to comment.