Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 43ffb2d31934f2f6d529bb47c10ebe2f0b58e03f @tadzik committed Sep 23, 2010
7 README
@@ -0,0 +1,7 @@
+What's in here:
+emmentaler/ -- a Dancer app showing the test results
+sergenerator.pl -- a Perl 5 script turning smoker.pl output into html templates for the Dancer app
+cronjob -- a plaintext file with a cronjob performing tests
+
+Dependencies:
+neutro
@@ -0,0 +1 @@
+1 0 * * * smoker.pl | perl sergenerator.pl > $(echo ~/emmentaler/views/`date +"%d-%m-%y"`.tt)
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'emmentaler',
+ AUTHOR => q{YOUR NAME <youremail@example.com>},
+ VERSION_FROM => 'lib/emmentaler.pm',
+ ABSTRACT => 'YOUR APPLICATION ABSTRACT',
+ ($ExtUtils::MakeMaker::VERSION >= 6.3002
+ ? ('LICENSE'=> 'perl')
+ : ()),
+ PL_FILES => {},
+ PREREQ_PM => {
+ 'Test::More' => 0,
+ 'YAML' => 0,
+ 'Dancer' => 1.1812,
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'emmentaler-*' },
+);
@@ -0,0 +1,4 @@
+layout: "main"
+logger: "file"
+appname: "emmentaler"
+
@@ -0,0 +1,5 @@
+#!/usr/bin/env perl
+use Dancer;
+use lib path(dirname(__FILE__), 'lib');
+load_app 'emmentaler';
+dance;
@@ -0,0 +1,8 @@
+log: "core"
+warnings: 1
+show_errors: 1
+
+# auto_reload is a development feature
+# you should enable it by yourself if you want it
+# Module::Refresh is needed
+auto_reload: 0
@@ -0,0 +1,7 @@
+log: "warning"
+warnings: 0
+show_errors: 0
+route_cache: 1
+# never enable auto_reload in production
+auto_reload: 0
+
@@ -0,0 +1,20 @@
+package emmentaler;
+use Dancer ':syntax';
+use POSIX 'strftime';
+
+our $VERSION = '0.1';
+
+get '/' => sub {
+ my $date = strftime "%d-%m-%y", localtime;
+ template "$date.tt"
+};
+
+get '/:date' => sub {
+ if (-e 'views/' . params->{date} . '.tt') {
+ return template params->{date} . '.tt'
+ } else {
+ return "No test results for " . params->{date}
+ }
+};
+
+true;

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+<title>Error 404</title>
+<link rel="stylesheet" href="/css/error.css" />
+<meta charset=UTF-8" />
+</head>
+<body>
+<h1>Error 404</h1>
+<div id="content">
+<h2>Page Not Found</h2><p>Sorry, this is the void.</p>
+</div>
+<footer>
+Powered by <a href="http://perldancer.org/">Dancer</a> 1.1812
+</footer>
+</body>
+</html>
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+<title>Error 500</title>
+<link rel="stylesheet" href="/css/error.css" />
+<meta charset=UTF-8" />
+</head>
+<body>
+<h1>Error 500</h1>
+<div id="content">
+<h2>Internal Server Error</h2><p>Wooops, something went wrong</p>
+</div>
+<footer>
+Powered by <a href="http://perldancer.org/">Dancer</a> 1.1812
+</footer>
+</body>
+</html>
@@ -0,0 +1,70 @@
+body {
+ font-family: Lucida,sans-serif;
+}
+
+h1 {
+ color: #AA0000;
+ border-bottom: 1px solid #444;
+}
+
+h2 { color: #444; }
+
+pre {
+ font-family: "lucida console","monaco","andale mono","bitstream vera sans mono","consolas",monospace;
+ font-size: 12px;
+ border-left: 2px solid #777;
+ padding-left: 1em;
+}
+
+footer {
+ font-size: 10px;
+}
+
+span.key {
+ color: #449;
+ font-weight: bold;
+ width: 120px;
+ display: inline;
+}
+
+span.value {
+ color: #494;
+}
+
+/* these are for the message boxes */
+
+pre.content {
+ background-color: #eee;
+ color: #000;
+ padding: 1em;
+ margin: 0;
+ border: 1px solid #aaa;
+ border-top: 0;
+ margin-bottom: 1em;
+}
+
+div.title {
+ font-family: "lucida console","monaco","andale mono","bitstream vera sans mono","consolas",monospace;
+ font-size: 12px;
+ background-color: #aaa;
+ color: #444;
+ font-weight: bold;
+ padding: 3px;
+ padding-left: 10px;
+}
+
+pre.content span.nu {
+ color: #889;
+ margin-right: 10px;
+}
+
+pre.error {
+ background: #334;
+ color: #ccd;
+ padding: 1em;
+ border-top: 1px solid #000;
+ border-left: 1px solid #000;
+ border-right: 1px solid #eee;
+ border-bottom: 1px solid #eee;
+}
+
@@ -0,0 +1,34 @@
+body {
+ font-family: Lucida,sans-serif;
+ color: #eee;
+ background-color: #D8C358;
+}
+
+#content {
+ color: #25271E;
+ background-color: #eee;
+ padding: 1em;
+ margin: 1em;
+ padding-top: 0.5em;
+}
+
+a {
+ color: #6D0839;
+}
+
+h1,h3 {
+ color: #6D0839;
+}
+
+footer {
+ border-top: 1px solid #6D0839;
+ margin-top: 2em;
+ padding-top: 1em;
+ font-size: 10px;
+ color: #6D0839;
+}
+
+pre {
+ font-family: \"lucida console\",\"monaco\",\"andale mono\",\"bitstream vera sans mono\",\"consolas\",monospace;
+}
+
@@ -0,0 +1,5 @@
+#!/usr/bin/env perl
+use Plack::Runner;
+use Dancer ':syntax';
+my $psgi = path(dirname(__FILE__), '..', 'emmentaler.pl');
+Plack::Runner->run($psgi);
@@ -0,0 +1,8 @@
+#!/usr/bin/env perl
+use Plack::Handler::FCGI;
+use Dancer ':syntax';
+
+my $psgi = path(dirname(__FILE__), '..', 'emmentaler.pl');
+my $app = do($psgi);
+my $server = Plack::Handler::FCGI->new(nproc => 5, detach => 1);
+$server->run($app);
Binary file not shown.
@@ -0,0 +1,5 @@
+use Test::More tests => 1;
+use strict;
+use warnings;
+
+use_ok 'emmentaler';
@@ -0,0 +1,12 @@
+use Test::More tests => 3;
+use strict;
+use warnings;
+
+# the order is important
+use emmentaler;
+use Dancer::Test;
+
+route_exists [GET => '/'], 'a route handler is defined for /';
+response_status_is ['GET' => '/'], 200, 'response status is 200 for /';
+response_content_like [GET => '/'], qr/It Works.*I'm in.*index.tt/s,
+ 'content looks OK for /';
@@ -0,0 +1,84 @@
+<table border=1>
+ <tr>
+ <th>Module</th>
+ <th>Test results</th>
+ </tr>
+<tr><td>ABC</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>Algorithm-Viterbi</td><td bgcolor='green'>ok</td></tr>
+<tr><td>Bennu</td><td bgcolor='yellow'>installing failed</td></tr>
+<tr><td>CGI-Application</td><td bgcolor='green'>ok</td></tr>
+<tr><td>DBDI</td><td bgcolor='yellow'>dependencies not in module ecosystem</td></tr>
+<tr><td>DateTime-Parse</td><td bgcolor='green'>ok</td></tr>
+<tr><td>Digest-sum</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>HashConfig</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>List-Utils</td><td bgcolor='green'>ok</td></tr>
+<tr><td>Math-Model</td><td bgcolor='yellow'>unable to install dependencies</td></tr>
+<tr><td>Math-Polynomial</td><td bgcolor='green'>ok</td></tr>
+<tr><td>Math-RungeKutta</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>Math-Vector</td><td bgcolor='green'>ok</td></tr>
+<tr><td>MiniDBI</td><td bgcolor='green'>ok</td></tr>
+<tr><td>Nonogram</td><td bgcolor='green'>ok</td></tr>
+<tr><td>Perl6-MIME-Base64</td><td bgcolor='green'>ok</td></tr>
+<tr><td>Perl6-Term--ANSIColor</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>SCGI</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>SQL-Grammar</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>Tree</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>Vector</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>WebRequest</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>XML-OPML</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>benchmark</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>bioperl6</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>csv</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>druid</td><td bgcolor='yellow'>dependencies not in module ecosystem</td></tr>
+<tr><td>exemel</td><td bgcolor='green'>ok</td></tr>
+<tr><td>faz</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>flower</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>form</td><td bgcolor='green'>ok</td></tr>
+<tr><td>gamebase</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>gge</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>grampa</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>hash-has</td><td bgcolor='green'>ok</td></tr>
+<tr><td>html-template</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>http-server-simple</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>io-prompt</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>json</td><td bgcolor='green'>ok</td></tr>
+<tr><td>link-c</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>lolsql</td><td bgcolor='green'>ok</td></tr>
+<tr><td>mandelbrot</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>messagepack-pm6</td><td bgcolor='yellow'>installing failed</td></tr>
+<tr><td>neutro</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>november</td><td bgcolor='yellow'>unable to install dependencies</td></tr>
+<tr><td>perl6-Acme-Meow</td><td bgcolor='green'>ok</td></tr>
+<tr><td>perl6-Config-INI</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>perl6-File-Tools</td><td bgcolor='green'>ok</td></tr>
+<tr><td>perl6-Module-Starter</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>perl6-Module-Tools</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>perl6-Term-ANSIColor</td><td bgcolor='green'>ok</td></tr>
+<tr><td>perl6-digest-md5</td><td bgcolor='green'>ok</td></tr>
+<tr><td>perl6-examples</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>perl6-literate</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>perl6-lwp-simple</td><td bgcolor='green'>ok</td></tr>
+<tr><td>perl6-puppet-parser</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>perl6-sqlite</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>perl6-string-crc32</td><td bgcolor='green'>ok</td></tr>
+<tr><td>perlite6</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>ppm</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>proto</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>pun</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>statistics-lite</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>svg</td><td bgcolor='green'>ok</td></tr>
+<tr><td>svg-plot</td><td bgcolor='green'>ok</td></tr>
+<tr><td>tardis</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>temporal-utils</td><td bgcolor='green'>ok</td></tr>
+<tr><td>test-mock</td><td bgcolor='green'>ok</td></tr>
+<tr><td>testml-pm6</td><td bgcolor='red'>tests failed</td></tr>
+<tr><td>ufo</td><td bgcolor='yellow'>no tests available</td></tr>
+<tr><td>uri</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>web</td><td bgcolor='yellow'>dependencies not in module ecosystem</td></tr>
+<tr><td>xml</td><td bgcolor='red'>building failed</td></tr>
+<tr><td>xml-writer</td><td bgcolor='green'>ok</td></tr>
+<tr><td>yaml-pm6</td><td bgcolor='yellow'>unable to install dependencies</td></tr>
+<tr><td>yapsi</td><td bgcolor='green'>ok</td></tr>
+<tr><td>yarn</td><td bgcolor='yellow'>dependencies not in module ecosystem</td></tr>
+<tr><td>zavolaj</td><td bgcolor='yellow'>no tests available</td></tr>
+</table>
Oops, something went wrong.

0 comments on commit 43ffb2d

Please sign in to comment.