Permalink
Browse files

Add list of files to copy into your own project to POD

Plus a test that checks that this list remains up to date
  • Loading branch information...
1 parent 9d6c1a8 commit 5999af99b44a563271afcacb6a86083dbe95a0f7 Max Maischein committed May 4, 2012
Showing with 75 additions and 22 deletions.
  1. +20 −22 MANIFEST
  2. +1 −0 MANIFEST.skip
  3. +24 −0 lib/Dancer/Layout/Bootstrap.pm
  4. +30 −0 t/01-template-list.t
View
@@ -2,33 +2,31 @@
bin/app.pl
config.yml
lib/Dancer/Layout/Bootstrap.pm
-logs/development.log
Makefile.PL
MANIFEST This list of files
MANIFEST.skip
MYMETA.json
MYMETA.yml
public/404.html
public/500.html
-public/css/bootstrap-responsive.css
-public/css/bootstrap.css
-public/css/bootstrap.min.css
-public/css/error.css
-public/css/style.css
-public/dispatch.cgi
-public/dispatch.fcgi
-public/favicon.ico
-public/images/glyphicons-halflings-white.png
-public/images/glyphicons-halflings.png
-public/images/perldancer-bg.jpg
-public/images/perldancer.jpg
-public/images/Thumbs.db
-public/javascripts/bootstrap-2.0.3/bootstrap-alert.js
-public/javascripts/bootstrap-2.0.3/bootstrap.js
-public/javascripts/bootstrap-2.0.3/bootstrap.min.js
-public/javascripts/jQuery/jquery-1.7.2.min.js
-public/javascripts/jQuery/jquery.ui.widget.js
+public/css/bootstrap-responsive.css Bootstrap 2.0.3
+public/css/bootstrap.css Bootstrap 2.0.3
+public/css/bootstrap.min.css Bootstrap 2.0.3
+public/css/error.css Dancer default
+public/css/style.css Dancer default
+public/dispatch.cgi Dancer default
+public/dispatch.fcgi Dancer default
+public/favicon.ico Dancer default
+public/images/glyphicons-halflings-white.png Glyphicons
+public/images/glyphicons-halflings.png Bootstrap 2.0.3
+public/images/perldancer-bg.jpg Dancer default
+public/images/perldancer.jpg Dancer default
+public/javascripts/bootstrap-2.0.3/bootstrap-alert.js Bootstrap 2.0.3
+public/javascripts/bootstrap-2.0.3/bootstrap.js Bootstrap 2.0.3
+public/javascripts/bootstrap-2.0.3/bootstrap.min.js Bootstrap 2.0.3
+public/javascripts/jQuery/jquery-1.7.2.min.js jQuery 1.7.2
+public/javascripts/jQuery/jquery.ui.widget.js jQuery 1.7.2
README
-views/index.tt
-views/layouts/bootstrap.tt
-views/layouts/main.tt
+views/index.tt Index page with Bootstrap layout
+views/layouts/bootstrap.tt The Bootstrap layout
+views/layouts/main.tt Dancer default
View
@@ -14,3 +14,4 @@ CVS/
.bak$
^cover_db/
^db/
+^logs/
@@ -34,6 +34,30 @@ message for the user.
All flash message output is HTML escaped for security reasons.
+=head1 TEMPLATE FILES IN THIS DISTRIBUTION
+
+The meat of this package are the template and Bootstrap and jQuery files.
+These don't get installed but live in the distribution. You will need to
+copy the following files and directories into your application
+directory, at least until L<Dancer> resp. the C<dancer> application comes
+with a way to specify default layouts when generating a new application
+scaffold.
+
+=head2 LIST OF FILES TO COPY
+
+ public/css/bootstrap-responsive.css Bootstrap 2.0.3
+ public/css/bootstrap.css Bootstrap 2.0.3
+ public/css/bootstrap.min.css Bootstrap 2.0.3
+ public/images/glyphicons-halflings-white.png Glyphicons
+ public/images/glyphicons-halflings.png Bootstrap 2.0.3
+ public/javascripts/bootstrap-2.0.3/bootstrap-alert.js Bootstrap 2.0.3
+ public/javascripts/bootstrap-2.0.3/bootstrap.js Bootstrap 2.0.3
+ public/javascripts/bootstrap-2.0.3/bootstrap.min.js Bootstrap 2.0.3
+ public/javascripts/jQuery/jquery-1.7.2.min.js jQuery 1.7.2
+ public/javascripts/jQuery/jquery.ui.widget.js jQuery 1.7.2
+ views/index.tt Index page with Bootstrap layout
+ views/layouts/bootstrap.tt The Bootstrap layout
+
=head1 NEEDED MODULES
The simple templating included with Dancer does not properly
View
@@ -0,0 +1,30 @@
+#!perl -w
+use strict;
+use Test::More tests => 1;
+use Data::Dumper;
+
+=head1 NAME
+
+01-template-list.t - check that the POD lists all relevant files
+
+=cut
+
+my $module_pm = shift || 'lib/Dancer/Layout/Bootstrap.pm';
+
+open my $MANIFEST, '<', 'MANIFEST'
+ or die "Couldn't read MANIFEST: $!";
+my %copy= map { (split /\t/)[0] => $_ }
+ grep /\t.*(Bootstrap|Glyphicons|jQuery)/,
+ <$MANIFEST>;
+
+open my $MODULE, '<', $module_pm
+ or die "Couldn't read '$module_pm': $!";
+my @have= map {/\s+(\S+)/}
+ grep /^=head2 LIST OF FILES TO COPY/../^=head1/,
+ <$MODULE>;
+
+delete @copy{ @have };
+
+if(! is 0+keys %copy, 0, "All files that need copying are listed") {
+ diag $_ for sort values %copy;
+};

0 comments on commit 5999af9

Please sign in to comment.