r41941 - in /branches/upstream/libtest-tempdir-perl/current: .gitignore Changes MANIFEST MANIFEST.SKIP META.yml Makefile.PL README SIGNATURE lib/Test/TempDir.pm lib/Test/TempDir/Factory.pm lib/Test/TempDir/Handle.pm t/factory.t

iulian-guest at users.alioth.debian.org iulian-guest at users.alioth.debian.org
Sun Aug 16 08:48:12 UTC 2009


Author: iulian-guest
Date: Sun Aug 16 08:48:05 2009
New Revision: 41941

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41941
Log:
[svn-upgrade] Integrating new upstream version, libtest-tempdir-perl (0.05)

Added:
    branches/upstream/libtest-tempdir-perl/current/.gitignore
    branches/upstream/libtest-tempdir-perl/current/Changes
    branches/upstream/libtest-tempdir-perl/current/README
Modified:
    branches/upstream/libtest-tempdir-perl/current/MANIFEST
    branches/upstream/libtest-tempdir-perl/current/MANIFEST.SKIP
    branches/upstream/libtest-tempdir-perl/current/META.yml
    branches/upstream/libtest-tempdir-perl/current/Makefile.PL
    branches/upstream/libtest-tempdir-perl/current/SIGNATURE
    branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir.pm
    branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Factory.pm
    branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Handle.pm
    branches/upstream/libtest-tempdir-perl/current/t/factory.t

Added: branches/upstream/libtest-tempdir-perl/current/.gitignore
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/.gitignore?rev=41941&op=file
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/.gitignore (added)
+++ branches/upstream/libtest-tempdir-perl/current/.gitignore Sun Aug 16 08:48:05 2009
@@ -1,0 +1,15 @@
+.*
+!.gitignore
+Makefile*
+!Makefile.PL
+META.yml
+blib
+build
+inc
+pm_to_blib
+MANIFEST*
+!MANIFEST.SKIP
+Debian*
+README
+Test-TempDir-*
+*.bs

Added: branches/upstream/libtest-tempdir-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/Changes?rev=41941&op=file
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/Changes (added)
+++ branches/upstream/libtest-tempdir-perl/current/Changes Sun Aug 16 08:48:05 2009
@@ -1,0 +1,5 @@
+0.05  Tue, 11 Aug 2009 01:57:18 +0200
+  * Look! A changelog! This wasn't too hard, was it? :-)
+  * Allow setting the default for Test::TempDir::Factory's use_subdir using the
+    environment variable TEST_TEMPDIR_USE_SUBDIR.
+  * Depend on a Moose version where delegations to class names work.

Modified: branches/upstream/libtest-tempdir-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/MANIFEST?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/MANIFEST (original)
+++ branches/upstream/libtest-tempdir-perl/current/MANIFEST Sun Aug 16 08:48:05 2009
@@ -1,9 +1,12 @@
+.gitignore
+Changes
 lib/Test/TempDir.pm
 lib/Test/TempDir/Factory.pm
 lib/Test/TempDir/Handle.pm
 Makefile.PL
 MANIFEST			This list of files
 MANIFEST.SKIP
+README
 t/00_load.t
 t/basic.t
 t/factory.t

Modified: branches/upstream/libtest-tempdir-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/MANIFEST.SKIP?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/MANIFEST.SKIP (original)
+++ branches/upstream/libtest-tempdir-perl/current/MANIFEST.SKIP Sun Aug 16 08:48:05 2009
@@ -5,6 +5,7 @@
 ,v$
 \B\.svn\b
 \b_darcs\b
+\B\.git\b
 
 # Avoid Makemaker generated and utility files.
 \bMANIFEST\.bak

Modified: branches/upstream/libtest-tempdir-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/META.yml?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/META.yml (original)
+++ branches/upstream/libtest-tempdir-perl/current/META.yml Sun Aug 16 08:48:05 2009
@@ -1,22 +1,30 @@
 --- #YAML:1.0
-name:                Test-TempDir
-version:             0.04
-abstract:            ~
-license:             ~
-author:              ~
-generated_by:        ExtUtils::MakeMaker version 6.44
-distribution_type:   module
-requires:     
-    File::NFSLock:                 0
-    File::Path:                    2.04
-    File::Spec:                    0
-    File::Temp:                    0
-    Moose:                         0.50
-    MooseX::Types::Path::Class:    0
-    namespace::clean:              0.08
-    Path::Class:                   0
-    Sub::Exporter:                 0
-    Test::use::ok:                 0
+name:               Test-TempDir
+version:            0.05
+abstract:           ~
+author:  []
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    File::NFSLock:        0
+    File::Path:           2.04
+    File::Spec:           0
+    File::Temp:           0
+    Moose:                0.87
+    MooseX::Types::Path::Class:  0
+    namespace::clean:     0.08
+    Path::Class:          0
+    Sub::Exporter:        0
+    Test::use::ok:        0
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
-    version: 1.3
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/libtest-tempdir-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/Makefile.PL?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/Makefile.PL (original)
+++ branches/upstream/libtest-tempdir-perl/current/Makefile.PL Sun Aug 16 08:48:05 2009
@@ -16,7 +16,7 @@
 		'File::Spec' => 0,
 		'File::Temp' => 0,
 		'File::NFSLock' => 0,
-		'Moose' => '0.50',
+		'Moose' => '0.87',
 		'MooseX::Types::Path::Class' => 0,
 		'Path::Class' => 0,
 		'Sub::Exporter' => 0,

Added: branches/upstream/libtest-tempdir-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/README?rev=41941&op=file
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/README (added)
+++ branches/upstream/libtest-tempdir-perl/current/README Sun Aug 16 08:48:05 2009
@@ -1,0 +1,66 @@
+NAME
+    Test::TempDir - Temporary files support for testing.
+
+SYNOPSIS
+            use Test::TempDir;
+
+            my $test_tempdir = temp_root();
+
+            my ( $fh, $file ) = tempfile();
+
+            my $directory_scratch_obj = scratch();
+
+DESCRIPTION
+    Test::TempDir provides temporary directory creation with testing in
+    mind.
+
+    The differences between using this and using File::Temp are:
+
+    *   If "t/tmp" is available (writable, creatable, etc) it's preferred
+        over $ENV{TMPDIR} etc. Otherwise a temporary directory will be used.
+
+        This is "temp_root"
+
+    *   Lockfiles are used on "t/tmp", to prevent race conditions when
+        running under a parallel test harness.
+
+    *   The "temp_root" is cleaned at the end of a test run, but not if
+        tests failed.
+
+    *   "temp_root" is emptied at the begining of a test run
+        unconditionally.
+
+    *   The default policy is not to clean the individual "tempfiles" and
+        "tempdirs" within "temp_root", in order to aid in debugging of
+        failed tests.
+
+EXPORTS
+    temp_root
+        The root of the temporary stuff.
+
+    tempfile
+    tempdir
+        Wrappers for the File::Temp functions of the same name.
+
+        The default options are changed to use "temp_root" for "DIR" and
+        disable "CLEANUP", but these are overridable.
+
+    scrach
+        Loads Directory::Scratch and instantiates a new one, with the same
+        default options as "tempfile" and "tempdir".
+
+SEE ALSO
+    File::Temp, Directory::Scratch, Path::Class
+
+VERSION CONTROL
+    This module is maintained using Git. You can get the latest version from
+    <git://github.com/nothingmuch/test-tempdir.git>.
+
+AUTHOR
+    Yuval Kogman <nothingmuch at woobling.org>
+
+COPYRIGHT
+            Copyright (c) 2008 Yuval Kogman. All rights reserved
+            This program is free software; you can redistribute
+            it and/or modify it under the same terms as Perl itself.
+

Modified: branches/upstream/libtest-tempdir-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/SIGNATURE?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/SIGNATURE (original)
+++ branches/upstream/libtest-tempdir-perl/current/SIGNATURE Sun Aug 16 08:48:05 2009
@@ -14,21 +14,24 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 90f6402727c73a12b7a388630b09ad9321ab24aa MANIFEST
-SHA1 e8482690dad0ff3aaa335aa5b8b650851e504871 MANIFEST.SKIP
-SHA1 aea50868f304f01fc026858b933a10b1ac1c4891 META.yml
-SHA1 48bed2739dd21bd2554286785d82ffc1442aaac5 Makefile.PL
-SHA1 a37ac9d4051933d91884df5123993c228fc7b755 lib/Test/TempDir.pm
-SHA1 4b4ec4bfce5a9f4e5226116871fdf10a0ac27c0e lib/Test/TempDir/Factory.pm
-SHA1 39b5ff35cc6c90f61f280c418c096514f7ca8274 lib/Test/TempDir/Handle.pm
+SHA1 2c810917d24f3ed11b2cc4f324569ad698a6a7fa .gitignore
+SHA1 7f493931150a9687c32f1ac1bab0c03dbd83faeb Changes
+SHA1 fcdb634fa9717bffe95e404c1381d8b33bc22489 MANIFEST
+SHA1 dd1d84cda990b3f7c4ad0a1ed7690d3bff2eaefd MANIFEST.SKIP
+SHA1 99464dccbce43aa22d2f4fbcc15aff1e30ef6977 META.yml
+SHA1 baa9bfd1156e6a17fe23e39449189988d3f04bff Makefile.PL
+SHA1 89f47a4a1b188d75ad74df03289176e47227e8fc README
+SHA1 61d3e1c865346ca1f6a5c360ca47e8ff60586dc0 lib/Test/TempDir.pm
+SHA1 efbb432305df2de949d9dfb74cc40eabbca21938 lib/Test/TempDir/Factory.pm
+SHA1 ee78337e66c190e8c115c614409433ca22b9dcc5 lib/Test/TempDir/Handle.pm
 SHA1 309b503ae2fb188d6329a99c77fff1f26f5130af t/00_load.t
 SHA1 ff5768d09781f96bad90ac0d9b204434593d3d2b t/basic.t
-SHA1 fec74f380524777572ea4412c42c90d4e619ed42 t/factory.t
+SHA1 30f6c4626ebdd4c2dd34ec5cb43423256574bae0 t/factory.t
 SHA1 e944e3373485fec1418c0ac616aab11904b5bff5 t/handle.t
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.7 (Darwin)
+Version: GnuPG v1.4.9 (GNU/Linux)
 
-iD8DBQFIaeMmVCwRwOvSdBgRAoeHAJ4ki/tBaFR58fMJTZim1LBka5bc9ACeJidT
-MWBUsOUnDn8GtuiguoEYPmA=
-=HQFq
+iEYEARECAAYFAkqAtWwACgkQdC8qQo5jWl7NCQCgiS6pfaKnpcw6UGixH51Gk2l8
+hfIAn2MR58VjH39Qb7kJEIFz0PVYtAWp
+=zXq4
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir.pm?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir.pm (original)
+++ branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir.pm Sun Aug 16 08:48:05 2009
@@ -5,7 +5,7 @@
 use strict;
 use warnings;
 
-our $VERSION = "0.04";
+our $VERSION = "0.05";
 
 use File::Temp ();
 
@@ -131,9 +131,8 @@
 
 =head1 VERSION CONTROL
 
-This module is maintained using Darcs. You can get the latest version from
-L<http://nothingmuch.woobling.org/code>, and use C<darcs send> to commit
-changes.
+This module is maintained using Git. You can get the latest version from
+L<git://github.com/nothingmuch/test-tempdir.git>.
 
 =head1 AUTHOR
 

Modified: branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Factory.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Factory.pm?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Factory.pm (original)
+++ branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Factory.pm Sun Aug 16 08:48:05 2009
@@ -61,7 +61,7 @@
 has use_subdir => (
 	isa => "Bool",
 	is  => "rw",
-	default => 1,
+	default => sub { $ENV{TEST_TEMPDIR_USE_SUBDIR} ? 1 : 0 },
 );
 
 has subdir_template => (

Modified: branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Handle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Handle.pm?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Handle.pm (original)
+++ branches/upstream/libtest-tempdir-perl/current/lib/Test/TempDir/Handle.pm Sun Aug 16 08:48:05 2009
@@ -54,6 +54,7 @@
 	my $self = shift;
 	return unless -d $self->dir;
 	$self->rmtree({ keep_root => 0 });
+	$self->dir->parent->remove; # rmdir, safe, and we don't care about errors
 }
 
 sub release_lock {

Modified: branches/upstream/libtest-tempdir-perl/current/t/factory.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-tempdir-perl/current/t/factory.t?rev=41941&op=diff
==============================================================================
--- branches/upstream/libtest-tempdir-perl/current/t/factory.t (original)
+++ branches/upstream/libtest-tempdir-perl/current/t/factory.t Sun Aug 16 08:48:05 2009
@@ -22,75 +22,75 @@
 
 use ok 'Test::TempDir::Factory';
 
-delete @ENV{qw(TEST_TEMPDIR TEST_TMPDIR TEST_TEMPDIR_CLEANUP)};
+delete @ENV{qw(TEST_TEMPDIR TEST_TMPDIR TEST_TEMPDIR_CLEANUP TEST_TEMPDIR_USE_SUBDIR)};
 
-my $f = Test::TempDir::Factory->new;
+foreach my $use_subdir ( 1, 0 ) {
+	my $f = Test::TempDir::Factory->new( use_subdir => $use_subdir );
 
-isa_ok( $f, "Test::TempDir::Factory" );
+	isa_ok( $f, "Test::TempDir::Factory" );
 
-is( $f->dir_name, dir("tmp"), "default dir_name" );
-is( $f->t_dir, dir("t"), "default t_dir" );
+	is( $f->dir_name, dir("tmp"), "default dir_name" );
+	is( $f->t_dir, dir("t"), "default t_dir" );
 
-$f->t_dir($tmp);
+	$f->t_dir($tmp);
 
-my $subdir = $tmp->subdir($f->dir_name);
+	my $subdir = $tmp->subdir($f->dir_name);
 
-is( $f->base_path, $subdir, "base path" );
+	is( $f->base_path, $subdir, "base path" );
 
-ok( not(-d $f->base_path), "base path doesn't exist yet" );
+	ok( not(-d $f->base_path), "base path doesn't exist yet" );
 
-ok( $f->use_subdir, "subdirs enabled" );
+	my ( $path, $lock ) = $f->create_and_lock($f->base_path);
 
-my ( $path, $lock ) = $f->create_and_lock($f->base_path);
+	isa_ok( $path, "Path::Class::Dir" );
 
-isa_ok( $path, "Path::Class::Dir" );
+	ok( $subdir->contains($path), "preferred path used" );
 
-ok( $subdir->contains($path), "preferred path used" );
+	ok( -d $path, "created" );
 
-ok( -d $path, "created" );
+	isa_ok( $lock, "File::NFSLock", "lock" );
 
-isa_ok( $lock, "File::NFSLock", "lock" );
+	my ( $fallback_path, $fallback_lock ) = $f->create_and_lock_fallback($f->base_path);
 
-my ( $fallback_path, $fallback_lock ) = $f->create_and_lock_fallback($f->base_path);
+	isa_ok( $fallback_path, "Path::Class::Dir" );
 
-isa_ok( $fallback_path, "Path::Class::Dir" );
+	isnt( $fallback_path, $path, "fallback path is different" );
 
-isnt( $fallback_path, $path, "fallback path is different" );
+	isa_ok( $fallback_lock, "File::NFSLock" );
 
-isa_ok( $fallback_lock, "File::NFSLock" );
+	{
+		$f->lock(0);
 
-{
-	$f->lock(0);
+		my ( $new_fb ) = $f->create_and_lock_fallback($f->base_path);
 
-	my ( $new_fb ) = $f->create_and_lock_fallback($f->base_path);
+		isnt( $new_fb, $path, "second fallback is different from base path" );
+		isnt( $new_fb, $fallback_path, "and from first fallback path" );
 
-	isnt( $new_fb, $path, "second fallback is different from base path" );
-	isnt( $new_fb, $fallback_path, "and from first fallback path" );
-
-	rmdir $new_fb;
-}
+		rmdir $new_fb;
+	}
 
 
-$f->lock(1);
+	$f->lock(1);
 
-isa_ok( my $dir = $f->create, "Test::TempDir::Handle" );
+	isa_ok( my $dir = $f->create, "Test::TempDir::Handle" );
 
-isa_ok( $dir->dir, "Path::Class::Dir" );
+	isa_ok( $dir->dir, "Path::Class::Dir" );
 
-ok( $subdir->contains( $dir->dir ), "created in the right place" );
+	ok( $subdir->contains( $dir->dir ), "created in the right place" );
 
-isa_ok( $dir->lock, "File::NFSLock" );
+	isa_ok( $dir->lock, "File::NFSLock" );
 
-SKIP: {
-	my $lockfile = $dir->lock->{lock_file} or skip "no lockfile", 2;
+	SKIP: {
+		my $lockfile = $dir->lock->{lock_file} or skip "no lockfile", 2;
 
-	ok( -f $lockfile, "lockfile exists" );
+		ok( -f $lockfile, "lockfile exists" );
 
-	$dir->empty;
+		$dir->empty;
 
-	ok( -f $lockfile, "lockfile exists after ->empty" );
+		ok( -f $lockfile, "lockfile exists after ->empty" );
+	}
+
+	rmdir $fallback_path;
+
+	$f->base_path->rmtree({ keep_root => 0 });
 }
-
-rmdir $fallback_path;
-
-




More information about the Pkg-perl-cvs-commits mailing list