File tree Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 4040);
4141
4242# setup
43- $cve_url //= ' https://cpan-security.github.io/cpansa-feed/cpansa.json' ;
44- $cve_dev_url //= ' https://cpan-security.github.io/cpansa-feed/cpansa_dev.json' ;
43+ $cve_url //= ' https://cpan-security.github.io/cpansa-feed/cpansa.json' ;
44+ $cve_dev_url
45+ / /= 'https://cpan-security.github.io/cpansa-feed/cpansa_dev.json';
4546
4647my $es_release = MetaCPAN::ES->new( index => "release" );
4748my $es_cve = MetaCPAN::ES->new( index => "cve" );
Original file line number Diff line number Diff line change 1212use MetaCPAN::Ingest qw< read_url > ;
1313
1414# args
15- my ( $json );
16- GetOptions(
17- " json=s" => \$json ,
18- );
15+ my ($json );
16+ GetOptions( " json=s" => \$json , );
1917
2018# setup
2119my $river_url //= ' https://neilb.org/river-of-cpan.json.gz' ;
22- my $river_data = decode_json( $json ? path($json )-> slurp : read_url($river_url ) );
20+ my $river_data
21+ = decode_json( $json ? path($json )-> slurp : read_url($river_url ) );
2322
2423my $es = MetaCPAN::ES-> new( index => " distribution" );
2524my $bulk = $es -> bulk();
Original file line number Diff line number Diff line change @@ -295,10 +295,10 @@ sub document_release ( $self, %args ) {
295295 stat => $stat ,
296296 status => $self -> {status },
297297
298- # Call in scalar context to make sure we only get one value (building a hash).
299- resources => scalar $meta -> resources,
300- version => scalar $meta -> version,
301- version_numified => numify_version(scalar $meta -> version),
298+ # Call in scalar context to make sure we only get one value (building a hash).
299+ resources => scalar $meta -> resources,
300+ version => scalar $meta -> version,
301+ version_numified => numify_version( scalar $meta -> version ),
302302 };
303303
304304 return $document ;
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ subtest 'River Indexing' => sub {
155155 ` perl $river_script -json $river_file ` ;
156156
157157 my $es_distribution = MetaCPAN::ES-> new( index => ' distribution' );
158- my $dist = $es_distribution -> get( id => ' HTML-Parser' );
158+ my $dist = $es_distribution -> get( id => ' HTML-Parser' );
159159 ok( exists $dist -> {_source }{river }, " Found River entry" );
160160};
161161
@@ -188,8 +188,7 @@ subtest 'CVE Indexing' => sub {
188188 query => { match => { distribution => ' HTML-Parser' } },
189189 }
190190 )-> {count };
191- ok( $cve_count > 0,
192- " Found ($cve_count ) test CVEs" );
191+ ok( $cve_count > 0, " Found ($cve_count ) test CVEs" );
193192};
194193
195194# TODO:
You can’t perform that action at this time.
0 commit comments