This patch adds a unit test for C4::Search in t/db_dependent. In order
to test the functioning of the Zebra search, this patch actually includes
an entire Zebra sandbox, and pre-indexed files, which are stored in
t/db_dependent/data (the configuration files are generated on the fly).
This test depends on Test::Warn, Test::MockModule, and DBD::Mock.
To test:
1) Run the test. There should be no failures, and no warnings.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
In order for the awesome new t/ItemType.t test to work, we need
DBD::Mock.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Cache::Memcached::Fast is used for caching
Test::YAML::Valid is used for tests
Signed-off-by: Marc Veron <veron@veron.ch>
Dependencies appear as expected...
...and I see that they are not instaled yet on my server :-)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
HTML::FormatText is used by Template::Plugin::HtmlToText which is called in the template for opac-sendbasket.pl.
This is not a core Perl 5.10 module. I had to install it additionally on a test server. So I am adding it to PerlDependencies.
I just picked an old version 1.23 that I still could find as min_ver.
Changed the version information for Test::Strict too (not required, only for tests).
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Adds new dependency Text::Unaccent to PerlDependencies.pm
Module is used currently to remove diacricits from automatically
created userid (<first name>.<surname>) in the patron module.
Test scenario:
1. open About Koha > Perl modules
2. verify that Text::Unaccent is there
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch adds t/db_dependent/00-strict.pl which tests that all Perl
scripts compile. I chose to use Test::Strict so that in the future we
can also have the test check that "use strict" and "use warnings" are
enabled.
To test:
1. Run t/db_dependent/00-strict.pl.
2. Run around waving your arms in the air that we have a couple of
scripts that don't compile.
3. Actually, that's about it. You could test my patch for bug 8384 next.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Moved test to t/db_dependent
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This removes the dependency on Date::ICal (which is largely
unmaintained) and replaces it with DateTime::Format::ICal which can do
the same job. It also updates all the docs and installation scripts to
handle this change.
Note that this causes a minor behaviour change: previously the generated
times were converted to UTC, now they are left "floating" (that is, have
no timezone attached) and so will appear as the local time when imported
into a calendar. I don't anticipate this'll cause any issues however.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Removes HTML::Template::Pro as a requirement (since we're now on Template::Toolkit).
To test:
On a system without, HTML::Template::Pro installed, run perl koha_perl_deps.pl -m -u
Shouldn't return anything about HTML::Template::Pro
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This CPAN module is needed for the ShowReviewerPhoto functionality.
Unfortunately the version in Squeeze (1.02) is not sufficient so it
has to be installed from CPAN:
sudo apt-get install libnet-dns-perl libtest-warn-perl
sudo cpan Gravatar::URL
Signed-off-by: Francois Marier <francois@debian.org>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This patch lowers the dependency on the "Storable" Perl package
(also known as module/distribution) from version 2.21 to 2.20
This patch created today (14-Apr-2011) does, in PerlDependencies.pm,
the same as a previous patch dated 30-Mar-2010 from Lars Wirzenius
did, in Makefile.PL :
[Koha-patches] [PATCH] Lower dependency on Storable to 2.20.
http://lists.koha-community.org/pipermail/koha-patches/2010-March/011560.html
The reason for this patch is the same that Lars gave for his:
" The Debian squeeze system has only 2.20, and the 2.21 does not seem
to be required for all tests to pass. Also, checked with
Galen Charlton and Henri-Damien LAURENT (who added the 2.21 dependency)
on IRC that 2.21 did not have anything that was required, compared
to 2.20. "
I believe this patch should be applied to the "master" branch
and should also be "cherry-picked" for the "3.2.x" branch.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
The way Koha get book cover from Amazon doesn't work from biblio records
having ISBN13 because Amazon expect an ISBN10. This patch transforms
ISBN13 into ISBN10 before sending it to Amazon.
Warning! On some devel installations, you will have to install by hand a
new CPAN depency:
Business::ISBN
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Calls to VERSION were generating errors when called on a string.
Use a bit of sleight of hand to avoid this
Added a couple of tests on Installer/PerlModules
Module needs better coverage testing (esp on newer perls)
Sorted to list of modules to make koha_perl_deps.pl more
human-friendly
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
The canonical list of Perl module dependencies are in
C4::Installer::PerlDependencies::PERL_DEPS now. Add a script
(debian/list-deps) to turn that into a list of Debian package names.
Because that is a slow process, and the output rarely changes, do
not do that at build time. Also, doing it at build time would require
modifying debian/control in evil ways.
Instead, add another tool, debian/update-control, which reads the
new file debian/control.in, and adds the output of debian/list-deps to
Build-Depends and creates a new debian/control.
debian/control.in is the master file. If changes are needed, that should
be edited. For performance and convenience reasons, the output is also kept
in git, but don't edit debian/control directly, please. Such changes
might get lost by the next commit by someone else.
Whenever PERL_DEPS changes, debian/update-control should be run as well
and the result committed to git.
This is not quite as automatic as it might be, but should be good enough.
It avoids keeping the list of Perl modules in two places.
Note that since it seems impossible to automatically figure out the Debian
package version that corresponds to a Perl module version, I have not
tried to do that at all.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This brings the required version into line with the latest version available in the Debian and Ubuntu repos.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch adds two modules: C4::Installer::PerlModule and C4::Installer::PerlDependencies. The latter provides a single point
of reference for cataloging Koha Perl dependencies. The former provides an OO style interface to the dependency catalog.
The format of C4::Installer::PerlDependencies is very simply an anonymous hash of hashes. Each second level hash takes this form:
'Foo::Bar' => {
'usage' => 'FooBar Feature',
'required' => '1', # 0 if optional
'min_ver' => '0.01',
},
New modules can be appended to C4::Installer::PerlDependencies as needed and will be picked up by every piece of code which needs
this information.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>