Get NCIP configuration directory from the environment.
authorJason Stephenson <jason@sigio.com>
Sun, 26 Oct 2014 17:21:06 +0000 (13:21 -0400)
committerJason Stephenson <jason@sigio.com>
Sun, 26 Oct 2014 17:21:06 +0000 (13:21 -0400)
Signed-off-by: Jason Stephenson <jason@sigio.com>
lib/NCIP/Dancing.pm

index f42fe8e..108daaa 100644 (file)
@@ -5,9 +5,11 @@ our $VERSION = '0.1';
 
 use NCIP;
 
+my $conf_dir = $ENV{'NCIP_CONFIG_DIR'} || 't/config_sample';
+
 any [ 'get', 'post' ] => '/' => sub {
     content_type 'application/xml';
-    my $ncip = NCIP->new('t/config_sample');
+    my $ncip = NCIP->new($conf_dir);
     my $xml  = param 'xml';
     if ( request->is_post ) {
         $xml = request->body;