/[Frey]/trunk/lib/Frey/SVN.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/SVN.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 804 by dpavlin, Wed Dec 10 22:49:31 2008 UTC revision 807 by dpavlin, Thu Dec 11 00:27:19 2008 UTC
# Line 11  with 'Frey::Web'; Line 11  with 'Frey::Web';
11  #with 'Frey::Storage';  #with 'Frey::Storage';
12    
13  use XML::Simple;  use XML::Simple;
14    use DateTimeX::Easy;
15    
16  has repository => (  has repository => (
17          is => 'rw',          is => 'rw',
# Line 151  sub as_markup { Line 152  sub as_markup {
152          return $html;          return $html;
153  }  }
154    
155    sub codeswarm_as_markup {
156            my ($self) = @_;
157    
158            $self->content_type('text/xml');
159    
160            my $file_events = '';
161    
162            $self->iterator( sub {
163                    my $e = shift;
164                    
165                    my $rev = $e->{'revision'};
166                    my $date = DateTimeX::Easy->new( $e->{'date'} )->epoch . '000'; # ms
167                    my $author = $e->{'author'};
168    
169                    foreach my $p (@{$e->{'paths'}->{'path'}}) {
170                            my ($action,$path) = ($p->{'action'},$p->{'content'});
171                            $file_events .= qq|\t<event filename="$path" date="$date" author="$author" />\n|;
172                    }
173    
174            });
175    
176            return qq|<?xml version="1.0"?>
177            <!-- One commit per day for one month by a documenter and programmer. -->
178            <file_events>
179            $file_events
180            </file_events>
181            |;
182    
183    }
184    
185  1;  1;

Legend:
Removed from v.804  
changed lines
  Added in v.807

  ViewVC Help
Powered by ViewVC 1.1.26