Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Given --model-class that class will be used instead of the whatever Gitalist reasons from the model options. If --model-args is defined then they will be used when constructing the model object in addition to the default arguments.
- Loading branch information
Showing
6 changed files
with
121 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use MooseX::Declare; | ||
|
||
class TestModelFancy with Gitalist::Git::CollectionOfRepositories { | ||
use MooseX::Types::Path::Class qw/Dir/; | ||
|
||
has fanciness => ( | ||
is => 'ro', | ||
isa => 'Bool', | ||
); | ||
|
||
has repo_dir => ( | ||
isa => Dir, | ||
is => 'ro', | ||
required => 1, | ||
coerce => 1, | ||
); | ||
|
||
method _build_repositories { | ||
[$self->get_repository('repo1')] | ||
} | ||
method _get_repo_from_name($name) { | ||
Gitalist::Git::Repository->new($self->repo_dir->subdir($name)->resolve); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
use MooseX::Declare; | ||
|
||
class TestModelSimple extends Gitalist::Git::CollectionOfRepositories::FromDirectory { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters