[Jifty-commit] r1966 - in jifty/trunk: . t/Config t/Config/doc t/Config/etc t/Config/lib t/Config/lib/Config t/Config/lib/Config/Action t/Config/lib/Config/Model t/Config/share t/Config/share/po t/Config/share/web t/Config/share/web/static t/Config/share/web/templates t/Config/t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Sep 15 17:18:41 EDT 2006


Author: jesse
Date: Fri Sep 15 17:18:40 2006
New Revision: 1966

Added:
   jifty/trunk/t/Config/
   jifty/trunk/t/Config/Makefile.PL
   jifty/trunk/t/Config/bin/
   jifty/trunk/t/Config/bin/jifty   (contents, props changed)
   jifty/trunk/t/Config/doc/
   jifty/trunk/t/Config/etc/
   jifty/trunk/t/Config/etc/config.yml
   jifty/trunk/t/Config/etc/site_config.yml
   jifty/trunk/t/Config/lib/
   jifty/trunk/t/Config/lib/Config/
   jifty/trunk/t/Config/lib/Config/Action/
   jifty/trunk/t/Config/lib/Config/Model/
   jifty/trunk/t/Config/share/
   jifty/trunk/t/Config/share/po/
   jifty/trunk/t/Config/share/web/
   jifty/trunk/t/Config/share/web/static/
   jifty/trunk/t/Config/share/web/templates/
   jifty/trunk/t/Config/t/
   jifty/trunk/t/Config/t/00-prototype.t   (contents, props changed)
   jifty/trunk/t/Config/t/01-config.t   (contents, props changed)
   jifty/trunk/t/Config/t/mailbox
Modified:
   jifty/trunk/   (props changed)

Log:
 r27506 at pinglin:  jesse | 2006-09-15 20:06:06 +0100
 * A test app for configuration file issues.
 


Added: jifty/trunk/t/Config/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/t/Config/Makefile.PL	Fri Sep 15 17:18:40 2006
@@ -0,0 +1,6 @@
+use inc::Module::Install;
+name('Config');
+version('0.01');
+requires('Jifty' => '0.60912');
+
+WriteAll;

Added: jifty/trunk/t/Config/bin/jifty
==============================================================================
--- (empty file)
+++ jifty/trunk/t/Config/bin/jifty	Fri Sep 15 17:18:40 2006
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use File::Basename qw(dirname); 
+use UNIVERSAL::require;
+
+BEGIN {
+    Jifty::Util->require or die $UNIVERSAL::require::ERROR;
+    my $root = Jifty::Util->app_root;
+    unshift @INC, "$root/lib" if ($root);
+}
+
+use Jifty::Script;
+$SIG{INT} = $SIG{TERM} = sub { warn "Stopped\n"; exit; };
+Jifty::Script->dispatch();

Added: jifty/trunk/t/Config/etc/config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/t/Config/etc/config.yml	Fri Sep 15 17:18:40 2006
@@ -0,0 +1,36 @@
+--- 
+framework: 
+  AdminMode: 1
+  ApplicationClass: Config
+  ApplicationName: Config
+  Database: 
+    Database: config
+    Driver: SQLite
+    Host: localhost
+    Password: ''
+    RecordBaseClass: Jifty::DBI::Record::Cachable
+    User: ''
+    Version: 0.0.1
+  DevelMode: 1
+  L10N: 
+    PoDir: share/po
+  LogLevel: INFO
+  Mailer: Sendmail
+  MailerArgs: []
+
+  Plugins: []
+
+  Web: 
+    BaseURL: http://localhost
+    DataDir: var/mason
+    Globals: []
+
+    MasonConfig: 
+      autoflush: 0
+      default_escape_flags: h
+      error_format: text
+      error_mode: fatal
+    Port: 8888
+    ServeStaticFiles: 1
+    StaticRoot: share/web/static
+    TemplateRoot: share/web/templates

Added: jifty/trunk/t/Config/etc/site_config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/t/Config/etc/site_config.yml	Fri Sep 15 17:18:40 2006
@@ -0,0 +1,4 @@
+--- 
+framework: 
+  Database: 
+    Driver: Pg

Added: jifty/trunk/t/Config/t/00-prototype.t
==============================================================================
--- (empty file)
+++ jifty/trunk/t/Config/t/00-prototype.t	Fri Sep 15 17:18:40 2006
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+=head1 DESCRIPTION
+
+This is a template for your own tests. Copy it and modify it.
+
+=cut
+
+use Jifty::Test tests => 2;
+
+ok(1, "Loaded the test script");
+
+my $server = Jifty::Test->make_server;
+my $URL = $server->started_ok;
+
+
+1;
+

Added: jifty/trunk/t/Config/t/01-config.t
==============================================================================
--- (empty file)
+++ jifty/trunk/t/Config/t/01-config.t	Fri Sep 15 17:18:40 2006
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+=head1 DESCRIPTION
+
+This is a template for your own tests. Copy it and modify it.
+
+=cut
+
+use Jifty::Test tests => 2;
+
+use_ok('Jifty');
+
+Jifty->new(no_handle => 1);
+
+is(Jifty->config->framework('Database')->{'Driver'}, 'Pg', "We set the driver to what's in the site config file");
+
+
+1;
+

Added: jifty/trunk/t/Config/t/mailbox
==============================================================================


More information about the Jifty-commit mailing list