Hello community,
here is the log from the commit of package perl-DBIx-Class-Fixtures for openSUSE:Factory checked in at 2018-03-24 16:13:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DBIx-Class-Fixtures (Old)
and /work/SRC/openSUSE:Factory/.perl-DBIx-Class-Fixtures.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-DBIx-Class-Fixtures"
Sat Mar 24 16:13:48 2018 rev:4 rq:583231 version:1.001039
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-DBIx-Class-Fixtures/perl-DBIx-Class-Fixtures.changes 2016-07-01 09:58:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-DBIx-Class-Fixtures.new/perl-DBIx-Class-Fixtures.changes 2018-03-24 16:13:49.414864113 +0100
@@ -1,0 +2,19 @@
+Mon Mar 5 06:11:55 UTC 2018 - coolo@suse.com
+
+- updated to 1.001039
+ see /usr/share/doc/packages/perl-DBIx-Class-Fixtures/Changes
+
+ 1.001039 2017-09-25 14:15:55+00:00 UTC
+
+ - remove trailing comma in tests that was breaking on most JSON parsers.
+
+ 1.001038 2017-09-20 21:13:13+00:00 UTC
+
+ - stop sorting source names before dumping, this allows for some hackery when you need certain sources to dump first (see https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/12 for details) (cngarrison++)
+ - doc patch for exclude attr (simbabque++)
+
+ 1.001037 2017-09-20 20:42:03+00:00 UTC
+
+ - ignore virtual columns in dump_object (mmims++)
+
+-------------------------------------------------------------------
Old:
----
DBIx-Class-Fixtures-1.001036.tar.gz
New:
----
DBIx-Class-Fixtures-1.001039.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-DBIx-Class-Fixtures.spec ++++++
--- /var/tmp/diff_new_pack.nXmXhz/_old 2018-03-24 16:13:50.122838593 +0100
+++ /var/tmp/diff_new_pack.nXmXhz/_new 2018-03-24 16:13:50.126838448 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-DBIx-Class-Fixtures
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
Name: perl-DBIx-Class-Fixtures
-Version: 1.001036
+Version: 1.001039
Release: 0
%define cpan_name DBIx-Class-Fixtures
Summary: Dump data and repopulate a database using rules
-License: Artistic-1.0 or GPL-1.0+
+License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/DBIx-Class-Fixtures/
-Source0: http://www.cpan.org/authors/id/S/SK/SKAUFMAN/%{cpan_name}-%{version}.tar.gz
+Source0: https://cpan.metacpan.org/authors/id/S/SK/SKAUFMAN/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -50,6 +50,7 @@
BuildRequires: perl(Path::Class) >= 0.32
BuildRequires: perl(Scalar::Util) >= 1.27
BuildRequires: perl(Test::Compile::Internal)
+BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::More) >= 0.98
BuildRequires: perl(Test::TempDir::Tiny)
Requires: perl(Class::Accessor::Grouped) >= 0.1001
@@ -69,8 +70,6 @@
Requires: perl(JSON::Syck) >= 1.27
Requires: perl(Path::Class) >= 0.32
Requires: perl(Scalar::Util) >= 1.27
-Requires: perl(Test::Compile::Internal)
-Requires: perl(Test::TempDir::Tiny)
%{perl_requires}
%description
@@ -98,6 +97,7 @@
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes LICENSE README
+%doc Changes README
+%license LICENSE
%changelog
++++++ DBIx-Class-Fixtures-1.001036.tar.gz -> DBIx-Class-Fixtures-1.001039.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/Changes new/DBIx-Class-Fixtures-1.001039/Changes
--- old/DBIx-Class-Fixtures-1.001036/Changes 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/Changes 2017-09-25 16:15:57.000000000 +0200
@@ -1,5 +1,18 @@
Revision history for DBIx-Class-Fixtures
+1.001039 2017-09-25 14:15:55+00:00 UTC
+
+- remove trailing comma in tests that was breaking on most JSON parsers.
+
+1.001038 2017-09-20 21:13:13+00:00 UTC
+
+- stop sorting source names before dumping, this allows for some hackery when you need certain sources to dump first (see https://github.com/dbsrgits/DBIx-Class-Fixtures/pull/12 for details) (cngarrison++)
+- doc patch for exclude attr (simbabque++)
+
+1.001037 2017-09-20 20:42:03+00:00 UTC
+
+- ignore virtual columns in dump_object (mmims++)
+
1.001036 2016-03-21 14:59:55+00:00 UTC
- releasing as stable
@@ -100,7 +113,7 @@
1.001013
- fixed functionality in last release by more deeply cloning parameters, which
- prevents bad things when parameters get deleted in the wrong places. Also
+ prevents bad things when parameters get deleted in the wrong places. Also
be sure we clear state properly after a dump.
1.001012
@@ -109,8 +122,8 @@
to make it easier when you need to dump all the fixtures programatically.
- Added method 'dump_config_sets' to let you dump more than one set at a time
more easily
-- Added method 'dump_all_config_sets' which helps automate dumping all your
- current config sets to a directory.
+- Added method 'dump_all_config_sets' which helps automate dumping all your
+ current config sets to a directory.
1.001011
- Added an excludes resultsource option to the ->dump({all=>1,...}) feature
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/MANIFEST new/DBIx-Class-Fixtures-1.001039/MANIFEST
--- old/DBIx-Class-Fixtures-1.001036/MANIFEST 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/MANIFEST 2017-09-25 16:15:57.000000000 +0200
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.037.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.008.
Changes
LICENSE
MANIFEST
@@ -34,6 +34,7 @@
t/18-extra.t
t/19-complex-hierarchy.t
t/19-populate-unicode.t
+t/20-virtual-column.t
t/compile.t
t/lib/DBICTest.pm
t/lib/DBICTest/Schema.pm
@@ -48,6 +49,7 @@
t/lib/DBICTest/Schema2/Artist.pm
t/lib/DBICTest/Schema2/CD.pm
t/lib/DBICTest/Schema2/Friend.pm
+t/lib/DBICTest/Schema3.pm
t/lib/ExtraTest/Schema.pm
t/lib/mysql.sql
t/lib/post_sqlite.sql
@@ -66,6 +68,7 @@
t/var/configs/simple.json
t/var/configs/unicode.json
t/var/configs/use_create.json
+t/var/configs/virtual-columns.json
t/var/configs/washed-up.json
t/var/fixtures/CD/1.fix
t/var/fixtures/CD/2.fix
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/META.json new/DBIx-Class-Fixtures-1.001039/META.json
--- old/DBIx-Class-Fixtures-1.001036/META.json 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/META.json 2017-09-25 16:15:57.000000000 +0200
@@ -4,7 +4,7 @@
"Luke Saunders "
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 5.037, CPAN::Meta::Converter version 2.150005",
+ "generated_by" : "Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150005",
"license" : [
"perl_5"
],
@@ -25,6 +25,7 @@
"DBIx::Class::InflateColumn::FS" : "0.01007",
"Devel::Confess" : "0",
"ExtUtils::MakeMaker" : "6.59",
+ "Test::Fatal" : "0",
"Test::More" : "0.98"
}
},
@@ -53,17 +54,18 @@
"MIME::Base64" : "0",
"Path::Class" : "0.32",
"Scalar::Util" : "1.27",
- "Test::Compile::Internal" : "0",
- "Test::TempDir::Tiny" : "0",
"perl" : "v5.6.1"
}
},
"test" : {
"requires" : {
+ "File::Path" : "0",
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
- "Test::More" : "0.98"
+ "Test::Compile::Internal" : "0",
+ "Test::More" : "0.98",
+ "Test::TempDir::Tiny" : "0"
}
}
},
@@ -75,13 +77,14 @@
"web" : "https://github.com/dbsrgits/DBIx-Class-Fixtures"
}
},
- "version" : "1.001036",
+ "version" : "1.001039",
"x_authority" : "cpan:SKAUFMAN",
"x_contributors" : [
"Ash Berlin ",
+ "Charlie Garrison ",
"Chris Akins ",
"Chris Weyl ",
- "Dagfinn Ilmari Mannsåker ",
+ "Dagfinn Ilmari Manns\u00e5ker ",
"Drew Taylor ",
"Frank Switalski ",
"Frank Switalski ",
@@ -94,6 +97,7 @@
"John Napiorkowski ",
"Justin Hunter ",
"Luke Saunders ",
+ "Marc Mims ",
"Mike Francis ",
"Patrick Simon ",
"Peter Rabbitson ",
@@ -101,8 +105,10 @@
"Rob Kinyon ",
"Samuel Kaufman ",
"Samuel Kaufman ",
+ "simbabque ",
"Tim Bunce ",
"Tom Bloor "
- ]
+ ],
+ "x_serialization_backend" : "Cpanel::JSON::XS version 3.0227"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/META.yml new/DBIx-Class-Fixtures-1.001039/META.yml
--- old/DBIx-Class-Fixtures-1.001036/META.yml 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/META.yml 2017-09-25 16:15:57.000000000 +0200
@@ -6,14 +6,18 @@
DBIx::Class::InflateColumn::FS: '0.01007'
Devel::Confess: '0'
ExtUtils::MakeMaker: '6.59'
+ File::Path: '0'
File::Spec: '0'
IO::Handle: '0'
IPC::Open3: '0'
+ Test::Compile::Internal: '0'
+ Test::Fatal: '0'
Test::More: '0.98'
+ Test::TempDir::Tiny: '0'
configure_requires:
ExtUtils::MakeMaker: '6.59'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.037, CPAN::Meta::Converter version 2.150005'
+generated_by: 'Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150005'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -42,15 +46,14 @@
MIME::Base64: '0'
Path::Class: '0.32'
Scalar::Util: '1.27'
- Test::Compile::Internal: '0'
- Test::TempDir::Tiny: '0'
perl: v5.6.1
resources:
repository: https://github.com/dbsrgits/DBIx-Class-Fixtures.git
-version: '1.001036'
+version: '1.001039'
x_authority: cpan:SKAUFMAN
x_contributors:
- 'Ash Berlin '
+ - 'Charlie Garrison '
- 'Chris Akins '
- 'Chris Weyl '
- 'Dagfinn Ilmari Mannsåker '
@@ -66,6 +69,7 @@
- 'John Napiorkowski '
- 'Justin Hunter '
- 'Luke Saunders '
+ - 'Marc Mims '
- 'Mike Francis '
- 'Patrick Simon '
- 'Peter Rabbitson '
@@ -73,5 +77,7 @@
- 'Rob Kinyon '
- 'Samuel Kaufman '
- 'Samuel Kaufman '
+ - 'simbabque '
- 'Tim Bunce '
- 'Tom Bloor '
+x_serialization_backend: 'YAML::Tiny version 1.67'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/Makefile.PL new/DBIx-Class-Fixtures-1.001039/Makefile.PL
--- old/DBIx-Class-Fixtures-1.001036/Makefile.PL 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/Makefile.PL 2017-09-25 16:15:57.000000000 +0200
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.037.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.008.
use strict;
use warnings;
@@ -13,13 +13,13 @@
"DBIx::Class::InflateColumn::FS" => "0.01007",
"Devel::Confess" => 0,
"ExtUtils::MakeMaker" => "6.59",
+ "Test::Fatal" => 0,
"Test::More" => "0.98"
},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.59"
},
"DISTNAME" => "DBIx-Class-Fixtures",
- "EXE_FILES" => [],
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.006001",
"NAME" => "DBIx::Class::Fixtures",
@@ -41,17 +41,18 @@
"JSON::Syck" => "1.27",
"MIME::Base64" => 0,
"Path::Class" => "0.32",
- "Scalar::Util" => "1.27",
- "Test::Compile::Internal" => 0,
- "Test::TempDir::Tiny" => 0
+ "Scalar::Util" => "1.27"
},
"TEST_REQUIRES" => {
+ "File::Path" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
- "Test::More" => "0.98"
+ "Test::Compile::Internal" => 0,
+ "Test::More" => "0.98",
+ "Test::TempDir::Tiny" => 0
},
- "VERSION" => "1.001036",
+ "VERSION" => "1.001039",
"test" => {
"TESTS" => "t/*.t"
}
@@ -73,6 +74,7 @@
"Devel::Confess" => 0,
"ExtUtils::MakeMaker" => "6.59",
"File::Copy::Recursive" => "0.38",
+ "File::Path" => 0,
"File::Spec" => 0,
"File::Temp" => "0.2304",
"Hash::Merge" => "0.1",
@@ -84,6 +86,7 @@
"Path::Class" => "0.32",
"Scalar::Util" => "1.27",
"Test::Compile::Internal" => 0,
+ "Test::Fatal" => 0,
"Test::More" => "0.98",
"Test::TempDir::Tiny" => 0
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/README new/DBIx-Class-Fixtures-1.001039/README
--- old/DBIx-Class-Fixtures-1.001036/README 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/README 2017-09-25 16:15:57.000000000 +0200
@@ -1,7 +1,7 @@
This archive contains the distribution DBIx-Class-Fixtures,
-version 1.001036:
+version 1.001039:
Dump data and repopulate a database using rules
@@ -11,5 +11,5 @@
the same terms as the Perl 5 programming language system itself.
-This README file was generated by Dist::Zilla::Plugin::Readme v5.037.
+This README file was generated by Dist::Zilla::Plugin::Readme v6.008.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/dist.ini new/DBIx-Class-Fixtures-1.001039/dist.ini
--- old/DBIx-Class-Fixtures-1.001036/dist.ini 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/dist.ini 2017-09-25 16:15:57.000000000 +0200
@@ -64,6 +64,7 @@
ExtUtils::MakeMaker = 6.59
Test::More = 0.98
Devel::Confess = 0
+Test::Fatal = 0
[Prereqs]
Class::Accessor::Grouped = 0.1001
@@ -84,6 +85,9 @@
Path::Class = 0.32
Scalar::Util = 1.27
perl = 5.6.1
-Test::Compile::Internal = 0
IO::All = 0.85
-Test::TempDir::Tiny=0
+
+[Prereqs / TestRequires]
+Test::TempDir::Tiny = 0
+File::Path = 0
+Test::Compile::Internal = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/DBI/Pg.pm new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/DBI/Pg.pm
--- old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/DBI/Pg.pm 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/DBI/Pg.pm 2017-09-25 16:15:57.000000000 +0200
@@ -1,5 +1,5 @@
package DBIx::Class::Fixtures::DBI::Pg;
-$DBIx::Class::Fixtures::DBI::Pg::VERSION = '1.001036';
+$DBIx::Class::Fixtures::DBI::Pg::VERSION = '1.001039';
use strict;
use warnings;
use base qw/DBIx::Class::Fixtures::DBI/;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/DBI/mysql.pm new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/DBI/mysql.pm
--- old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/DBI/mysql.pm 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/DBI/mysql.pm 2017-09-25 16:15:57.000000000 +0200
@@ -1,5 +1,5 @@
package DBIx::Class::Fixtures::DBI::mysql;
-$DBIx::Class::Fixtures::DBI::mysql::VERSION = '1.001036';
+$DBIx::Class::Fixtures::DBI::mysql::VERSION = '1.001039';
use strict;
use warnings;
use base qw/DBIx::Class::Fixtures::DBI/;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/DBI.pm new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/DBI.pm
--- old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/DBI.pm 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/DBI.pm 2017-09-25 16:15:57.000000000 +0200
@@ -1,5 +1,5 @@
package DBIx::Class::Fixtures::DBI;
-$DBIx::Class::Fixtures::DBI::VERSION = '1.001036';
+$DBIx::Class::Fixtures::DBI::VERSION = '1.001039';
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/External/File.pm new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/External/File.pm
--- old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/External/File.pm 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/External/File.pm 2017-09-25 16:15:57.000000000 +0200
@@ -1,5 +1,5 @@
package DBIx::Class::Fixtures::External::File;
-$DBIx::Class::Fixtures::External::File::VERSION = '1.001036';
+$DBIx::Class::Fixtures::External::File::VERSION = '1.001039';
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/Schema.pm new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/Schema.pm
--- old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures/Schema.pm 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures/Schema.pm 2017-09-25 16:15:57.000000000 +0200
@@ -1,5 +1,5 @@
package DBIx::Class::Fixtures::Schema;
-$DBIx::Class::Fixtures::Schema::VERSION = '1.001036';
+$DBIx::Class::Fixtures::Schema::VERSION = '1.001039';
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures.pm new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures.pm
--- old/DBIx-Class-Fixtures-1.001036/lib/DBIx/Class/Fixtures.pm 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/lib/DBIx/Class/Fixtures.pm 2017-09-25 16:15:57.000000000 +0200
@@ -23,7 +23,7 @@
__PACKAGE__->mk_group_accessors( 'simple' => qw/config_dir
_inherited_attributes debug schema_class dumped_objects config_attrs/);
-our $VERSION = '1.001036';
+our $VERSION = '1.001039';
$VERSION = eval $VERSION;
@@ -557,7 +557,8 @@
$fixtures->dump({
all => 1, # just dump everything that's in the schema
schema => $source_dbic_schema,
- directory => '/home/me/app/fixtures' # output directory
+ directory => '/home/me/app/fixtures', # output directory
+ #excludes => [ qw/Foo MyView/ ], # optionally exclude certain sources
});
In this case objects will be dumped to subdirectories in the specified
@@ -567,9 +568,14 @@
/home/me/app/fixtures/artist/3.fix
/home/me/app/fixtures/producer/5.fix
-schema and directory are required attributes. also, one of config or all must
+C<schema> and C<directory> are required attributes. also, one of C<config> or C<all> must
be specified.
+The optional parameter C<excludes> takes an array ref of source names and can be
+used to exclude those sources when dumping the whole schema. This is useful if
+you have views in there, since those do not need fixtures and will currently result
+in an error when they are created and then used with C<populate>.
+
Lastly, the C<config> parameter can be a Perl HashRef instead of a file name.
If this form is used your HashRef should conform to the structure rules defined
for the JSON representations.
@@ -644,7 +650,7 @@
$tmp_output_dir->file('_config_set')->print( Dumper $config );
$config->{rules} ||= {};
- my @sources = sort { $a->{class} cmp $b->{class} } @{delete $config->{sets}};
+ my @sources = @{delete $config->{sets}};
while ( my ($k,$v) = each %{ $config->{rules} } ) {
if ( my $source = eval { $schema->source($k) } ) {
@@ -848,7 +854,14 @@
# write file
unless ($exists) {
$self->msg('-- dumping ' . "$file", 2);
- my %ds = $object->get_columns;
+
+ # get_columns will return virtual columns; we just want stored columns.
+ # columns_info keys seems to be the actual storage column names, so we'll
+ # use that.
+ my $col_info = $src->columns_info;
+ my @column_names = keys %$col_info;
+ my %columns = $object->get_columns;
+ my %ds; @ds{@column_names} = @columns{@column_names};
if($set->{external}) {
foreach my $field (keys %{$set->{external}}) {
@@ -867,8 +880,8 @@
# mess with dates if specified
if ($set->{datetime_relative}) {
- my $formatter= $object->result_source->schema->storage->datetime_parser;
- unless ($@ || !$formatter) {
+ my $formatter= eval {$object->result_source->schema->storage->datetime_parser};
+ unless (!$formatter) {
my $dt;
if ($set->{datetime_relative} eq 'today') {
$dt = DateTime->today;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/t/18-extra.t new/DBIx-Class-Fixtures-1.001039/t/18-extra.t
--- old/DBIx-Class-Fixtures-1.001036/t/18-extra.t 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/t/18-extra.t 2017-09-25 16:15:57.000000000 +0200
@@ -18,7 +18,8 @@
ok my $row = $schema
->resultset('Photo')
->create({
- photographer=>'john',
+ album=> {name=>'masterpiece'},
+ photographer=> {name=>'john'},
file=>$fh,
});
@@ -42,6 +43,8 @@
ok -e $key, 'File Created';
ok $schema->resultset('Photo')->delete;
+ok $schema->resultset('Photographer')->delete;
+ok $schema->resultset('Album')->delete;
ok ! -e $key, 'File Deleted';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/t/20-virtual-column.t new/DBIx-Class-Fixtures-1.001039/t/20-virtual-column.t
--- old/DBIx-Class-Fixtures-1.001036/t/20-virtual-column.t 1970-01-01 01:00:00.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/t/20-virtual-column.t 2017-09-25 16:15:57.000000000 +0200
@@ -0,0 +1,60 @@
+use strict;
+use warnings;
+
+use DBIx::Class::Fixtures;
+use Test::More;
+use Test::Fatal;
+use File::Path 'rmtree';
+
+use lib qw(t/lib/DBICTest);
+use Schema3;
+use Test::TempDir::Tiny;
+use IO::All;
+
+my $tempdir = tempdir;
+
+(my $schema = Schema3->connect(
+ 'DBI:SQLite::memory:','',''))->init_schema;
+
+ok my $row = $schema
+ ->resultset('Person')
+ ->first;
+
+ok $row->get_column('weight_to_height_ratio'),
+ 'has virtual column';
+
+my $fixtures = DBIx::Class::Fixtures
+ ->new({
+ config_dir => io->catfile(qw't var configs')->name,
+ debug => 0 });
+
+ok(
+ $fixtures->dump({
+ config => 'virtual-columns.json',
+ schema => $schema,
+ directory => io->catfile($tempdir, 'people')->name }),
+ 'fetch dump executed okay');
+
+ok $schema->resultset('Person')->delete;
+
+is exception {
+ $fixtures->populate({
+ no_deploy => 1,
+ schema => $schema,
+ directory => io->catfile($tempdir, 'people')->name
+ })
+}, undef, 'populated';
+
+$row = $schema->resultset('Person')->first;
+
+BAIL_OUT("can't continue without data") unless $row;
+
+ok $row->get_column('weight_to_height_ratio'),
+ 'still has virtual column';
+
+done_testing;
+
+END {
+ rmtree io->catfile(qw't var files')->name;
+ rmtree io->catfile($tempdir, 'people')->name;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/t/lib/DBICTest/Schema3.pm new/DBIx-Class-Fixtures-1.001039/t/lib/DBICTest/Schema3.pm
--- old/DBIx-Class-Fixtures-1.001036/t/lib/DBICTest/Schema3.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/t/lib/DBICTest/Schema3.pm 2017-09-25 16:15:57.000000000 +0200
@@ -0,0 +1,71 @@
+package Schema3::Result::Person;
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('person');
+
+__PACKAGE__->add_columns(
+ id => {
+ data_type => 'integer',
+ is_auto_increment => 1,
+ },
+ name => {
+ data_type => 'varchar',
+ size => 255,
+ },
+ weight => {
+ datatype => 'float',
+ },
+ height => {
+ datatype => 'float',
+ },
+);
+
+__PACKAGE__->set_primary_key('id');
+
+# Add virtual column
+__PACKAGE__->resultset_attributes({
+ '+select' => [ \'weight/height' ],
+ '+as' => [ 'weight_to_height_ratio' ],
+});
+
+package Schema3;
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Schema';
+
+__PACKAGE__->register_class(Person => 'Schema3::Result::Person');
+
+sub load_sql {
+ local $/ = undef;
+ my $sql = <DATA>;
+}
+
+sub init_schema {
+ my $sql = (my $schema = shift)
+ ->load_sql;
+
+ ($schema->storage->dbh->do($_) ||
+ die "Error on SQL: $_\n")
+ for split(/;\n/, $sql);
+}
+
+1;
+
+__DATA__
+CREATE TABLE person (
+ id INTEGER PRIMARY KEY NOT NULL,
+ name varchar(255) NOT NULL,
+ weight FLOAT NOT NULL,
+ height FLOAT NOT NULL
+);
+
+INSERT INTO person (name, weight, height)
+VALUES
+('Fred Flintstone', 220, 5.2),
+('Barney Rubble', 190, 4.8)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/t/lib/ExtraTest/Schema.pm new/DBIx-Class-Fixtures-1.001039/t/lib/ExtraTest/Schema.pm
--- old/DBIx-Class-Fixtures-1.001036/t/lib/ExtraTest/Schema.pm 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/t/lib/ExtraTest/Schema.pm 2017-09-25 16:15:57.000000000 +0200
@@ -1,3 +1,52 @@
+package ExtraTest::Schema::Result::Album;
+
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('album');
+__PACKAGE__->add_columns(
+ 'albumid' => {
+ data_type => 'integer',
+ is_auto_increment => 1,
+ },
+ 'name' => {
+ data_type => 'varchar',
+ size => 100,
+ is_nullable => 1,
+ },
+);
+__PACKAGE__->set_primary_key('albumid');
+
+__PACKAGE__->has_many(
+ photos => 'ExtraTest::Schema::Result::Photo'
+);
+
+1;
+
+package ExtraTest::Schema::Result::Photographer;
+
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('photographer');
+__PACKAGE__->add_columns(
+ 'photographerid' => {
+ data_type => 'integer',
+ is_auto_increment => 1,
+ },
+ 'name' => {
+ data_type => 'varchar',
+ size => 100,
+ is_nullable => 1,
+ },
+);
+__PACKAGE__->set_primary_key('photographerid');
+
+__PACKAGE__->has_many(
+ photos => 'ExtraTest::Schema::Result::Photo'
+);
+
+1;
+
+
package ExtraTest::Schema::Result::Photo;
use strict;
@@ -13,9 +62,11 @@
data_type => 'integer',
is_auto_increment => 1,
},
+ album => {
+ data_type => 'integer',
+ },
photographer => {
- data_type => 'varchar',
- size => 40,
+ data_type => 'integer',
},
file => {
data_type => 'varchar',
@@ -26,6 +77,9 @@
__PACKAGE__->set_primary_key('photo_id');
+__PACKAGE__->belongs_to( photographer => 'ExtraTest::Schema::Result::Photographer' );
+__PACKAGE__->belongs_to( album => 'ExtraTest::Schema::Result::Album' );
+
package ExtraTest::Schema;
use strict;
@@ -34,6 +88,10 @@
use base 'DBIx::Class::Schema';
__PACKAGE__->register_class(
+ Album => 'ExtraTest::Schema::Result::Album');
+__PACKAGE__->register_class(
+ Photographer => 'ExtraTest::Schema::Result::Photographer');
+__PACKAGE__->register_class(
Photo => 'ExtraTest::Schema::Result::Photo');
sub load_sql {
@@ -53,9 +111,18 @@
1;
__DATA__
+CREATE TABLE album (
+ albumid INTEGER PRIMARY KEY NOT NULL,
+ name varchar(100) NOT NULL
+);
+CREATE TABLE photographer (
+ photographerid INTEGER PRIMARY KEY NOT NULL,
+ name varchar(100) NOT NULL
+);
CREATE TABLE photo (
photo_id INTEGER PRIMARY KEY NOT NULL,
- photographer varchar(40) NOT NULL,
+ album INTEGER NOT NULL,
+ photographer INTEGER NOT NULL,
file varchar(255) NOT NULL
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/t/var/configs/extra.json new/DBIx-Class-Fixtures-1.001039/t/var/configs/extra.json
--- old/DBIx-Class-Fixtures-1.001036/t/var/configs/extra.json 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/t/var/configs/extra.json 2017-09-25 16:15:57.000000000 +0200
@@ -8,5 +8,17 @@
"args": {"path":"__ATTR(photo_dir)__"}
}
}
+ },{
+ "class": "Album",
+ "quantity": "all",
+ "fetch" : [
+ {
+ "quantity" : "all",
+ "rel" : "photos"
+ }
+ ]
+ },{
+ "class": "Photographer",
+ "quantity": "all"
}]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/t/var/configs/virtual-columns.json new/DBIx-Class-Fixtures-1.001039/t/var/configs/virtual-columns.json
--- old/DBIx-Class-Fixtures-1.001036/t/var/configs/virtual-columns.json 1970-01-01 01:00:00.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/t/var/configs/virtual-columns.json 2017-09-25 16:15:57.000000000 +0200
@@ -0,0 +1,6 @@
+{
+ "sets": [{
+ "class": "Person",
+ "quantity": "all"
+ }]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBIx-Class-Fixtures-1.001036/t/var/fixtures/_dumper_version new/DBIx-Class-Fixtures-1.001039/t/var/fixtures/_dumper_version
--- old/DBIx-Class-Fixtures-1.001036/t/var/fixtures/_dumper_version 2016-03-21 15:59:58.000000000 +0100
+++ new/DBIx-Class-Fixtures-1.001039/t/var/fixtures/_dumper_version 2017-09-25 16:15:57.000000000 +0200
@@ -1 +1 @@
-1.001034
\ No newline at end of file
+1.001036
\ No newline at end of file