Wholesale removal of the old model and compat code
[catagits/Gitalist.git] / lib / Gitalist / Model / GitRepos.pm
index 81623b4..5e0bddb 100644 (file)
@@ -4,20 +4,10 @@ use Moose;
 use Gitalist::Git::Repo;
 use namespace::autoclean;
 
-extends 'Catalyst::Model';
-with 'Catalyst::Component::InstancePerContext'; # Note we only need to be
-                                                # InstancePerContext as we nick
-                                                # the config from the other
-                                                # model. Once we take over just
-                                                # use ::Model::Adaptor
+sub COMPONENT {
+    my ($class, $app, $config) = @_;
 
-sub build_per_context_instance {
-    my ( $self, $c ) = @_;
-
-    return Gitalist::Git::Repo->new(
-        repo_dir => $c->model('Git')->repo_dir,
-    );
+    Gitalist::Git::Repo->new($config);
 }
 
 __PACKAGE__->meta->make_immutable;
-