bin/yukki-git-init

filter: Statementstmt 100% 16 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 95.4% 21 / 22 SCAR 0.0
CC
1
Cov
94%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Yukki/Settings/Repository.pm ↑ Summary blib/lib/Yukki/Settings.pm »
1 #!/usr/bin/env perl
2 3 ▶use v5.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 ▶use Yukki;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use Git::Repository v1.18;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 my $repo_name = shift;
10 3 my $remote_repo = shift;
11  
12 3 ▶die "usage: $0 repository-name [ remote-repository-url ]\n"
Branch: 1 branch
BranchTrueFalseTotal
unless $repo_name 0 3 3
13 unless $repo_name;
14  
15 3 my $app = Yukki->new;
16  
17 3 $app->model('Root')->init_repository(
18 key => $repo_name,
19 origin => $remote_repo,
20 init_from_settings => 1,
21 );
22  
23 # ABSTRACT: Initialize a git repository for use with Yukki
24 # PODNAME: yukki-git-init
25  
26 __END__
27  
28 =pod
29  
30 =encoding UTF-8
31  
32 =head1 NAME
33  
34 yukki-git-init - Initialize a git repository for use with Yukki
35  
36 =head1 VERSION
37  
38 version 0.991_002
39  
40 =head1 SYNOPSIS
41  
42 yukki-git-init repository
43 yukki-git-init repository remote-repository
44  
45 =head1 DESCRIPTION
46  
47 This will initialize a git repository for use with Yukki. The script must be
48 called with at least one argument and accepts an optional second argument.
49  
50 =over
51  
52 =item repository
53  
54 The repository is the name of the repository to initalized. It should be one of
55 the repository keys in the C<repositories> section of the F<yukki.conf>.
56  
57 =item remote-repository
58  
59 This is a git path to a repository to clone as a mirror for use with Yukki.
60  
61 =back
62  
63 =head1 ENVIRONMENT
64  
65 Normally, this script tries to find F<etc/yukki.conf> from the current working
66 directory. If no configuraiton file is found, it checks C<YUKKI_CONFIG> for the
67 path to this file.
68  
69 =head1 AUTHOR
70  
71 Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
72  
73 =head1 COPYRIGHT AND LICENSE
74  
75 This software is copyright (c) 2017 by Qubling Software LLC.
76  
77 This is free software; you can redistribute it and/or modify it under
78 the same terms as the Perl 5 programming language system itself.
79  
80 =cut
« blib/lib/Yukki/Settings/Repository.pm ↑ Summary blib/lib/Yukki/Settings.pm »