blib/lib/Yukki/Settings/Repository.pm

filter: Statementstmt 96.7% 30 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 1 / 1 totaltotal 95.0% 38 / 40 SCAR 0.0
CC
1
Cov
97%
savable_attributes
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Yukki/TextUtil.pm ↑ Summary bin/yukki-git-init »
1 package Yukki::Settings::Repository;
2 13 $Yukki::Settings::Repository::VERSION = '0.991_002'; # TRIAL
3  
4 13 ▶$Yukki::Settings::Repository::VERSION = '0.991002';use v5.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 13 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 13 extends 'Yukki::Settings::Privileges';
9  
10 13 with 'Yukki::Role::Savable';
11  
12 13 ▶use Types::Path::Tiny qw( Path );
Subroutine BEGIN: called CC=1 SCAR=0.0
13 13 ▶use Types::Standard qw( ArrayRef Int Str );
Subroutine BEGIN: called CC=1 SCAR=0.0
14 13 ▶use Yukki::Types qw( AccessLevel );
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 13 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 # ABSTRACT: settings describing a wiki repository
19  
20  
21 13 has repository => (
22 is => 'ro',
23 isa => Path,
24 required => 1,
25 coerce => 1,
26 );
27  
28  
29 13 has site_branch => (
30 is => 'ro',
31 isa => Str,
32 required => 1,
33 default => 'refs/heads/master',
34 );
35  
36  
37 13 has name => (
38 is => 'ro',
39 isa => Str,
40 required => 1,
41 );
42  
43  
44 13 has default_page => (
45 is => 'ro',
46 isa => Path,
47 required => 1,
48 coerce => 1,
49 default => 'home.yukki',
50 );
51  
52  
53 13 has sort => (
54 is => 'ro',
55 isa => Int,
56 required => 1,
57 default => 50,
58 );
59  
60  
61 sub savable_attributes {
62 0 ▶ qw(
Subroutine savable_attributes: not called CC=1 SCAR=6.9
Pod documented
63 repository
64 site_page
65 name
66 default_page
67 sort
68 anonymous_access_level
69 read_groups
70 write_groups
71 )
72 }
73  
74 13 1;
75  
76 __END__
77  
78 =pod
79  
80 =encoding UTF-8
81  
82 =head1 NAME
83  
84 Yukki::Settings::Repository - settings describing a wiki repository
85  
86 =head1 VERSION
87  
88 version 0.991_002
89  
90 =head1 DESCRIPTION
91  
92 This class provides structure for describing a git repository used to back a Yukki workspace. These may either be defined as part of the main settings file for command-line managed repositories. App-managed repositories will be stored in a sub-directory, each configuration in its own file.
93  
94 =head1 ISA
95  
96 L<Yukki::Settings::Privileges>
97  
98 =head1 ROLES
99  
100 L<Yukki::Role::Savable>
101  
102 =head1 ATTRIBUTES
103  
104 =head2 repository
105  
106 This is required. This is the name of the git repository folder found under C<repository_path>.
107  
108 =head2 site_branch
109  
110 This is the name of the branch that will contain the wiki's files. The default is C<refs/heads/master>. You could actually use the same git repository for multiple Yukki repositories by using different branches. If you want to do it that way for some reason. Unless you know what you're doing, you probably don't want to do that.
111  
112 =head2 name
113  
114 This is a human readable title for the repository.
115  
116 =head2 default_page
117  
118 This is the name of the main repository index.
119  
120 =head2 sort
121  
122 This is the sort order the repository should take when being listed in menus. The default is 50. The value must be an integer.
123  
124 =head1 METHODS
125  
126 =head2 savable_attributes
127  
128 The list of savable attributes.
129  
130 =head1 AUTHOR
131  
132 Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
133  
134 =head1 COPYRIGHT AND LICENSE
135  
136 This software is copyright (c) 2017 by Qubling Software LLC.
137  
138 This is free software; you can redistribute it and/or modify it under
139 the same terms as the Perl 5 programming language system itself.
140  
141 =cut
« blib/lib/Yukki/TextUtil.pm ↑ Summary bin/yukki-git-init »