diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-02-10 11:07:41 +0100 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-02-10 11:07:41 +0100 |
| commit | c55a169ead9beb27436144923255c254d215158f (patch) | |
| tree | f7e87d641692bae116f2600ad020b62b5868142f /lib/githubexplorer.pm | |
| parent | add opt to create network (diff) | |
| download | github-explorer-c55a169ead9beb27436144923255c254d215158f.tar.gz | |
update to create graph
Diffstat (limited to '')
| -rw-r--r-- | lib/githubexplorer.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/githubexplorer.pm b/lib/githubexplorer.pm index 67e9e25..4fc5aa5 100644 --- a/lib/githubexplorer.pm +++ b/lib/githubexplorer.pm @@ -6,7 +6,8 @@ use githubexplorer::Schema; use githubexplorer::Gexf; use IO::All; -with qw/githubexplorer::Profile githubexplorer::Repository/; +with qw/githubexplorer::Profile githubexplorer::Repository +githubexplorer::Network/; has seed => ( isa => 'ArrayRef', @@ -72,4 +73,13 @@ sub gen_graph { $xml > io('crawl.gexf'); } +sub graph_repo { + my $self = shift; + $self->_connect unless $self->has_schema; + my $repos = $self->schema->resultset('Repositories')->search({fork => 0}); + while ( my $r = $repos->next ) { + $self->fetch_network($r); + } +} + 1; |
