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