From feffa1b2acc7aca98f0c9eff09243add431ba02d Mon Sep 17 00:00:00 2001 From: Bas Bloemsaat Date: Sun, 1 Mar 2015 21:23:35 +0100 Subject: [PATCH 1/5] 3rd attempt --- .travis.yml | 49 +++++++++++++++++++++++++++++++------- README.md | 9 +++++++ t/06-dump-date.t | 3 ++- t/lib/pg.sql | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 10 deletions(-) create mode 100644 README.md create mode 100644 t/lib/pg.sql diff --git a/.travis.yml b/.travis.yml index 4da90ef..1fa2034 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,40 @@ - language: perl - perl: - - "5.18" - - "5.16" - - "5.14" - - "5.12" - - "5.10" - - "5.8" - - "5.6" +language: perl + +tempoffperl: + - "blead" + - "5.8" + - "5.10" + - "5.12" + - "5.14" + - "5.16" + - "5.18" + - "5.20" + +perl: + - "5.18" + - "5.20" + +matrix: + allow_failures: + - perl: "blead" + - perl: "5.8" + +install: + - cpanm --no-skip-satisfied -n Class::Method::Modifiers YAML::XS + - cpanm -n DBD::mysql DBD::Pg + - dzil authordeps --missing | cpanm --no-skip-satisfied -n || { cat ~/.cpanm/build.log ; false ; } + - dzil listdeps --author --missing | cpanm --no-skip-satisfied -n || { cat ~/.cpanm/build.log ; false ; } + +before_script: + - mysql -e 'CREATE DATABASE dbix_class_fixtures_test;' + - psql -c 'create database dbix_class_fixtures_test;' -U postgres + +script: + - dzil test + +env: + matrix : + - FIXTURETEST_DSN='dbi:mysql:dbix_class_fixtures_test:127.0.0.1:3306' FIXTURETEST_USER='root' FIXTURETEST_PASS='' + - FIXTURETEST_DSN='dbi:Pg:dbname=dbix_class_fixtures_test' FIXTURETEST_USER='postgres' FIXTURETEST_PASS='' + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..5987651 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +[![Build Status](https://travis-ci.org/basbloemsaat/DBIx-Class-Fixtures.svg?branch=PRC1)](https://travis-ci.org/basbloemsaat/DBIx-Class-Fixtures) + +DBIx::Class::Fixtures +===================== +Dump data and repopulate a database using rules + +Documentation +============= +https://metacpan.org/pod/DBIx::Class::Fixtures diff --git a/t/06-dump-date.t b/t/06-dump-date.t index 63f47b7..c649920 100644 --- a/t/06-dump-date.t +++ b/t/06-dump-date.t @@ -7,8 +7,9 @@ use DBICTest; use Path::Class; use Data::Dumper; use DateTime; +use IO::All;; -plan skip_all => 'Set $ENV{FIXTURETEST_DSN}, _USER and _PASS to point at MySQL DB to run this test' +plan skip_all => 'Set $ENV{FIXTURETEST_DSN}, FIXTURETEST_USER and FIXTURETEST_PASS to point at MySQL DB to run this test' unless ($ENV{FIXTURETEST_DSN}); plan tests => 5; diff --git a/t/lib/pg.sql b/t/lib/pg.sql new file mode 100644 index 0000000..382e01b --- /dev/null +++ b/t/lib/pg.sql @@ -0,0 +1,62 @@ +-- +-- Table: cd_to_producer +--; +DROP TABLE IF EXISTS cd_to_producer; + +CREATE TABLE cd_to_producer ( + cd integer NOT NULL, + producer integer NOT NULL, + PRIMARY KEY (cd, producer) +); + +-- +-- Table: artist +--; +DROP TABLE IF EXISTS artist; +CREATE TABLE artist ( + artistid INTEGER PRIMARY KEY NOT NULL, + name varchar(100) +); + + +-- +-- Table: cd +--; +DROP TABLE IF EXISTS cd; +CREATE TABLE cd ( + cdid INTEGER PRIMARY KEY NOT NULL, + artist integer NOT NULL, + title varchar(100) NOT NULL, + year varchar(100) NOT NULL +); + +-- +-- Table: track +--; +DROP TABLE IF EXISTS track; +CREATE TABLE track ( + trackid INTEGER PRIMARY KEY NOT NULL, + cd integer NOT NULL, + position integer NOT NULL, + title varchar(100) NOT NULL, + last_updated_on timestamp NULL +); + +-- +-- Table: tags +--; +DROP TABLE IF EXISTS tags; +CREATE TABLE tags ( + tagid INTEGER PRIMARY KEY NOT NULL, + cd integer NOT NULL, + tag varchar(100) NOT NULL +); + +-- +-- Table: producer +--; +DROP TABLE IF EXISTS producer; +CREATE TABLE producer ( + producerid INTEGER PRIMARY KEY NOT NULL, + name varchar(100) NOT NULL +); From 096f7d66f8125d1131201dd574c94a0ac51aa941 Mon Sep 17 00:00:00 2001 From: Bas Bloemsaat Date: Sun, 1 Mar 2015 21:36:19 +0100 Subject: [PATCH 2/5] extended config, ready for pull req --- .travis.yml | 6 +----- README.md | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1fa2034..1c8331d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: perl -tempoffperl: +perl: - "blead" - "5.8" - "5.10" @@ -10,10 +10,6 @@ tempoffperl: - "5.18" - "5.20" -perl: - - "5.18" - - "5.20" - matrix: allow_failures: - perl: "blead" diff --git a/README.md b/README.md index 5987651..0426db5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/basbloemsaat/DBIx-Class-Fixtures.svg?branch=PRC1)](https://travis-ci.org/basbloemsaat/DBIx-Class-Fixtures) +[![Build Status](https://travis-ci.org/dbsrgits/DBIx-Class-Fixtures.svg?branch=master)](https://travis-ci.org/dbsrgits/DBIx-Class-Fixtures) DBIx::Class::Fixtures ===================== From 2012a48e90c4a94ce5e7a1499059d403656b6e22 Mon Sep 17 00:00:00 2001 From: Bas Bloemsaat Date: Sun, 1 Mar 2015 21:39:27 +0100 Subject: [PATCH 3/5] Dist::Zilla explicit for blead --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1c8331d..e2e6e7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: install: - cpanm --no-skip-satisfied -n Class::Method::Modifiers YAML::XS - - cpanm -n DBD::mysql DBD::Pg + - cpanm -n Dist:Zilla DBD::mysql DBD::Pg - dzil authordeps --missing | cpanm --no-skip-satisfied -n || { cat ~/.cpanm/build.log ; false ; } - dzil listdeps --author --missing | cpanm --no-skip-satisfied -n || { cat ~/.cpanm/build.log ; false ; } From ee0a29df17678140c59b37e71b2467839a2e3769 Mon Sep 17 00:00:00 2001 From: Bas Bloemsaat Date: Sun, 1 Mar 2015 22:21:23 +0100 Subject: [PATCH 4/5] some housekeeping and bump travis --- .gitignore | 4 ++ Makefile.PL | 103 ---------------------------------------------------- 2 files changed, 4 insertions(+), 103 deletions(-) delete mode 100644 Makefile.PL diff --git a/.gitignore b/.gitignore index cc26ed0..908b26c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ .*.sw? \.DS_Store +\._\.DS_Store .prove +Makefile.PL +t/var/fixtures/ + diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100644 index c752fca..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,103 +0,0 @@ - -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.025. -use strict; -use warnings; - -use 5.006001; - -use ExtUtils::MakeMaker; - - - -my %WriteMakefileArgs = ( - "ABSTRACT" => "Dump data and repopulate a database using rules", - "AUTHOR" => "Luke Saunders ", - "BUILD_REQUIRES" => { - "DBIx::Class::InflateColumn::FS" => "0.01007", - "Devel::Confess" => 0, - "ExtUtils::MakeMaker" => "6.59", - "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", - "PREREQ_PM" => { - "Class::Accessor::Grouped" => "0.1001", - "Config::Any" => "0.23", - "DBIx::Class" => "0.08102", - "DBIx::Class::Schema::Loader" => "0.07035", - "Data::Dump::Streamer" => "2.05", - "Data::Visitor" => "0.3", - "DateTime" => "1.03", - "DateTime::Format::MySQL" => 0, - "DateTime::Format::Pg" => 0, - "DateTime::Format::SQLite" => "0.1", - "File::Copy::Recursive" => "0.38", - "Hash::Merge" => "0.1", - "IO::All" => "0.85", - "JSON::Syck" => "1.27", - "MIME::Base64" => 0, - "Path::Class" => "0.32", - "Scalar::Util" => "1.27", - "Test::Compile::Internal" => 0 - }, - "TEST_REQUIRES" => { - "File::Spec" => 0, - "IO::Handle" => 0, - "IPC::Open3" => 0, - "Test::More" => "0.98" - }, - "VERSION" => "1.001_029", - "test" => { - "TESTS" => "t/*.t" - } -); - - -my %FallbackPrereqs = ( - "Class::Accessor::Grouped" => "0.1001", - "Config::Any" => "0.23", - "DBIx::Class" => "0.08102", - "DBIx::Class::InflateColumn::FS" => "0.01007", - "DBIx::Class::Schema::Loader" => "0.07035", - "Data::Dump::Streamer" => "2.05", - "Data::Visitor" => "0.3", - "DateTime" => "1.03", - "DateTime::Format::MySQL" => 0, - "DateTime::Format::Pg" => 0, - "DateTime::Format::SQLite" => "0.1", - "Devel::Confess" => 0, - "ExtUtils::MakeMaker" => "6.59", - "File::Copy::Recursive" => "0.38", - "File::Spec" => 0, - "Hash::Merge" => "0.1", - "IO::All" => "0.85", - "IO::Handle" => 0, - "IPC::Open3" => 0, - "JSON::Syck" => "1.27", - "MIME::Base64" => 0, - "Path::Class" => "0.32", - "Scalar::Util" => "1.27", - "Test::Compile::Internal" => 0, - "Test::More" => "0.98" -); - - -unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { - delete $WriteMakefileArgs{TEST_REQUIRES}; - delete $WriteMakefileArgs{BUILD_REQUIRES}; - $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; -} - -delete $WriteMakefileArgs{CONFIGURE_REQUIRES} - unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; - -WriteMakefile(%WriteMakefileArgs); - - - From b1a3651e10bbffa6be6a19530c26bd20a7c7f942 Mon Sep 17 00:00:00 2001 From: Bas Bloemsaat Date: Sun, 1 Mar 2015 22:23:23 +0100 Subject: [PATCH 5/5] typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e2e6e7d..66f879d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: install: - cpanm --no-skip-satisfied -n Class::Method::Modifiers YAML::XS - - cpanm -n Dist:Zilla DBD::mysql DBD::Pg + - cpanm -n Dist::Zilla DBD::mysql DBD::Pg - dzil authordeps --missing | cpanm --no-skip-satisfied -n || { cat ~/.cpanm/build.log ; false ; } - dzil listdeps --author --missing | cpanm --no-skip-satisfied -n || { cat ~/.cpanm/build.log ; false ; }