summaryrefslogtreecommitdiff
path: root/lib/githubexplorer.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/githubexplorer.pm')
-rw-r--r--lib/githubexplorer.pm12
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;