Skip to content

Commit 5fa16e5

Browse files
committed
tidy
1 parent eaab52a commit 5fa16e5

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

bin/cve.pl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@
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
4647
my $es_release = MetaCPAN::ES->new( index => "release" );
4748
my $es_cve = MetaCPAN::ES->new( index => "cve" );

bin/river.pl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
use 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
2119
my $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

2423
my $es = MetaCPAN::ES->new( index => "distribution" );
2524
my $bulk = $es->bulk();

lib/MetaCPAN/Release.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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;

t/00_setup.t

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)