Subject: | Fwd: Test::Chimps 0.07 patch |
Date: | Mon, 10 Sep 2007 17:09:02 +0200 |
To: | bug-test-chimps [...] rt.cpan.org |
From: | Marcel Grünauer <gr [...] univie.ac.at> |
Hi,
I've tried to install Test::Chimps 0.07 via the CPAN shell on Mac OS
X 10.4 and it required
Jifty::DBI, so it installed Jifty::DBI 0.43. This version seems to
use a new way of declaring
a schema, so I had to adapt Test::Chimps::Report and
Test::Chimps::Server accordingly.
Here is the patch (I hope I sent it in the right format).
Thanks for the Test::Chimps family of modules!
Regards,
Marcel
diff -ruN Test-Chimps-0.07.orig/lib/Test/Chimps/Report.pm Test-
Chimps-0.07/lib/Test/Chimps/Report.pm
--- Test-Chimps-0.07.orig/lib/Test/Chimps/Report.pm 2006-08-14
01:21:43.000000000 +0200
+++ Test-Chimps-0.07/lib/Test/Chimps/Report.pm 2007-09-10
13:22:43.000000000 +0200
@@ -62,27 +62,26 @@
=cut
-use base qw/Jifty::DBI::Record/;
-
-package Test::Chimps::Report::Schema;
use Jifty::DBI::Schema;
+use Jifty::DBI::Record schema {
+ column report_html => type is 'text';
+ column model_structure => type is 'blob',
+ filters are 'Jifty::DBI::Filter::Storable',
'Jifty::DBI::Filter::base64';
+ column timestamp => type is 'timestamp',
+ filters are 'Jifty::DBI::Filter::DateTime';
+ column total_ok => type is 'integer';
+ column total_passed => type is 'integer';
+ column total_nok => type is 'integer';
+ column total_failed => type is 'integer';
+ column total_percentage => type is 'integer';
+ column total_ratio => type is 'integer';
+ column total_seen => type is 'integer';
+ column total_skipped => type is 'integer';
+ column total_todo => type is 'integer';
+ column total_unexpectedly_succeeded => type is 'integer';
+};
-column report_html => type is 'text';
-column model_structure => type is 'text',
- filters are 'Jifty::DBI::Filter::Storable',
'Jifty::DBI::Filter::base64';
-column timestamp => type is 'timestamp',
- filters are 'Jifty::DBI::Filter::DateTime';
-column total_ok => type is 'integer';
-column total_passed => type is 'integer';
-column total_nok => type is 'integer';
-column total_failed => type is 'integer';
-column total_percentage => type is 'integer';
-column total_ratio => type is 'integer';
-column total_seen => type is 'integer';
-column total_skipped => type is 'integer';
-column total_todo => type is 'integer';
-column total_unexpectedly_succeeded => type is 'integer';
=head1 AUTHOR
diff -ruN Test-Chimps-0.07.orig/lib/Test/Chimps/Server.pm Test-
Chimps-0.07/lib/Test/Chimps/Server.pm
--- Test-Chimps-0.07.orig/lib/Test/Chimps/Server.pm 2006-08-14
01:21:43.000000000 +0200
+++ Test-Chimps-0.07/lib/Test/Chimps/Server.pm 2007-09-10
14:58:10.000000000 +0200
@@ -219,8 +219,14 @@
if (defined $self->variables_validation_spec) {
foreach my $var (keys %{$self->variables_validation_spec}) {
- package Test::Chimps::Report::Schema;
- column($var, type(is('text')));
+ eval "
+ package Test::Chimps::Report;
+ use Jifty::DBI::Schema;
+ use Jifty::DBI::Record schema {
+ column '$var' => type is 'text';
+ };
+ ";
+ die $@ if $@;
}
}