[Catalyst-commits] r6927 - in trunk/Config-Any-Remote: . lib/Config/Any t t/conf

jshirley at dev.catalyst.perl.org jshirley at dev.catalyst.perl.org
Thu Sep 20 19:42:46 GMT 2007


Author: jshirley
Date: 2007-09-20 19:42:45 +0100 (Thu, 20 Sep 2007)
New Revision: 6927

Added:
   trunk/Config-Any-Remote/t/conf/
   trunk/Config-Any-Remote/t/conf/test1.yml
   trunk/Config-Any-Remote/t/conf/test2.conf
Modified:
   trunk/Config-Any-Remote/Changes
   trunk/Config-Any-Remote/README
   trunk/Config-Any-Remote/lib/Config/Any/Remote.pm
   trunk/Config-Any-Remote/t/basic.t
Log:
Minor fixes, test case does something now.

Modified: trunk/Config-Any-Remote/Changes
===================================================================
--- trunk/Config-Any-Remote/Changes	2007-09-20 18:34:04 UTC (rev 6926)
+++ trunk/Config-Any-Remote/Changes	2007-09-20 18:42:45 UTC (rev 6927)
@@ -1,5 +1,5 @@
 Revision history for Config-Any-Remote
 
-0.01    Date/time
-        First version, released on an unsuspecting world.
+0.01    2007-09-20
+        First version, basic support to load URIs through File::Fetch
 

Modified: trunk/Config-Any-Remote/README
===================================================================
--- trunk/Config-Any-Remote/README	2007-09-20 18:34:04 UTC (rev 6926)
+++ trunk/Config-Any-Remote/README	2007-09-20 18:42:45 UTC (rev 6927)
@@ -1,16 +1,5 @@
 Config-Any-Remote
 
-The README is used to introduce the module and provide instructions on
-how to install the module, any machine dependencies it may have (for
-example C compilers and installed libraries) and any other information
-that should be provided before the module is installed.
-
-A README file is required for CPAN modules since CPAN extracts the README
-file from a module distribution so that people browsing the archive
-can use it get an idea of the modules uses. It is usually a good idea
-to provide version information here so that people can decide whether
-fixes for the module are worth downloading.
-
 INSTALLATION
 
 To install this module, run the following commands:

Modified: trunk/Config-Any-Remote/lib/Config/Any/Remote.pm
===================================================================
--- trunk/Config-Any-Remote/lib/Config/Any/Remote.pm	2007-09-20 18:34:04 UTC (rev 6926)
+++ trunk/Config-Any-Remote/lib/Config/Any/Remote.pm	2007-09-20 18:42:45 UTC (rev 6927)
@@ -78,7 +78,12 @@
     $class->NEXT::load_files($args);
 }
 
-# Prevent deep recursion
+=head2 extensions
+
+This module has no extensions 
+
+=cut
+
 sub extensions { return; }
 
 =head1 AUTHOR

Modified: trunk/Config-Any-Remote/t/basic.t
===================================================================
--- trunk/Config-Any-Remote/t/basic.t	2007-09-20 18:34:04 UTC (rev 6926)
+++ trunk/Config-Any-Remote/t/basic.t	2007-09-20 18:42:45 UTC (rev 6927)
@@ -1,25 +1,25 @@
 use strict;
 use warnings;
 
-use Test::More tests => 10;
+use Test::More tests => 2;
 
+use FindBin;
 use URI;
 
 use Config::Any::Remote;
 
-my @files = qw{
-    http://localhost/~jshirley/test1.yml
-    http://localhost/~jshirley/test2.conf
-};
+my @files = (
+    URI->new("file://$FindBin::Bin/conf/test1.yml"),
+    URI->new("file://$FindBin::Bin/conf/test2.conf"),
+);
 
 use YAML::Syck;
 
 my $cfg = Config::Any::Remote->load_files({ use_ext => 1,
-    files => [ map { URI->new($_) } @files ] });
+    files => [ @files ] });
 
 my ( $filename, $config );
 
-
 ($filename, $config) = each %{ $cfg->[0] };
 like($filename, qr/test2.conf$/, 'got test2.conf');
 

Added: trunk/Config-Any-Remote/t/conf/test1.yml
===================================================================
--- trunk/Config-Any-Remote/t/conf/test1.yml	                        (rev 0)
+++ trunk/Config-Any-Remote/t/conf/test1.yml	2007-09-20 18:42:45 UTC (rev 6927)
@@ -0,0 +1,9 @@
+---
+name: Basic Test 1
+scalar: foo
+array:
+    - foo
+    - bar
+    - baz
+hash:
+    foo: bar

Added: trunk/Config-Any-Remote/t/conf/test2.conf
===================================================================
--- trunk/Config-Any-Remote/t/conf/test2.conf	                        (rev 0)
+++ trunk/Config-Any-Remote/t/conf/test2.conf	2007-09-20 18:42:45 UTC (rev 6927)
@@ -0,0 +1,3 @@
+<hello>
+    World 5
+</hello>




More information about the Catalyst-commits mailing list