diff --git a/META.json b/META.json index 549be5b..d671165 100644 --- a/META.json +++ b/META.json @@ -25,14 +25,6 @@ ] }, "prereqs" : { - "build" : { - "requires" : { - "ExtUtils::MakeMaker" : "6.36", - "List::MoreUtils" : "0", - "Parallel::Scoreboard" : "0", - "Test::More" : "0" - } - }, "configure" : { "requires" : { "CPAN::Meta" : "0", @@ -60,6 +52,13 @@ "YAML::XS" : "0.38", "parent" : "0" } + }, + "test" : { + "requires" : { + "List::MoreUtils" : "0", + "Parallel::Scoreboard" : "0", + "Test::More" : "0" + } } }, "release_status" : "unstable", diff --git a/bin/proclet b/bin/proclet index 706adc6..1a6828a 100644 --- a/bin/proclet +++ b/bin/proclet @@ -53,7 +53,7 @@ my $go = Getopt::Compact::WithCmd->new( ], [ [qw/p port/], - 'Specify which port to use as the base for this application. Should be a multiple of 1000', + 'Port number which used as the base for this application. Should be a multiple of 1000', '=i', \$opt{port}, { required => 0 } @@ -195,6 +195,10 @@ An alternate Procfile to load, implies -d at the Procfile root Colored log +=item -p, --port: Num + +Port number which used as the base for this application. Should be a multiple of 1000 + =back =head1 PROCFILE @@ -218,13 +222,17 @@ If a B<.foreman> file exists in the current directory, default options will be r concurrency: alpha=0,bravo=1 color: 1 +=head1 PORT ASSIGNMENT + +As same as foreman, proclet starts to assign from port 5000 by default. and assigns them in blocks of 100 per service in the order used in your Procfile. You can specify an alternate starting port number with the -p option. + =head1 AUTHOR Masahiro Nagano Ekazeburo {at} gmail.comE =head1 SEE ALSO -L, L +L, L, L =head1 LICENSE diff --git a/cpanfile b/cpanfile index 1181b52..fa1fe1f 100644 --- a/cpanfile +++ b/cpanfile @@ -8,8 +8,7 @@ requires 'Term::ANSIColor'; requires 'YAML::XS', '0.38'; requires 'parent'; -on build => sub { - requires 'ExtUtils::MakeMaker', '6.36'; +on test => sub { requires 'List::MoreUtils'; requires 'Parallel::Scoreboard'; requires 'Test::More'; diff --git a/t/30proclet/02_process.t b/t/30proclet/02_process.t index bd2dee2..451a92d 100644 --- a/t/30proclet/02_process.t +++ b/t/30proclet/02_process.t @@ -11,7 +11,7 @@ die $! if ! defined $pid; if ( $pid == 0 ) { chdir 't/30proclet/procfile'; - exec $^X, '-I../../../lib','../../../bin/proclet', 'start','w2'; + exec $^X, '-I../../../lib','../../../bin/proclet', 'start','-p','3000','w2'; exit; } @@ -36,7 +36,7 @@ while( <$fh> ) { close $fh; ok(!exists $logok{w1}); is( scalar keys %{$logok{w2}},2); -is_deeply( [ uniq sort @{$port{w2}} ], [5100,5101] ); +is_deeply( [ uniq sort @{$port{w2}} ], [3100,3101] ); kill 'TERM', $pid; waitpid( $pid, 0);