Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Slurping up everything from my local repo

  • Loading branch information...
commit 287c86e385b6cfef2584bcd8b334166b6c9bc2d2 0 parents
Andy Lester authored
9 Changes
... ... @@ -0,0 +1,9 @@
  1 +Revision history for App-HWD
  2 +
  3 +NEXT
  4 + [ENHANCEMENTS]
  5 + * Added --nextid
  6 +
  7 +0.01 Date/time
  8 + First version, released on an unsuspecting world.
  9 +
73 HWD.pm
... ... @@ -0,0 +1,73 @@
  1 +package App::HWD;
  2 +
  3 +use warnings;
  4 +use strict;
  5 +
  6 +=head1 NAME
  7 +
  8 +App::HWD - The great new App::HWD!
  9 +
  10 +=head1 VERSION
  11 +
  12 +Version 0.01
  13 +
  14 +=cut
  15 +
  16 +our $VERSION = '0.01';
  17 +
  18 +=head1 SYNOPSIS
  19 +
  20 +Quick summary of what the module does.
  21 +
  22 +Perhaps a little code snippet.
  23 +
  24 + use App::HWD;
  25 +
  26 + my $foo = App::HWD->new();
  27 + ...
  28 +
  29 +=head1 EXPORT
  30 +
  31 +A list of functions that can be exported. You can delete this section
  32 +if you don't export anything, such as for a purely object-oriented module.
  33 +
  34 +=head1 FUNCTIONS
  35 +
  36 +=head2 function1
  37 +
  38 +=cut
  39 +
  40 +sub function1 {
  41 +}
  42 +
  43 +=head2 function2
  44 +
  45 +=cut
  46 +
  47 +sub function2 {
  48 +}
  49 +
  50 +=head1 AUTHOR
  51 +
  52 +Andy Lester, C<< <andy@petdance.com> >>
  53 +
  54 +=head1 BUGS
  55 +
  56 +Please report any bugs or feature requests to
  57 +C<bug-app-hwd@rt.cpan.org>, or through the web interface at
  58 +L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-HWD>.
  59 +I will be notified, and then you'll automatically be notified of progress on
  60 +your bug as I make changes.
  61 +
  62 +=head1 ACKNOWLEDGEMENTS
  63 +
  64 +=head1 COPYRIGHT & LICENSE
  65 +
  66 +Copyright 2005 Andy Lester, all rights reserved.
  67 +
  68 +This program is free software; you can redistribute it and/or modify it
  69 +under the same terms as Perl itself.
  70 +
  71 +=cut
  72 +
  73 +1; # End of App::HWD
14 MANIFEST
... ... @@ -0,0 +1,14 @@
  1 +Changes
  2 +MANIFEST
  3 +Makefile.PL
  4 +README
  5 +HWD.pm
  6 +Task.pm
  7 +Work.pm
  8 +bin/hwd
  9 +eg/sked.txt
  10 +t/00-load.t
  11 +t/pod-coverage.t
  12 +t/pod.t
  13 +t/task.t
  14 +t/work.t
37 Makefile.PL
... ... @@ -0,0 +1,37 @@
  1 +use strict;
  2 +use warnings;
  3 +use ExtUtils::MakeMaker;
  4 +
  5 +WriteMakefile(
  6 + NAME => 'App::HWD',
  7 + AUTHOR => 'Andy Lester <andy@petdance.com>',
  8 + VERSION_FROM => 'HWD.pm',
  9 + ABSTRACT_FROM => 'HWD.pm',
  10 + PL_FILES => {},
  11 + EXE_FILES => [ 'bin/hwd' ],
  12 + PM => {
  13 + 'HWD.pm' => '$(INST_LIBDIR)/HWD.pm',
  14 + 'Task.pm' => '$(INST_LIBDIR)/HWD/Task.pm',
  15 + 'Work.pm' => '$(INST_LIBDIR)/HWD/Work.pm',
  16 + },
  17 + PREREQ_PM => {
  18 + 'Test::More' => 0,
  19 + 'Getopt::Long' => 0,
  20 + 'Pod::Usage' => 0,
  21 + },
  22 + MAN3PODS => { }, # no need for docs on these
  23 + dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
  24 + clean => { FILES => 'App-HWD-*' },
  25 +);
  26 +
  27 +sub MY::postamble {
  28 + return <<'MAKE_FRAG';
  29 +.PHONY: tags
  30 +
  31 +tags:
  32 + ctags -f tags --recurse --totals \
  33 + --exclude=blib/ --exclude=t/lib \
  34 + --exclude=.svn --exclude='*~' \
  35 + --languages=Perl --langmap=Perl:+.t \
  36 +MAKE_FRAG
  37 +}
29 README
... ... @@ -0,0 +1,29 @@
  1 +App-HWD
  2 +
  3 +The README is used to introduce the module and provide instructions on
  4 +how to install the module, any machine dependencies it may have (for
  5 +example C compilers and installed libraries) and any other information
  6 +that should be provided before the module is installed.
  7 +
  8 +A README file is required for CPAN modules since CPAN extracts the README
  9 +file from a module distribution so that people browsing the archive
  10 +can use it get an idea of the modules uses. It is usually a good idea
  11 +to provide version information here so that people can decide whether
  12 +fixes for the module are worth downloading.
  13 +
  14 +INSTALLATION
  15 +
  16 +To install this module, run the following commands:
  17 +
  18 + perl Makefile.PL
  19 + make
  20 + make test
  21 + make install
  22 +
  23 +
  24 +COPYRIGHT AND LICENCE
  25 +
  26 +Copyright (C) 2005 Andy Lester
  27 +
  28 +This program is free software; you can redistribute it and/or modify it
  29 +under the same terms as Perl itself.
200 Task.pm
... ... @@ -0,0 +1,200 @@
  1 +package App::HWD::Task;
  2 +
  3 +use warnings;
  4 +use strict;
  5 +
  6 +=head1 NAME
  7 +
  8 +App::HWD::Task - Tasks for HWD
  9 +
  10 +=head1 SYNOPSIS
  11 +
  12 +Used only by the F<hwd> application.
  13 +
  14 +Note that these functions are pretty fragile, and do almost no data
  15 +checking.
  16 +
  17 +=head1 FUNCTIONS
  18 +
  19 +=head2 App::HWD::Task->parse()
  20 +
  21 +Returns an App::HWD::Task object from an input line
  22 +
  23 +=cut
  24 +
  25 +sub parse {
  26 + my $class = shift;
  27 + my $line = shift;
  28 +
  29 + my $line_regex = qr/
  30 + ^
  31 + (-+) # leading dashes
  32 + \s* # whitespace
  33 + (.+) # everything else
  34 + $
  35 + /x;
  36 +
  37 + if ( $line =~ $line_regex ) {
  38 + my $level = length $1;
  39 + my $name = $2;
  40 + my $id;
  41 + my $estimate;
  42 +
  43 + if ( $name =~ s/\s*\(([^)]+)\)$// ) {
  44 + my $parens = $1;
  45 + my @subfields = split /,/, $parens;
  46 + for ( @subfields ) {
  47 + s/^\s+//;
  48 + s/\s+$//;
  49 + /^#(\d+)$/ and $id = $1, next;
  50 + /^(\d+)h$/ and $estimate = $1, next;
  51 + warn "Don't understand $_";
  52 + }
  53 + }
  54 +
  55 + my $task = $class->new( {
  56 + level => $level,
  57 + name => $name,
  58 + id => $id,
  59 + estimate => $estimate,
  60 + } );
  61 + }
  62 + else {
  63 + return;
  64 + }
  65 +}
  66 +
  67 +=head2 App::HWD::Task->new( { args } )
  68 +
  69 +Creates a new task from the args passed in. They should include at
  70 +least I<level>, I<name> and I<id>, even if I<id> is C<undef>.
  71 +
  72 + my $task = App::HWD::Task->new( {
  73 + level => $level,
  74 + name => $name,
  75 + id => $id,
  76 + estimate => $estimate,
  77 + } );
  78 +
  79 +=cut
  80 +
  81 +sub new {
  82 + my $class = shift;
  83 + my $args = shift;
  84 +
  85 + my $self = bless {
  86 + %$args,
  87 + work => [],
  88 + }, $class;
  89 +
  90 + return $self;
  91 +}
  92 +
  93 +=head2 $task->level()
  94 +
  95 +Returns the level of the task
  96 +
  97 +=head2 $task->name()
  98 +
  99 +Returns the name of the task
  100 +
  101 +=head2 $task->id()
  102 +
  103 +Returns the ID of the task, or the empty string if there isn't one.
  104 +
  105 +=head2 $task->estimate()
  106 +
  107 +Returns the estimate, or 0 if it's not set.
  108 +
  109 +=cut
  110 +
  111 +sub level { return shift->{level} }
  112 +sub name { return shift->{name} }
  113 +sub id { return shift->{id} || "" }
  114 +sub estimate { return shift->{estimate} || 0 }
  115 +
  116 +=head2 $task->set( $key => $value )
  117 +
  118 +Sets the I<$key> field to I<$value>.
  119 +
  120 +=cut
  121 +
  122 +sub set {
  123 + my $self = shift;
  124 + my $key = shift;
  125 + my $value = shift;
  126 +
  127 + die "Dupe key $key" if exists $self->{$key};
  128 + $self->{$key} = $value;
  129 +}
  130 +
  131 +=head2 add_work( $work )
  132 +
  133 +Adds a Work record to the task, for later accumulating
  134 +
  135 +=cut
  136 +
  137 +sub add_work {
  138 + my $self = shift;
  139 + my $work = shift;
  140 +
  141 + push( @{$self->{work}}, $work );
  142 +}
  143 +
  144 +=head2 hours_worked()
  145 +
  146 +Returns the number of hours worked, but counting up all the work records added in L</add_work>.
  147 +
  148 +=cut
  149 +
  150 +sub hours_worked {
  151 + my $self = shift;
  152 +
  153 + my $hours = 0;
  154 + for my $work ( @{$self->{work}} ) {
  155 + $hours += $work->hours;
  156 + }
  157 + return $hours;
  158 +}
  159 +
  160 +=head2 completed()
  161 +
  162 +Returns whether the task has been completed.
  163 +
  164 +=cut
  165 +
  166 +sub completed {
  167 + my $self = shift;
  168 +
  169 + my $completed = 0;
  170 + for my $work ( @{$self->{work}} ) {
  171 + $completed = $work->completed;
  172 + }
  173 +
  174 + return $completed;
  175 +}
  176 +
  177 +=head1 AUTHOR
  178 +
  179 +Andy Lester, C<< <andy at petdance.com> >>
  180 +
  181 +=head1 BUGS
  182 +
  183 +Please report any bugs or feature requests to
  184 +C<bug-app-hwd-task@rt.cpan.org>, or through the web interface at
  185 +L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-HWD>.
  186 +I will be notified, and then you'll automatically be notified of progress on
  187 +your bug as I make changes.
  188 +
  189 +=head1 ACKNOWLEDGEMENTS
  190 +
  191 +=head1 COPYRIGHT & LICENSE
  192 +
  193 +Copyright 2005 Andy Lester, all rights reserved.
  194 +
  195 +This program is free software; you can redistribute it and/or modify it
  196 +under the same terms as Perl itself.
  197 +
  198 +=cut
  199 +
  200 +1; # End of App::HWD::Task
144 Work.pm
... ... @@ -0,0 +1,144 @@
  1 +package App::HWD::Work;
  2 +
  3 +use warnings;
  4 +use strict;
  5 +
  6 +=head1 NAME
  7 +
  8 +App::HWD::Work - Work completed on HWD projects
  9 +
  10 +=head1 SYNOPSIS
  11 +
  12 +Used only by the F<hwd> application.
  13 +
  14 +Note that these functions are pretty fragile, and do almost no data
  15 +checking.
  16 +
  17 +=head1 FUNCTIONS
  18 +
  19 +=head2 App::HWD::Work->parse()
  20 +
  21 +Returns an App::HWD::Work object from an input line
  22 +
  23 +=cut
  24 +
  25 +sub parse {
  26 + my $class = shift;
  27 + my $line = shift;
  28 +
  29 + my @cols = split " ", $line, 5;
  30 + die "Invalid work line: $line" unless @cols >= 4;
  31 +
  32 + my ($who, $when, $task, $hours, $comment) = @cols;
  33 + my $completed;
  34 + if ( defined $comment ) {
  35 + if ( $comment =~ s/X\s*//i ) {
  36 + $completed = 1;
  37 + }
  38 + $comment =~ s/^#\s*//;
  39 + $comment =~ s/\s+$//;
  40 + }
  41 + else {
  42 + $comment = '';
  43 + }
  44 +
  45 + my $self =
  46 + $class->new( {
  47 + who => $who,
  48 + when => $when,
  49 + task => $task,
  50 + hours => $hours,
  51 + comment => $comment,
  52 + completed => $completed,
  53 + } );
  54 +
  55 + return $self;
  56 +}
  57 +
  58 +=head2 App::HWD::Work->new( { args } )
  59 +
  60 +Creates a new task from the args passed in. They should include at
  61 +least I<level>, I<name> and I<id>, even if I<id> is C<undef>.
  62 +
  63 +=cut
  64 +
  65 +sub new {
  66 + my $class = shift;
  67 + my $args = shift;
  68 +
  69 + my $self = bless { %$args }, $class;
  70 +}
  71 +
  72 +
  73 +=head2 $work->set( $key => $value )
  74 +
  75 +Sets the I<$key> field to I<$value>.
  76 +
  77 +=cut
  78 +
  79 +sub set {
  80 + my $self = shift;
  81 + my $key = shift;
  82 + my $value = shift;
  83 +
  84 + die "Dupe key $key" if exists $self->{$key};
  85 + $self->{$key} = $value;
  86 +}
  87 +
  88 +=head2 $work->who()
  89 +
  90 +Returns who did the work
  91 +
  92 +=head2 $work->when()
  93 +
  94 +Returns the when of the work
  95 +
  96 +=head2 $work->task()
  97 +
  98 +Returns the ID of the work that was worked on.
  99 +
  100 +=head2 $work->hours()
  101 +
  102 +Returns the hours spent.
  103 +
  104 +=head2 $work->completed()
  105 +
  106 +Returns a boolean that says whether the work was completed or not.
  107 +
  108 +=head2 $work->comment()
  109 +
  110 +Returns the comment from the file, if any.
  111 +
  112 +=cut
  113 +
  114 +sub who { return shift->{who} }
  115 +sub when { return shift->{when} }
  116 +sub task { return shift->{task} }
  117 +sub hours { return shift->{hours} }
  118 +sub completed { return shift->{completed} }
  119 +sub comment { return shift->{comment} }
  120 +
  121 +=head1 AUTHOR
  122 +
  123 +Andy Lester, C<< <andy at petdance.com> >>
  124 +
  125 +=head1 BUGS
  126 +
  127 +Please report any bugs or feature requests to
  128 +C<bug-app-hwd-task@rt.cpan.org>, or through the web interface at
  129 +L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-HWD>.
  130 +I will be notified, and then you'll automatically be notified of progress on
  131 +your bug as I make changes.
  132 +
  133 +=head1 ACKNOWLEDGEMENTS
  134 +
  135 +=head1 COPYRIGHT & LICENSE
  136 +
  137 +Copyright 2005 Andy Lester, all rights reserved.
  138 +
  139 +This program is free software; you can redistribute it and/or modify it
  140 +under the same terms as Perl itself.
  141 +
  142 +=cut
  143 +
  144 +1; # End of App::HWD::Task
168 bin/hwd
... ... @@ -0,0 +1,168 @@
  1 +#!/usr/bin/perl -w
  2 +
  3 +use strict;
  4 +use warnings;
  5 +use Getopt::Long;
  6 +use Pod::Usage;
  7 +use App::HWD::Task;
  8 +use App::HWD::Work;
  9 +use List::Util qw( max );
  10 +
  11 +our $detail_level;
  12 +
  13 +our $show_nextid;
  14 +
  15 +Getopt::Long::Configure( "no_ignore_case" );
  16 +Getopt::Long::Configure( "bundling" );
  17 +GetOptions(
  18 + 'detail=n' => \$detail_level,
  19 + nextid => \$show_nextid,
  20 + started => \$show_tasks_started,
  21 + 'h|help|?' => sub {pod2usage({-verbose => 1}); exit},
  22 + 'H|man' => sub {pod2usage({-verbose => 2}); exit},
  23 + 'V|version' => sub { print_version(); exit; },
  24 +) or exit 1;
  25 +
  26 +MAIN: {
  27 + my ($tasks,$works,$tasks_by_id) = get_tasks_and_work();
  28 +
  29 + if ( $show_nextid ) {
  30 + my $max = max( keys %$tasks_by_id );
  31 + $max = $max ? $max+1 : 101;
  32 + print "Next task ID: $max\n";
  33 + exit;
  34 + }
  35 +
  36 + for my $work ( @$works ) {
  37 + my $task = $tasks_by_id->{ $work->task } or die "No task ID ", $work->task, "\n";
  38 + $task->add_work( $work );
  39 + }
  40 +
  41 + my $total_estimated = 0;
  42 + my $total_velocity = 0;
  43 + for my $task ( @$tasks ) {
  44 + $total_estimated += $task->estimate || 0;
  45 + $total_velocity += $task->estimate if $task->completed;
  46 + print_task( $task );
  47 + }
  48 + print "Total points: $total_estimated\n";
  49 + print "Total velocity: $total_velocity\n";
  50 +}
  51 +
  52 +sub get_tasks_and_work {
  53 + my @tasks;
  54 + my @work;
  55 + my %tasks_by_id;
  56 +
  57 + while ( my $line = <> ) {
  58 + chomp $line;
  59 + next if $line =~ /^\s*#/;
  60 + next if $line !~ /./;
  61 +
  62 + if ( $line =~ /^-/ ) {
  63 + my $task = App::HWD::Task->parse( $line );
  64 + die "Can't parse: $line\n" unless $task;
  65 + if ( $task->id ) {
  66 + if ( $tasks_by_id{ $task->id } ) {
  67 + die "Dupe task ID ", $task->id, "\n";
  68 + }
  69 + else {
  70 + $tasks_by_id{ $task->id } = $task;
  71 + }
  72 + }
  73 + push( @tasks, $task );
  74 + }
  75 + else {
  76 + my $work = App::HWD::Work->parse( $line );
  77 + push( @work, $work );
  78 + }
  79 + } # while
  80 + return( \@tasks, \@work, \%tasks_by_id );
  81 +}
  82 +
  83 +sub print_version {
  84 + printf( "hwd v%s\n", $App::HWD::VERSION, $^V );
  85 +}
  86 +
  87 +sub print_task {
  88 + my $task = shift;
  89 +
  90 + my $level = $task->level;
  91 + my $name = $task->name;
  92 + my $id = $task->id;
  93 + my $estimate = $task->estimate;
  94 + my $indent = " " x (($level-1)*4);
  95 +
  96 + if ( $id ) {
  97 + if ( !$detail_level ) {
  98 + my $worked = $task->hours_worked;
  99 + $worked = $worked ? sprintf( "%6.2f", $worked ) : "";
  100 + $worked =~ s/\.00$/ /;
  101 + my $x = $task->completed ? "X" : " ";
  102 + print_cols( $id, $estimate, $worked, $x, $indent, $name );
  103 + }
  104 + }
  105 + else {
  106 + print_cols( (undef) x 4, $indent, $name );
  107 + }
  108 +}
  109 +
  110 +sub print_cols {
  111 + my @cols = @_;
  112 +
  113 + for ( @cols[0..1] ) {
  114 + $_ = $_ ? sprintf( "%4d", $_ ) : "";
  115 + }
  116 + for ( @cols[2..5] ) {
  117 + $_ = "" unless defined $_;
  118 + }
  119 + printf( "%4s %4s %6.6s %1s %s %s\n", @cols );
  120 +}
  121 +
  122 +__END__
  123 +
  124 +=head1 NAME
  125 +
  126 +hwd -- The How We Doin'? project tracking tool
  127 +
  128 +=head1 SYNOPSIS
  129 +
  130 +hwd [options] schedule-file(s)
  131 +
  132 +Options:
  133 + --nextid Display the next highest task ID
  134 +
  135 + -h, --help Display this help
  136 + -H, --man Longer manpage for prove
  137 + -V, --version Display version info
  138 +
  139 +=head1 COMMAND LINE OPTIONS
  140 +
  141 +=head2 --nextid
  142 +
  143 +Shows the next ID available.
  144 +
  145 +=head2 -V, --version
  146 +
  147 +Display version info.
  148 +
  149 +=head1 BUGS
  150 +
  151 +Please use the CPAN bug ticketing system at L<http://rt.cpan.org/>.
  152 +You can also mail bugs, fixes and enhancements to
  153 +C<< <bug-app-hwd at rt.cpan.org> >>.
  154 +
  155 +=head1 AUTHORS
  156 +
  157 +Andy Lester C<< <andy at petdance.com> >>
  158 +
  159 +=head1 COPYRIGHT
  160 +
  161 +Copyright 2005 by Andy Lester C<< <andy at petdance.com> >>.
  162 +
  163 +This program is free software; you can redistribute it and/or
  164 +modify it under the same terms as Perl itself.
  165 +
  166 +See L<http://www.perl.com/perl/misc/Artistic.html>.
  167 +
  168 +=cut
259 eg/sked.txt
... ... @@ -0,0 +1,259 @@
  1 +# This is an actual schedule and work, with specific names changed to
  2 +# protect confidentiality. Anything that is "foo", "bar", "baz",
  3 +# "quux" or "wango" has been changed from something else.
  4 +
  5 +
  6 +-Infrastructure
  7 +--FOO*
  8 +---Add new columns to track by type (#101, 2h)
  9 +---Add new columns to record new checkout features (#102, 2h)
  10 +---Add FK constraints between FOOHEAD and FOODETAIL (#103, 2h)
  11 +---Add FK constraints between FOOHEAD and BARDETAIL (#104, 2h)
  12 +
  13 +--ORDERFORM
  14 +---Create migration script to modify table automatically (#105, 2h)
  15 +
  16 +-TW::DB::FooForm
  17 +--Review (#106, 1h)
  18 +--Refactor (#107, 1h)
  19 +
  20 +-TW::DB::FooDefault
  21 +--Review (#108, 1h)
  22 +--Refactor (#109, 1h)
  23 +
  24 +-Foo Entry Wizard
  25 +--Handler
  26 +---API Pod Docs (#110, 4h)
  27 +---Review (#111, 1h)
  28 +---Tests (#112, 8h)
  29 +---Code (#113, 8h)
  30 +---Refactor (#114, 4h)
  31 +--Screens
  32 +---Foo Summary Template Component (#115, 5h)
  33 +---Foo Summary Template - CA & C&P (#228, 2h)
  34 +---Wango Template (#116, 5h)
  35 +---Wango Template - CA & C&P (#229, 2h)
  36 +---Main and List page buttons (#117, 4h)
  37 +---C&P Template (#118, 5h)
  38 +---C&P Template - CA & C&P (#236, 2h)
  39 +---Tango Options Template (#119, 5h)
  40 +---Tango Options Template - CA & C&P (#230, 2h)
  41 +---Ebook Options Template (#120, 5h)
  42 +---Ebook Options Template - CA & C&P (#231, 2h)
  43 +---Contact Information Template (#121, 5h)
  44 +---Contact Information Template - CA & C&P (#232, 2h)
  45 +---Baz Template (#122, 5h)
  46 +---Baz Template - CA & C&P (#233, 2h)
  47 +---Quux Template (#123, 5h)
  48 +---Quux Template - CA & C&P (#234, 2h)
  49 +---Confirm Template (#124, 5h)
  50 +---Confirm Template - CA & C&P (#235, 2h)
  51 +---Thank You Template (#125, 7h)
  52 +--E-mail Confirmation (#126, 7h)
  53 +
  54 +-TW::FooWizard
  55 +--Review (#127, 4h)
  56 +--Tests (#128, 4h)
  57 +--CA & C&P Tests (#226, 4h)
  58 +--Code (#129, 8h)
  59 +--CA & C&P Code (#227, 8h)
  60 +--Refactor (#130, 2h)
  61 +
  62 +-TW::FooMaker
  63 +--API Pod Docs (#131, 12h)
  64 +--Review (#132, 4h)
  65 +--Tests (#133, 8h)
  66 +--Code (#134, 16h)
  67 +---Bar Promotion (#135, 8h)
  68 +--Refactor (#136, 2h)
  69 +
  70 +-TW::DB::FooHead
  71 +--API Pod Docs (#137, 2h)
  72 +--Review (#138, 1h)
  73 +--Tests (#139, 4h)
  74 +--Code (#140, 4h)
  75 +--Refactor (#141, 1h)
  76 +
  77 +-TW::DB::FooDetail
  78 +--API Pod Docs (#142, 2h)
  79 +--Review (#143, 1h)
  80 +--Tests (#144, 4h)
  81 +--Code (#145, 4h)
  82 +--Refactor (#146, 1h)
  83 +
  84 +-TW::DB::BarDetail
  85 +--API Pod Docs (#147, 2h)
  86 +--Review (#148, 1h)
  87 +--Tests (#149, 4h)
  88 +--Code (#150, 4h)
  89 +--Refactor (#151, 1h)
  90 +
  91 +-TW::CP
  92 +--API Pod Docs (#152, 7h)
  93 +--Review (#153, 1h)
  94 +--Tests (#154, 7h)
  95 +--Code
  96 +---Create "new" method for TW::CP (#155, 1h)
  97 +---Refactor interfaces between TW::CP and TW::CPSet (#156, 7h)
  98 +---Convert TW::CP class methods to instance methods (#157, 4h)
  99 +---Change current TW::CP users to using instance methods (#158, 4h)
  100 +---Create accessor methods which delegate appropriately (#160, 4h)
  101 +---Create support for dynamically loading delegatees (#161, 2h)
  102 +---Create method to invalidate dynamically loaded delegatees (#162, 1h)
  103 +---Create method to invalidate dynamically calculated costs (#163, 1h)
  104 +---Create interface definition module for Foo implementors (#164, 1h)
  105 +---Create methods to return delegatees (#165, 1h)
  106 +--Refactor (#166, 2h)
  107 +
  108 +-TW::DB::BarSubset
  109 +--API Pod Docs (#167, 7h)
  110 +--Review (#168, 1h)
  111 +--Tests (#169, 7h)
  112 +--Code
  113 +---Create base Class::DBI module from POD (#170, 1h)
  114 +---Calculate bar from aggregate totals of a supplied object (#171, 4h)
  115 +---Create processing methods to format specs as text or HTML (#172, 8h)
  116 +---Create methods to support delegated accessors interface for TW::CP (#173, 4h)
  117 +--Refactor (#174, 2h)
  118 +
  119 +-TW::CPSet
  120 +--API Pod Docs (#175, 7h)
  121 +--Review (#176, 1h)
  122 +--Tests (#177, 7h)
  123 +--Code
  124 +---Calculate Book C&P costs from aggregate totals of a supplied object (#178, 2h)
  125 +---Create methods to support delegated accessors interface for TW::CP (#179, 4h)
  126 +--Refactor (#180, 2h)
  127 +
  128 +-TW::List
  129 +--Review (#181, 1h)
  130 +--Add Code
  131 +---Refactor (#182, 2h)
  132 +
  133 +-TW::TitleCounts
  134 +--Review (#183, 1h)
  135 +--Refactor (#184, 1h)
  136 +
  137 +-Bar Creation PL/SQL script (#185, 16h)
  138 +
  139 +-Foo Creation PL/SQL script (#186, 16h)
  140 +
  141 +-TW::BarMaker
  142 +--API Pod docs (#223, 4h)
  143 +--Review (#224, 1h)
  144 +--Tests (#187, 7h)
  145 +--Code (#188, 7h)
  146 +--Refactor (#189, 4h)
  147 +
  148 +-TW::Bar
  149 +--API Pod Docs (#190, 14h)
  150 +--Review (#191, 4h)
  151 +--Tests (#192, 14h)
  152 +--Code (#193, 21h)
  153 +--Refactor (#194, 4h)
  154 +
  155 +-TW::DB::BarItem
  156 +--Tests (#195, 2h)
  157 +--Code (#196, 3h)
  158 +--Refactor (#197, 1h)
  159 +
  160 +-TW::DB::BarHead
  161 +--API Pod Docs (#198, 4h)
  162 +--Review (#199, 1h)
  163 +--Tests (#200, 2h)
  164 +--Code (#201, 3h)
  165 +--Refactor (#202, 1h)
  166 +
  167 +-Bar Print
  168 +--TW::Apache::Bar Handler
  169 +---Select List & Request Bar (#203, 7h)
  170 +---Bar Print Options (#204, 7h)
  171 +---Bar Print (#205, 7h)
  172 +--Select List & Request Bar Template
  173 +---Bar Select Template (#207, 7h)
  174 +---Bar Request email (#208, 7h)
  175 +---Bar Request Confirm Template (#209, 7h)
  176 +---Bar Print Options Template (#210, 7h)
  177 +--Bar Print Screen
  178 +---Main Bar Template (#211, 4h)
  179 +---Standard Detail template (#212, 4h)
  180 +---Single Line Detail template (#213, 4h)
  181 +---Annotated Detail template (#214, 4h)
  182 +-Spec Change E-mail (#217, 16h)
  183 +-Custom Foo Email (#218, 16h)
  184 +
  185 +-Rollout
  186 +--Run alter scripts against production database and verify OK (#219, 7h)
  187 +--Merge to trunk (#221, 28h)
  188 +--Rollout internally (#220, 1h)
  189 +--Rollout (#222, 6h)
  190 +
  191 +
  192 +Pete 7/11 195 2 X
  193 +Pete 7/11 196 3 X
  194 +Pete 7/11 198 2
  195 +Pete 7/11 127 .5 X
  196 +Pete 7/11 108 .25 X
  197 +Pete 7/11 106 .25 X
  198 +Pete 7/11 111 .5 X
  199 +Pete 7/12 198 1.25 X
  200 +Pete 7/13 200 2 X
  201 +Pete 7/13 201 1
  202 +Pete 7/13 175 2.75
  203 +Pete 7/14 175 7.5
  204 +Pete 7/15 167 5
  205 +
  206 +Bruce 7/11 185 5
  207 +Bruce 7/11 127 .5 X
  208 +Bruce 7/11 108 .25 X
  209 +Bruce 7/11 106 .25 X
  210 +Bruce 7/11 111 .5 X
  211 +Bruce 7/12 185 6
  212 +Bruce 7/13 185 5 x
  213 +Bruce 7/13 223 1
  214 +Bruce 7/14 185 2 x refactor
  215 +Bruce 7/14 223 1.5
  216 +Bruce 7/14 188 2
  217 +Bruce 7/15 223 3 x
  218 +Bruce 7/15 187 1
  219 +Bruce 7/15 188 1
  220 +
  221 +Bob 7/11 127 .5
  222 +Bob 7/11 108 .75 X
  223 +Bob 7/11 106 .25 X
  224 +Bob 7/11 111 .5 X
  225 +Bob 7/11 127 1.5 X
  226 +Bob 7/11 110 .25 X
  227 +Bob 7/11 117 1
  228 +Bob 7/11 113 1
  229 +Bob 7/12 128 2
  230 +Bob 7/12 129 3.75
  231 +Bob 7/13 128 .75
  232 +Bob 7/13 129 1
  233 +Bob 7/13 116 .5
  234 +Bob 7/13 115 .5
  235 +Bob 7/13 118 .5
  236 +Bob 7/13 119 .5
  237 +Bob 7/13 120 .5
  238 +Bob 7/13 121 .5
  239 +Bob 7/13 122 .5
  240 +Bob 7/13 123 .5
  241 +Bob 7/13 124 .5
  242 +Bob 7/14 128 1
  243 +Bob 7/14 129 1
  244 +Bob 7/14 116 .25 X
  245 +Bob 7/14 115 .25 X
  246 +Bob 7/14 118 .25 X
  247 +Bob 7/14 119 .25 X
  248 +Bob 7/14 120 .25 X
  249 +Bob 7/14 121 .75
  250 +Bob 7/14 122 .75
  251 +Bob 7/14 123 .75
  252 +Bob 7/14 124 .25
  253 +Bob 7/15 128 1 X
  254 +Bob 7/15 129 1 X
  255 +Bob 7/15 113 1 X
  256 +Bob 7/15 121 .25 X
  257 +Bob 7/15 122 .25 X
  258 +Bob 7/15 123 .25 X
  259 +Bob 7/15 124 .25 X
10 t/00-load.t
... ... @@ -0,0 +1,10 @@
  1 +#!perl -T
  2 +
  3 +use Test::More tests => 2;
  4 +
  5 +BEGIN {
  6 + use_ok( 'App::HWD' );
  7 + use_ok( 'App::HWD::Task' );
  8 +}
  9 +
  10 +diag( "Testing App::HWD $App::HWD::VERSION, Perl $], $^X" );
6 t/pod-coverage.t
... ... @@ -0,0 +1,6 @@
  1 +#!perl -T
  2 +
  3 +use Test::More;
  4 +eval "use Test::Pod::Coverage 1.04";
  5 +plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
  6 +all_pod_coverage_ok();
6 t/pod.t
... ... @@ -0,0 +1,6 @@
  1 +#!perl -T
  2 +
  3 +use Test::More;
  4 +eval "use Test::Pod 1.14";
  5 +plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
  6 +all_pod_files_ok();
76 t/task.t
... ... @@ -0,0 +1,76 @@
  1 +#!perl
  2 +
  3 +use strict;
  4 +use warnings;
  5 +
  6 +use Test::More tests => 31;
  7 +
  8 +BEGIN {
  9 + use_ok( 'App::HWD::Task' );
  10 +}
  11 +
  12 +
  13 +SIMPLE: {
  14 + my $str = '-Create TW::DB::QuoteHead';
  15 +
  16 + my $task = App::HWD::Task->parse( $str );
  17 + isa_ok( $task, 'App::HWD::Task' );
  18 + is( $task->name, 'Create TW::DB::QuoteHead' );
  19 + is( $task->level, 1 );
  20 + is( $task->estimate, 0 );
  21 + is( $task->id, '' );
  22 +}
  23 +
  24 +WITH_ID: {
  25 + my $str = '--API Pod Docs (#198)';
  26 +
  27 + my $task = App::HWD::Task->parse( $str );
  28 + isa_ok( $task, 'App::HWD::Task' );
  29 + is( $task->name, 'API Pod Docs' );
  30 + is( $task->level, 2 );
  31 + is( $task->estimate, 0 );
  32 + is( $task->id, 198 );
  33 +}
  34 +
  35 +WITH_ESTIMATE: {
  36 + my $str = '---API Pod Docs (4h)';
  37 +
  38 + my $task = App::HWD::Task->parse( $str );
  39 + isa_ok( $task, 'App::HWD::Task' );
  40 + is( $task->name, 'API Pod Docs' );
  41 + is( $task->level, 3 );
  42 + is( $task->estimate, 4 );
  43 + is( $task->id, '' );
  44 +}
  45 +
  46 +WITH_ID_AND_ESTIMATE: {
  47 + my $str = '----Retrofitting widgets (#142, 3h)';
  48 +
  49 + my $task = App::HWD::Task->parse( $str );
  50 + isa_ok( $task, 'App::HWD::Task' );
  51 + is( $task->name, 'Retrofitting widgets' );
  52 + is( $task->level, 4 );
  53 + is( $task->estimate, 3 );
  54 + is( $task->id, 142 );
  55 +}
  56 +
  57 +WITH_ESTIMATE_AND_ID: {
  58 + my $str = '-Flargling dangows (9h ,#2112)';
  59 +
  60 + my $task = App::HWD::Task->parse( $str );
  61 + isa_ok( $task, 'App::HWD::Task' );
  62 + is( $task->name, 'Flargling dangows' );
  63 + is( $task->level, 1 );
  64 + is( $task->estimate, 9 );
  65 + is( $task->id, 2112 );
  66 +}
  67 +
  68 +WITH_PARENS: {
  69 + my $str = '-Voodoo Chile (Slight Return) (#43)';
  70 + my $task = App::HWD::Task->parse( $str );
  71 + isa_ok( $task, 'App::HWD::Task' );
  72 + is( $task->name, 'Voodoo Chile (Slight Return)' );
  73 + is( $task->level, 1 );
  74 + is( $task->estimate, 0 );
  75 + is( $task->id, 43 );
  76 +}
49 t/work.t
... ... @@ -0,0 +1,49 @@
  1 +#!perl
  2 +
  3 +use strict;
  4 +use warnings;
  5 +
  6 +use Test::More tests => 22;
  7 +
  8 +BEGIN {
  9 + use_ok( 'App::HWD::Work' );
  10 +}
  11 +
  12 +SIMPLE: {
  13 + my $str = 'Pete 7/11 195 0000.250';
  14 + my $work = App::HWD::Work->parse( $str );
  15 + isa_ok( $work, 'App::HWD::Work' );
  16 +
  17 + is( $work->who, 'Pete', 'Who' );
  18 + is( $work->when, '7/11', 'When' );
  19 + is( $work->task, 195, 'Task' );
  20 + cmp_ok( $work->hours, '==', .25, 'Hours match' );
  21 + is( $work->comment, '', 'no comment' );
  22 + ok( !$work->completed, 'not completed' );
  23 +}
  24 +
  25 +COMPLETED: {
  26 + my $str = 'Pete 7/11 195 2 x ';
  27 + my $work = App::HWD::Work->parse( $str );
  28 + isa_ok( $work, 'App::HWD::Work' );
  29 +
  30 + is( $work->who, 'Pete', 'Who' );
  31 + is( $work->when, '7/11', 'When' );
  32 + is( $work->task, 195, 'Task' );
  33 + cmp_ok( $work->hours, '==', 2, 'Hours match' );
  34 + is( $work->comment, '', 'no commment' );
  35 + ok( $work->completed, 'completed' );
  36 +}
  37 +
  38 +COMPLETED: {
  39 + my $str = 'Bob 8/11 1 .75 X # Refactoring ';
  40 + my $work = App::HWD::Work->parse( $str );
  41 + isa_ok( $work, 'App::HWD::Work' );
  42 +
  43 + is( $work->who, 'Bob', 'Who' );
  44 + is( $work->when, '8/11', 'When' );
  45 + is( $work->task, 1, 'task' );
  46 + cmp_ok( $work->hours, '==', .75, 'Hours match' );
  47 + is( $work->comment, 'Refactoring', 'Non-empty comment' );
  48 + ok( $work->completed, 'Completed' );
  49 +}

0 comments on commit 287c86e

Please sign in to comment.
Something went wrong with that request. Please try again.