Lines 29-39
The module defines a set of exceptions for different file types and contexts. Th
Link Here
|
29 |
=cut |
29 |
=cut |
30 |
|
30 |
|
31 |
my $exceptions = { |
31 |
my $exceptions = { |
32 |
pl => [qw(Koha/Schema/Result Koha/Schema.pm)], |
32 |
pl => { tidy => [qw(Koha/Schema/Result Koha/Schema.pm)] }, |
33 |
js => [ |
33 |
js => { |
34 |
qw(koha-tmpl/intranet-tmpl/lib koha-tmpl/intranet-tmpl/js/Gettext.js koha-tmpl/opac-tmpl/lib Koha/ILL/Backend/) |
34 |
tidy => [ |
35 |
], |
35 |
qw(koha-tmpl/intranet-tmpl/lib koha-tmpl/intranet-tmpl/js/Gettext.js koha-tmpl/opac-tmpl/lib Koha/ILL/Backend/) |
36 |
tt => [qw(Koha/ILL/Backend/ *doc-head-open.inc misc/cronjobs/rss)], |
36 |
] |
|
|
37 |
}, |
38 |
tt => { tidy => [qw(Koha/ILL/Backend/ *doc-head-open.inc misc/cronjobs/rss)] }, |
37 |
}; |
39 |
}; |
38 |
|
40 |
|
39 |
=head1 METHODS |
41 |
=head1 METHODS |
Lines 49-56
Creates a new instance of Koha::Devel::Files. The constructor accepts a hash ref
Link Here
|
49 |
=cut |
51 |
=cut |
50 |
|
52 |
|
51 |
sub new { |
53 |
sub new { |
52 |
my ($class) = @_; |
54 |
my ( $class, $args ) = @_; |
53 |
my $self = {}; |
55 |
my $self = { context => $args->{context} }; |
54 |
bless $self, $class; |
56 |
bless $self, $class; |
55 |
return $self; |
57 |
return $self; |
56 |
} |
58 |
} |
Lines 65-71
Builds a Git exclude pattern for a given file type based on the context provided
Link Here
|
65 |
|
67 |
|
66 |
sub build_git_exclude { |
68 |
sub build_git_exclude { |
67 |
my ( $self, $filetype ) = @_; |
69 |
my ( $self, $filetype ) = @_; |
68 |
return join( " ", map( "':(exclude)$_'", @{ $exceptions->{$filetype} } ) ); |
70 |
return $self->{context} && exists $exceptions->{$filetype}->{ $self->{context} } |
|
|
71 |
? join( " ", map( "':(exclude)$_'", @{ $exceptions->{$filetype}->{ $self->{context} } } ) ) |
72 |
: q{}; |
69 |
} |
73 |
} |
70 |
|
74 |
|
71 |
=head2 ls_perl_files |
75 |
=head2 ls_perl_files |