Skip to content

Commit

Permalink
docs and test
Browse files Browse the repository at this point in the history
  • Loading branch information
kazeburo committed Jun 18, 2013
1 parent 67df670 commit 1898218
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
15 changes: 7 additions & 8 deletions META.json
Expand Up @@ -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",
Expand Down Expand Up @@ -60,6 +52,13 @@
"YAML::XS" : "0.38",
"parent" : "0"
}
},
"test" : {
"requires" : {
"List::MoreUtils" : "0",
"Parallel::Scoreboard" : "0",
"Test::More" : "0"
}
}
},
"release_status" : "unstable",
Expand Down
12 changes: 10 additions & 2 deletions bin/proclet
Expand Up @@ -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 }
Expand Down Expand Up @@ -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
Expand All @@ -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 E<lt>kazeburo {at} gmail.comE<gt>
=head1 SEE ALSO
L<Proclet>, L<https://github.com/ddollar/foreman>
L<Proclet>, L<https://github.com/ddollar/foreman>, L<http://blog.daviddollar.org/2011/05/06/introducing-foreman.html>
=head1 LICENSE
Expand Down
3 changes: 1 addition & 2 deletions cpanfile
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions t/30proclet/02_process.t
Expand Up @@ -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;
}

Expand All @@ -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);
Expand Down

0 comments on commit 1898218

Please sign in to comment.