Thread: [smolder-commits] SF.net SVN: smolder:[876] trunk (Page 2)
Brought to you by:
michael_peters
From: <mic...@us...> - 2009-03-29 22:11:40
|
Revision: 876 http://smolder.svn.sourceforge.net/smolder/?rev=876&view=rev Author: michael_peters Date: 2009-03-29 22:11:35 +0000 (Sun, 29 Mar 2009) Log Message: ----------- remove Makefile entirely and replace with Build actions Modified Paths: -------------- trunk/Build.PL trunk/MANIFEST.SKIP trunk/lib/Smolder/Build.pm Removed Paths: ------------- trunk/Makefile Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2009-03-29 17:07:19 UTC (rev 875) +++ trunk/Build.PL 2009-03-29 22:11:35 UTC (rev 876) @@ -73,6 +73,7 @@ }, create_makefile_pl => 'passthrough', create_readme => 1, + add_to_cleanup => ['data/*', 'logs/*'], ); $builder->add_build_element('templates'); Modified: trunk/MANIFEST.SKIP =================================================================== --- trunk/MANIFEST.SKIP 2009-03-29 17:07:19 UTC (rev 875) +++ trunk/MANIFEST.SKIP 2009-03-29 22:11:35 UTC (rev 876) @@ -6,3 +6,5 @@ \.git blib \.svn +smolder.conf +\.sqlite Deleted: trunk/Makefile =================================================================== --- trunk/Makefile 2009-03-29 17:07:19 UTC (rev 875) +++ trunk/Makefile 2009-03-29 22:11:35 UTC (rev 876) @@ -1,45 +0,0 @@ -# Smolder master Makefile. The following targets are supported: -# -# all - Show help text -# -# build - build Smolder -# -# clean - remove the results of a build, tests etc -# -# test - runs the test suite -# -# db - recreates databases by calling bin/smolder_createdb -# -# tidy - run perltidy on all Smolder *.pm and *.t files. Probably not -# what you want. see tidy_modified instead. -# -# tidy_modified - run perltidy on all modified *.pm and *.t files, as -# reported by svn status - - -all: - @echo "No default make target." - -build: - perl Build.PL; ./Build - -clean: build - - rm -rf data/* - - rm -rf logs/* - - ./Build realclean - -test: build - ./Build test - -db: build - ./Build db - -TIDY_ARGS = --backup-and-modify-in-place --indent-columns=4 --cuddled-else --maximum-line-length=100 --nooutdent-long-quotes --paren-tightness=2 --brace-tightness=2 --square-bracket-tightness=2 -tidy: - - find lib/Smolder/ -name '*.pm' | xargs perltidy -b -i=4 -pt=1 -ci=2 -ce -bt=1 -sbt=1 -l=100 - - find t/ -name '*.t' | xargs perltidy $(TIDY_ARGS) - -tidy_modified: - svn -q status | grep '^M.*\.\(pm\|pl\|t\)$$' | cut -c 8- | xargs perltidy $(TIDY_ARGS) - -.PHONY : all build clean test db tidy tidy_modified Modified: trunk/lib/Smolder/Build.pm =================================================================== --- trunk/lib/Smolder/Build.pm 2009-03-29 17:07:19 UTC (rev 875) +++ trunk/lib/Smolder/Build.pm 2009-03-29 22:11:35 UTC (rev 876) @@ -181,6 +181,40 @@ Smolder::DB::SmokeReport->update_all_report_html(); } +=head2 tidy + +Run perltidy over all the Perl files in the codebase. + +=cut + +my @TIDY_ARGS = qw( + --backup-and-modify-in-place + --indent-columns=4 + --cuddled-else + --maximum-line-length=100 + --nooutdent-long-quotes + --paren-tightness=2 + --brace-tightness=2 + --square-bracket-tightness=2 +); +sub ACTION_tidy { + my $self = shift; + system(q(find lib/Smolder/ -name '*.pm' | xargs perltidy ) . join(' ', @TIDY_ARGS)); + system(q(find t/ -name '*.t' | xargs perltidy ) . join(' ', @TIDY_ARGS)); + system('perltidy', 'bin', @TIDY_ARGS); +} + +=head2 tidy_modified + +Run perltidy over all the Perl files that have changed and not been committed. + +=cut + +sub ACTION_tidy_modified { + my $self = shift; + system(q{svn -q status | grep '^M.*\.\(pm\|pl\|t\)$$' | cut -c 8- | xargs perltidy } . join(' ', @TIDY_ARGS)); +} + # handle the extra file types that smolder needs (templates, sql, htdocs, etc) sub process_templates_files { my $self = shift; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-29 22:20:19
|
Revision: 877 http://smolder.svn.sourceforge.net/smolder/?rev=877&view=rev Author: michael_peters Date: 2009-03-29 22:20:14 +0000 (Sun, 29 Mar 2009) Log Message: ----------- moving docs/Changes.pod into just plain text Changes Added Paths: ----------- trunk/Changes Removed Paths: ------------- trunk/docs/Changes.pod Added: trunk/Changes =================================================================== --- trunk/Changes (rev 0) +++ trunk/Changes 2009-03-29 22:20:14 UTC (rev 877) @@ -0,0 +1,183 @@ +Revision history for Smolder + +1.3 + + Rewrite of the build/install system to be installable from CPAN - M. Peters + +1.24 + + Fixed problem with Atom URLS - Andrew Moore, M. Peters + + Added a few indexes to speed some things up for projects with lots of test reports - + M. Peters + + Show tags for a report in the Atom feed as well as the report details - M. Peters + + Fix some UI issues that came up from having very long tag names - M. Peters + +1.23 + + Recognize the extra_properties in an TAP archive and display them on the report - M. Peters + + Added --report-id option to bin/smolder_update_smoke_html - M. Peters + + Individual TAP streams are now viewable on the test report screen - M. Peters + + Simplified platform files since all RH derivatives can be treated the same - M. Peters + + Remove the /init.d script since we don't want to require root on install/upgrade - M. Peters + + Added --Platform option to bin/smolder_install - Elizabeth Cortell + + Fixed build and install on 0SX 10.5 (Leopard) - Elizabeth Cortell + + Improved build and error messages on Ubuntu - Elizabeth Cortell + + Joined Prototype/Scriptaculous files with protoaculous to improve initial browser load + time - M. Peters + + Allow TAP archives to contain all of the fields we also collect on the report form - + M. Peters + +1.22 + + Developer uploads can now be done without logging in as long as credentials are passed - + M. Peters + + Minor template and style changes + +1.21 + + Project categories have now been replaced by the more flexible smoke report tags - M. Peters + + TAP archives can now be downloaded through the UI for a given report - M. Peters + + Graphs can now be done on test run duration if that info was provided in the archive - + M. Peters + + Fixed some various platform install problems because we weren't detecting missing libraries, + or we couldn't find libraries that were already installed. Devel::CheckLib to the rescure - + Slaven Rezic, M. Peters + + Fixed problems with documentation - Slaven Rezic, M. Peters + + The default DBPlatform is now SQLite instead of MySQL - M. Peters + + When re-installing, smolder_install calls smolder_unistall with invalid params - Reported + by Andy Lester, fixed by M. Peters + + When re-installing we need to remove any old database that might be laying around - + Reported by Andy Lester, fixed by M. Peters + + Added docs/porting.pod and fixed bad link in docs/ops_install.pod - M. Peters + + Fixed build issue where Carp::Clan was hanging - M. Peters + + Fixed build issue on Mac OSX where we were looking for .so files instead of .dynlib + - Michael Schwern, M. Peters + + Fixed test of MySQL isolation level to accept READ-COMMITTED or stricter - Sam Villain + + Upgraded some CPAN components and removed a lot dependencies that were no longer necessary + - M. Peters + + Added Fedora 7 & 8 as a build target - M. Peters + + Changed the Javascript calendar library we're using - M. Peters + + Upgraded Prototype and Scriptaculous JS libraries - M. Peters + + Abort build if we detect a broken ExtUtils::Install - Michael Schwern, M. Peters + + Auto-convert the sqlite DB to the new version when upgrading Smolder - M. Peters + + Added bin/smolder_sql_exec and bin/smolder_dumpdb helper scripts - M. Peters + +1.2 + + Removed smolder_prove. You can now get the new TAP archive format by using + TAP::Parser's runtests --archive. + + Change the UI for assigning developers to projects to allow for larger lists of groups + and developers - M. Peters + + Upgraded 3rd party JavaScript libraries (prototype, scriptaculous) and remove unnecssary + JS and CSS files - M. Peters + + Fixed bug where emails weren't being sent out. - M. Peters + + SMTPHost config directive is now optional and Smolder will use the local sendmail program + if it's not provided. - M. Peters + + Now using TAP::Harness::Archive as the suggested method of creating the TAP archive. Also + use it for manipulating them. - M. Peters + +1.1 + + Now using straight TAP (bundled in an archive file) instead of the custom XML/YAML thing + we were using before. - M. Peters + + Added Atom feeds that can be enabled per project. - M. Peters + + Updated various component source modules and projects. - M. Peters + + Removed swish-e and mod_auth_tkt since they weren't essential to the functioning of smolder, + but added a lot of size. - M. Peters + + Allow smolder.conf to be located in various places, not just + $SMOLDER_ROOT/conf/smolder. We now look first at $SMOLDER_CONF, then in + $SMOLDER_ROOT/conf, /usr/local/smolder/conf and then /etc/smolder. - M. Peters + + Added "Show All Details" link to test reports. Will suck browser resources if used on + large test reports, but should be find on smaller ones - M. Peters + + Fixed upgrades to now use appropriate sql file depending on the running DBPlatform. - + M. Peters + + Updated various images. - M. Peters + + Added bin/smolder_update_smoke_html so that you can regenerate the HTML of the smoke + reports after a template change. - M. Peters + +1.02 + + Better tolerance of email failures, allowing the action to proceed and warnings to be + sent to the log (and user when appropriate) - M. Peters + + Added --not-perl option to bin/smolder_prove so that it will simply exec files + without treating them like Perl scripts. - M. Peters + + Fixed bug when building with --no-mysql on a system that doesnt have MySQL installed - + Trushar Zaveri and M. Peters + + Fixed bug to allow anonymous access to test file details for public projects - M. Peters + +1.01 + + Fixed bug with uploading YAML files instead of XML - M. Peters + + Disable form inputs when AJAXified forms are submitting, then re-enable them on request + completion - M. Peters + + Minor bug fixes with CRUD UI's - M. Peters + + Changed the validation messages to use the same message stack as other messages instead + of being inlined. - M. Peters + + Better display of test descriptions and diagnostic messages in HTML results matrix. - + M. Peters + +1.00 + + Added dynamic HTML TAP Matrix views - M. Peters + + Fixed some navigation issues with paged results of smoke reports when using categories. - + M. Peters + + Removed Swish-e and searchable docs from Smolder. We'll have this someday on the website + (when we get one). - M. Peters + + Fixed some build/install issues for FreeBSD and MySQL - M. Peters + + Added mising Method::Alias module - Sam Tregar + + HTML escape test data in the TAP Matrix - M. Peters + +0.3 (1.0 RC1) + + Mark tests that have files that exit with a non-zero status that use 'no_plan' to be + marked as failing - M. Peters + + Allow anonymous smoke tests added to public projects - M. Peters + + Added public projects - M. Peters + + Upgrading to Apache 1.3.36 - M. Peters + + Auto-purging of old compressed XML files by ProjectFullReportsMax config directive - + M. Peters + + Better caching headers for static files - M. Peters + + Fixed building of SQLite on some platforms - Mark Stosberg + + Searchable HTML versions of docs - M. Peters + + Fixing graph generation bug when using SQLite - Sam Tregar + + Compressed XML storage and acceptance during upload - M. Peters, Sam Tregar + + Runtime errors sometimes being lost - Sam Tregar, M. Peters + + Removed un-used mod_ssl sources and build - M. Peters + +0.2 + + Turn on mod_auth_tkt for all dynamic requests so that Apache auth stages are run and + valid credentials produced - M. Peters + + Added smolder_prove, to run any normal Perl tests for smolder - M. Peters + + Send the port number in URLs in emails - Sam Tregar + + Skip the authinfo test if Apache is not running - Sam Tregar + + Added missing modules to src (XML::Parser, XML::SAX::Expat, Exception::Class and + Exception::Class::TryCatch) - Sam Tregar + + Using a smaller number of Apache children and Apache::SizeLimit to limit any memory + hogging - M. Peters + + Added built-in SQLite support - (M. Peters, Mark Stosberg) + + Added multi-db support via Smolder::DBPlatform - M. Peters + + Upgraded DBI to 1.50 - M. Peters + + Added notification to the user of failed AJAX requests - M. Peters + +0.1 + + Overhaul and review of upgrade system - M. Peters + + Project admins can control when the project graph starts by default - M. Peters + + Can now view progress graph by platform and architecture - M. Peters + + Overhaul of Admin Developer/Project CRUDs to keep everything on one AJAXified screen - + M. Peters + +0.04 (March 13, 2006) + + Added ability to see just a single report by id; Smoke report emails now link to single + reports - M. Peters + + Added logging to Apache::Log via Log::Dispatch and CGI::Application::Plugin::LogDispatch - + M. Peters + + Fixed smolder_backup and smolder_install to work together and allow installation from a + backup - M. Peters + + Reviewed all templates and fixed potential XSS issue with non escaped data - M. Peters + + Added top-level Makefile as a shortcut to various actions/scripts - M. Peters + + Explicitly set Expires headers for CSS/JS/Image to improve caching - M. Peters + + Run tests as User/Group if we can - M. Peters + + Check for libgd on install - M. Peters + + FreeBSD control scripts moved from /etc/rc.d to /usr/local/etc/rc.d. Currently there is + no automatic migration of scripts previously installed in /etc/rc.d by smolder. - Mark Stosberg + +0.03 (March 06, 2006) + + Added more missing Perl modules to src/ directory - M. Peters + + Allow smolder_createdb to use MySQL root passwords with spaces - Matisse Enzer + + Add "--dry-run" option to smolder_createdb. -Mark Stosberg + +0.02 (March 05, 2006) + + Fixed building of GD.pm on FreeBSD - Mark Stosberg + + Added missing Perl modules to src/ directory - M. Peters + +0.01 (March 04, 2006) + + Initial public release Deleted: trunk/docs/Changes.pod =================================================================== --- trunk/docs/Changes.pod 2009-03-29 22:11:35 UTC (rev 876) +++ trunk/docs/Changes.pod 2009-03-29 22:20:14 UTC (rev 877) @@ -1,311 +0,0 @@ -=head1 SMOLDER CHANGES - -=head2 1.3 - -=item * Rewrite of the build/install system to be installable from CPAN - M. Peters - -=head2 1.24 - -=over - -=item * Fixed problem with Atom URLS - Andrew Moore, M. Peters - -=item * Added a few indexes to speed some things up for projects with lots of test reports - M. Peters - -=item * Show tags for a report in the Atom feed as well as the report details - M. Peters - -=item * Fix some UI issues that came up from having very long tag names - M. Peters - -=back - -=head2 1.23 - -=over - -=item * Recognize the extra_properties in an TAP archive and display them on the report - M. Peters - -=item * Added C<--report-id> option to F<bin/smolder_update_smoke_html> - M. Peters - -=item * Individual TAP streams are now viewable on the test report screen - M. Peters - -=item * Simplified platform files since all RH derivatives can be treated the same - M. Peters - -=item * Remove the /init.d script since we don't want to require root on install/upgrade - M. Peters - -=item * Added C<--Platform> option to F<bin/smolder_install> - Elizabeth Cortell - -=item * Fixed build and install on 0SX 10.5 (Leopard) - Elizabeth Cortell - -=item * Improved build and error messages on Ubuntu - Elizabeth Cortell - -=item * Joined Prototype/Scriptaculous files with protoaculous to improve initial browser load time - M. Peters - -=item * Allow TAP archives to contain all of the fields we also collect on the report form - M. Peters - -=back - -=head2 1.22 - -=over - -=item * Developer uploads can now be done without logging in as long as credentials are passed - M. Peters - -=item * Minor template and style changes - -=back - -=head2 1.21 - -=over - -=item * Project categories have now been replaced by the more flexible smoke report tags - M. Peters - -=item * TAP archives can now be downloaded through the UI for a given report - M. Peters - -=item * Graphs can now be done on test run duration if that info was provided in the archive - M. Peters - -=item * Fixed some various platform install problems because we weren't detecting missing libraries, or we couldn't find libraries that were already installed. Devel::CheckLib to the rescure - Slaven Rezic, M. Peters - -=item * Fixed problems with documentation - Slaven Rezic, M. Peters - -=item * The default C<DBPlatform> is now SQLite instead of MySQL - M. Peters - -=item * When re-installing, smolder_install calls smolder_unistall with invalid params - Reported by Andy Lester, fixed by M. Peters - -=item * When re-installing we need to remove any old database that might be laying around - Reported by Andy Lester, fixed by M. Peters - -=item * Added F<docs/porting.pod> and fixed bad link in F<docs/ops_install.pod> - M. Peters - -=item * Fixed build issue where Carp::Clan was hanging - M. Peters - -=item * Fixed build issue on Mac OSX where we were looking for F<.so> files instead of F<.dynlib> - Michael Schwern, M. Peters - -=item * Fixed test of MySQL isolation level to accept C<READ-COMMITTED> or stricter - Sam Villain - -=item * Upgraded some CPAN components and removed a lot dependencies that were no longer necessary - M. Peters - -=item * Added Fedora 7 & 8 as a build target - M. Peters - -=item * Changed the Javascript calendar library we're using - M. Peters - -=item * Upgraded Prototype and Scriptaculous JS libraries - M. Peters - -=item * Abort build if we detect a broken L<ExtUtils::Install> - Michael Schwern, M. Peters - -=item * Auto-convert the sqlite DB to the new version when upgrading Smolder - M. Peters - -=item * Added F<bin/smolder_sql_exec> and F<bin/smolder_dumpdb> helper scripts - M. Peters - -=back - -=head2 1.2 - -=over - -=item * Removed F<smolder_prove>. You can now get the new TAP archive format by using L<TAP::Parser>'s C<runtests --archive>. - -=item * Change the UI for assigning developers to projects to allow for larger lists of groups and developers - M. Peters - -=item * Upgraded 3rd party JavaScript libraries (prototype, scriptaculous) and remove unnecssary JS and CSS files - M. Peters - -=item * Fixed bug where emails weren't being sent out. - M. Peters - -=item * SMTPHost config directive is now optional and Smolder will use the local sendmail program if it's not provided. - M. Peters - -=item * Now using L<TAP::Harness::Archive> as the suggested method of creating the TAP archive. Also use it for manipulating them. - M. Peters - -=back - -=head2 1.1 - -=over - -=item * Now using straight TAP (bundled in an archive file) instead of the custom XML/YAML thing we were using before. - M. Peters - -=item * Added Atom feeds that can be enabled per project. - M. Peters - -=item * Updated various component source modules and projects. - M. Peters - -=item * Removed swish-e and mod_auth_tkt since they weren't essential to the functioning of smolder, but added a lot of size. - M. Peters - -=item * Allow F<smolder.conf> to be located in various places, not just F<$SMOLDER_ROOT/conf/smolder>. We now look first at F<$SMOLDER_CONF>, then in F<$SMOLDER_ROOT/conf>, F</usr/local/smolder/conf> and then F</etc/smolder>. - M. Peters - -=item * Added "Show All Details" link to test reports. Will suck browser resources if used on large test reports, but should be find on smaller ones - M. Peters - -=item * Fixed upgrades to now use appropriate sql file depending on the running DBPlatform. - M. Peters - -=item * Updated various images. - M. Peters - -=item * Added F<bin/smolder_update_smoke_html> so that you can regenerate the HTML of the smoke reports after a template change. - M. Peters - -=back - -=head2 1.02 - -=over - -=item * Better tolerance of email failures, allowing the action to proceed and warnings to be sent to the log (and user when appropriate) - M. Peters - -=item * Added C<--not-perl> option to F<bin/smolder_prove> so that it will simply exec files without treating them like Perl scripts. - M. Peters - -=item * Fixed bug when building with C<--no-mysql> on a system that doesnt have MySQL installed - Trushar Zaveri and M. Peters - -=item * Fixed bug to allow anonymous access to test file details for public projects - M. Peters - -=head2 1.01 - -=over - -=item * Fixed bug with uploading YAML files instead of XML - M. Peters - -=item * Disable form inputs when AJAXified forms are submitting, then re-enable them on request completion - M. Peters - -=item * Minor bug fixes with CRUD UI's - M. Peters - -=item * Changed the validation messages to use the same message stack as other messages instead of being inlined. - M. Peters - -=item * Better display of test descriptions and diagnostic messages in HTML results matrix. - M. Peters - -=back - -=head2 1.00 - -=over - -=item * Added dynamic HTML TAP Matrix views - M. Peters - -=item * Fixed some navigation issues with paged results of smoke reports when using categories. - M. Peters - -=item * Removed Swish-e and searchable docs from Smolder. We'll have this someday on the website (when we get one). - M. Peters - -=item * Fixed some build/install issues for FreeBSD and MySQL - M. Peters - -=item * Added mising Method::Alias module - Sam Tregar - -=item * HTML escape test data in the TAP Matrix - M. Peters - -=back - -=head2 0.3 (1.0 RC1) - -=over - -=item * Mark tests that have files that exit with a non-zero status that use 'no_plan' to be marked as failing - M. Peters - -=item * Allow anonymous smoke tests added to public projects - M. Peters - -=item * Added public projects - M. Peters - -=item * Upgrading to Apache 1.3.36 - M. Peters - -=item * Auto-purging of old compressed XML files by ProjectFullReportsMax config directive - M. Peters - -=item * Better caching headers for static files - M. Peters - -=item * Fixed building of SQLite on some platforms - Mark Stosberg - -=item * Searchable HTML versions of docs - M. Peters - -=item * Fixing graph generation bug when using SQLite - Sam Tregar - -=item * Compressed XML storage and acceptance during upload - M. Peters, Sam Tregar - -=item * Runtime errors sometimes being lost - Sam Tregar, M. Peters - -=item * Removed un-used mod_ssl sources and build - M. Peters - -=back - -=head2 0.2 - -=over - -=item * Turn on mod_auth_tkt for all dynamic requests so that Apache auth stages are run and valid credentials produced - M. Peters - -=item * Added smolder_prove, to run any normal Perl tests for smolder - M. Peters - -=item * Send the port number in URLs in emails - Sam Tregar - -=item * Skip the authinfo test if Apache is not running - Sam Tregar - -=item * Added missing modules to src (XML::Parser, XML::SAX::Expat, Exception::Class and Exception::Class::TryCatch) - Sam Tregar - -=item * Using a smaller number of Apache children and Apache::SizeLimit to limit any memory hogging - M. Peters - -=item * Added built-in SQLite support - (M. Peters, Mark Stosberg) - -=item * Added multi-db support via Smolder::DBPlatform - M. Peters - -=item * Upgraded DBI to 1.50 - M. Peters - -=item * Added notification to the user of failed AJAX requests - M. Peters - -=back - -=head2 0.1 - -=over - -=item * Overhaul and review of upgrade system - M. Peters - -=item * Project admins can control when the project graph starts by default - M. Peters - -=item * Can now view progress graph by platform and architecture - M. Peters - -=item * Overhaul of Admin Developer/Project CRUDs to keep everything on one AJAXified screen - M. Peters - -=back - -=head2 0.04 (March 13, 2006) - -=over - -=item * Added ability to see just a single report by id; Smoke report emails now link to single reports - M. Peters - -=item * Added logging to Apache::Log via Log::Dispatch and CGI::Application::Plugin::LogDispatch - M. Peters - -=item * Fixed smolder_backup and smolder_install to work together and allow installation from a backup - M. Peters - -=item * Reviewed all templates and fixed potential XSS issue with non escaped data - M. Peters - -=item * Added top-level Makefile as a shortcut to various actions/scripts - M. Peters - -=item * Explicitly set Expires headers for CSS/JS/Image to improve caching - M. Peters - -=item * Run tests as User/Group if we can - M. Peters - -=item * Check for libgd on install - M. Peters - -=item * FreeBSD control scripts moved from /etc/rc.d to /usr/local/etc/rc.d. Currently there is no automatic migration of scripts previously installed in /etc/rc.d by smolder. - Mark Stosberg - -=back - -=head2 0.03 (March 06, 2006) - -=over - -=item * Added more missing Perl modules to src/ directory - M. Peters - -=item * Allow smolder_createdb to use MySQL root passwords with spaces - Matisse Enzer - -=item * Add "--dry-run" option to smolder_createdb. -Mark Stosberg - -=back - -=head2 0.02 (March 05, 2006) - -=over - -=item * Fixed building of GD.pm on FreeBSD - Mark Stosberg - -=item * Added missing Perl modules to src/ directory - M. Peters - -=back - -=head2 0.01 (March 04, 2006) - -=over - -=item * Initial public release - -=back This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-29 22:30:41
|
Revision: 878 http://smolder.svn.sourceforge.net/smolder/?rev=878&view=rev Author: michael_peters Date: 2009-03-29 22:30:29 +0000 (Sun, 29 Mar 2009) Log Message: ----------- moving docs/TODO.pod to just plain text TODO Added Paths: ----------- trunk/TODO Removed Paths: ------------- trunk/docs/TODO.pod Added: trunk/TODO =================================================================== --- trunk/TODO (rev 0) +++ trunk/TODO 2009-03-29 22:30:29 UTC (rev 878) @@ -0,0 +1,64 @@ +TODO tasks for Smolder + ++ Plugins that support + + adding and overriding templates and htdocs + + adding sql tables + + adding code + ++ SCM revision # on the main summary page of a test run + ++ Change graphs to be able to handle more data without looking crappy + + Maybe something client side (JS, Canvas, Google graphs)? + ++ Handle skip-all better in the plan. + + A skip-all plan will look like this: + 1..0 # Skip Can't reach http://google.com + + We need to show more in the report than just "No tests run". We should show the + reason. + ++ Allow anonymous uploads via smolder_smoke_signal + ++ Tracking of individual tests. This would provide a view that let's + the user see when each test was added and maybe how it has faired + over time. MediaWiki has an example of this: + + * HTML nested bullet list, open tags (bug 5497) [Has never passed] + * HTML nested ordered list, open tags (bug 5497) [Has never passed] + * Fuzz testing: image with bogus manual thumbnail [Introduced + between 08-Apr-2007 07:15:22, 1.10alpha (r21099) and 25-Apr-2007 + 07:15:46, 1.10alpha] + + We'd need GUIDs (or something else) for tests so maybe we use a custom TAP diagnostic key + ++ Add preference to just get plain-text emails + ++ Create an interface for comparing 2 sets of reports for the same project. + Possibly similar to the way you select data for graphing. + ++ Create a full search system of smoke reports, not just a listing + by most recent. This would allow for searching based on project, + status, category, etc. + ++ Support new TAP diagnostics (almost specced out in TAP) + ++ Support nested TAP + ++ Better message stack that works arcoss sessions. + ++ Precompile all templates at startup (speeds it up and increases shared memory) + ++ Rendering in other browsers besides FF and KHTML + ++ Import/export projects so you can move them around in smolder installs + ++ Add paging to other listing pages admin_developers/admin_projects, etc (or add datagrid?) + ++ Add help tooltips where appropriate + ++ Allow smolder_smoke_signal to use the Smolder modules directly if it's on the same machine. + ++ Add coverage reports (related to smoke tests?) + ++ Add benchmark gathering? + Deleted: trunk/docs/TODO.pod =================================================================== --- trunk/docs/TODO.pod 2009-03-29 22:20:14 UTC (rev 877) +++ trunk/docs/TODO.pod 2009-03-29 22:30:29 UTC (rev 878) @@ -1,133 +0,0 @@ -=head1 TODO - -=head2 FOR 1.5 - -=over - -=item * Make Smolder CPANable - - * convert custom build system into a standard Module::Build system - * have install put config, bin, htdoc, etc into appropriate places - * have install check for upgrade and run if necessary - * remove Apache and use HTTP::Engine - * move docs/ instal Smolder::Manual pod pages - -=item * Remove MySQL support and just use SQLite - -=item * Project specific CSS extensions - -=item * SCM revision # on the main summary page of a test run - -=item * Change graphs to be able to handle more data without looking crappy - -=back - -=head2 FOR 2.0 - -=over - -=item * Handle skip-all better in the plan. - -A skip-all plan will look like this: - - 1..0 # Skip Can't reach http://google.com - -We need to show more in the report than just "No tests run". We should show the -reason. - -=item * Allow anonymous uploads via smolder_smoke_signal - -=item * - -Graphing of execution times over time. When combined with a graph of the -number of tests run it can show when performance regressions have entered. - -=item * - -Tracking of individual tests. This would provide a view that let's -the user see when each test was added and maybe how it has faired -over time. MediaWiki has an example of this: - - * HTML nested bullet list, open tags (bug 5497) [Has never passed] - * HTML nested ordered list, open tags (bug 5497) [Has never passed] - * Fuzz testing: image with bogus manual thumbnail [Introduced - between 08-Apr-2007 07:15:22, 1.10alpha (r21099) and 25-Apr-2007 - 07:15:46, 1.10alpha] - -We'd need GUIDs for tests so maybe we use a custom TAP diagnostic key - -=item * - -Add preference to just get plain-text emails - -=item * - -Create an interface for comparing 2 sets of reports for the same project. -Possibly similar to the way you select data for graphing. - -=item * - -Replace image based graphs with browser based (canvas? Google graphs? Plotr?) - -=item * - -Create a full search system of smoke reports, not just a listing -by most recent. This would allow for searching based on project, -status, category, etc. - -=item * - -Support new TAP diagnostics (almost specced out in TAP) - -=item * - -Better message stack that works arcoss sessions. - -=item * - -Precompile all templates at startup (speeds it up and increases shared memory) - -=item * - -Rendering in other browsers besides FF and KHTML - -=item * - -Import/export projects (similar to backup and install from backup but by project) - -=item * - -Add paging to other listing pages admin_developers/admin_projects, etc (or add datagrid?) - -=item * - -Add help tooltips where appropriate - -=item * - -Allow smolder_smoke_signal to use the Smolder modules directly if it's on the same machine. - -=back - -=head2 BEYOND - -=over - -=item * - -Make sure it builds/runs/installs on as many *nix platforms as possible - -=item * - -Add coverage reports (related to smoke tests?) - -=item * - -Add benchmark gathering? - -=back - - - - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-29 23:03:59
|
Revision: 881 http://smolder.svn.sourceforge.net/smolder/?rev=881&view=rev Author: michael_peters Date: 2009-03-29 23:03:53 +0000 (Sun, 29 Mar 2009) Log Message: ----------- removing last of the docs and moving the last still relevant ones to Smolder::Manual Added Paths: ----------- trunk/lib/Smolder/Manual.pm Removed Paths: ------------- trunk/docs/ Added: trunk/lib/Smolder/Manual.pm =================================================================== --- trunk/lib/Smolder/Manual.pm (rev 0) +++ trunk/lib/Smolder/Manual.pm 2009-03-29 23:03:53 UTC (rev 881) @@ -0,0 +1,209 @@ +package Smolder::Manual; +1; + +__END__ + +=head1 NAME + +Smolder::Manual - How to use Smolder more effectively + +=head1 UPLOAD FILE FORMAT + +This describes the file format for test reports expected by Smolder. This +report file can either be uploaded using the web interface or the +C<smolder_smoke_signal> utility for automating the upload. + +=head2 TAP + +TAP is the "Test Anything Prototcol" and is the basic format behind all +test reports. Whatever language you use for your testing or whatever +infrastructure or harness you have running your tests, if it can output +TAP then it can work with Smolder. There are TAP emiters for almost all +currently popular languages (C, Java, PHP, Perl, Python, Ruby, etc). And +even if your language of choice doesn't have an existing TAP emiter, TAP +is such a simple protocol that it's a fairly trivial task to write one. + +The full documentation for TAP can be found at +http://search.cpan.org/perldoc?TAP with more information available at +http://testanything.org. + +The basic idea is that a single file of TAP output is equivalent to +a single test script or module. These files are collected together in +a tar (optionally compressed with gzip) or a zip archive. This archive +file can have an arbitrary number of these TAP files (the file extension +doesn't matter, but you can user F<.tap> if you need to use something) +in an arbitrary number of directories (nice for grouping and organizing +your tests). + +=head2 Simple Example + +Here's a quick example of using a few C<bash> commands to create a +Smolder test report file from a typical Perl test suite (typical Perl +test suites use L<Test::Builder> which output TAP) : + + $] foreach i in t/*.t; do perl $i > `basename .t`.tap; done + $] tar -zc *.tap > test_run.tar.gz + +=head2 YAML + +Pretty straight forward. Now, there are some additional details which +you may or may not want Smolder to keep track of. What order did my +test files run in? How long did the test suite take to run? Since these +are questions about the whole test run in general it's not possible to +really associate them with any one test's output. + +This is why we also allow this test suite meta information to be presented +to Smolder in a small and simple YAML file. This file is usually named +F<meta.yml>, but you can use anything really as long as there's only +one file with the F<.yml> extension. It looks something like this: + + --- + file_order: + - foo.tap + - bar.tap + - extra/baz.tap + - extra/froob.tap + start_time: 1178159475 + stop_time: 1178159983 + +Since this entire file is optional, if you do include it you can include +which ever parts are of interest to you. Smolder can care about the +following keys of the YAML map: + +=over + +=item * file_order + +This is a list of the TAP files from your test run in the order you desire +to display them. This will usually be the order in which they are run. +The path to the TAP file is relative to the directory of the TAP archive. + +=item * start_time + +The time the test suite started to run. This time is given in epoch +seconds (seconds since 01/01/1970). + +=item * stop_time + +The time the test suite finished it's run. This time is given in epoch +seconds (seconds since 01/01/1970). + +=back + +=head2 Full Example + +Here's a slightly more complicated example (written in Perl) that +demonstates not only saving the TAP output to files, but also generating +a F<meta.yml> file to go along with it. We do this with the L<TAP::Harness::Archive> +module which does most of the work for us: + + #!/usr/bin/perl + use warnings; + use strict; + use TAP::Harness::Archive; + + my @files = glob('t/*.t'); + my $harness = TAP::Harness::Archive->new({ + archive => 'my_test_run.tar.gz', + }); + $harness->run_tests(@files); + +Or you can use the F<runtests> utility that comes with L<TAP::Harness> +to this with the C<--archive> or C<-a> arguments. + + ]$ runtests t/*.t --archive my_test_run.tar.gz + +=head1 RUNNING YOUR TESTS + +Smolder tries as hard as possible to not dictacte how you write or +structure your tests. It even tries hard not to care how you run your +tests too much. But it does need some help to get the right information +in the right format (a TAP Archive) + +=head2 Running + +=head3 prove + +The easiest way to run your tests for Smolder is to use the C<prove> +utility that comes with the L<Test::Harness> Perl module. It has a +C<--archive> option that tells it to generate an archive of the TAP files. + + ]$ prove --archive my_test_run.tar.gz + +=head3 Module::Build::TAPArchive + +If you are using L<Module::Build> in Perl you could instead use the +L<Module::Build::TAPArchive> subclass which provides an extra build +action C<test_archive>. + + ]$ perl Build.PL && ./Build test_archive --archive_file my_test_run.tar.gz + +=head3 Full Diagnostic Messages + +Many times a failing test will output diagnostics messages giving more +information (ie, expected vs. received return values, etc). TAP output +is expected to be on STDOUT, but diagnostic information is usually on STDERR. +To capture all of this, simply use the C<--merge> flag for C<prove>. + +=head3 SmokeRunner::Multi + +Sometimes you have many different projects or different branches of the +same project that you would like to test from an SVN source checkout. +The Perl module L<SmokeRunner::Multi> was designed for just this purpose. + +It can be used simply to run tests and output them to your screen, or +create TAP archives and even automatically upload it to a running Smolder +server. + +=head3 Buildbot + +Buildbot (L<http://buildbot.net>) is a neat Python tool that makes creating +a build farm nice and easy. With it you can setup a master build server +that has multiple slave build servers (running different platforms and +architectures). This is overkill for lots of scenarios, but is really +nice if your project needs to run on lots of systems. + +Having Buildbot submit the test results is essentially the same as anything +else. You need to create a TAP archive and have it uploaded to Smolder. + +=head2 Uploading to Smolder + +The easiest way to automate the uploading of test results to a running +Smolder is to use the F<smolder_smoke_signal> utiltiy that comes with +Smolder. It takes a TAP archive file and uploads it to the Smolder server +of your choice. + + ]$ smolder_smoke_signal --server smolder.foo.com \ + --username myself --password s3cr3t --file test_report.tar.gz \ + --project MyProject + +Or you can use the C<LWP> Perl library directly (and there's probably a way +to do it just using C<curl> from the command line. + + LWP::UserAgent->new()->post( + 'http://smolder.project.org/app/developer_projects/add_report/$project_id', + Content_Type => 'form-data', + Content => [ + architecture => '386', + platform => 'Linux', + comments => $comments, + username => 'my-user', + password => 's3cr3t', + report_file => ['tap_archive.tar.gz'], + ] + ); + +=head2 Altogether Now + +Typically, your automated test/upload code can be a bash script as simple +as this that you can run from cron: + + !#/bin/bash + prove --archive test_run.tar.gz + smolder_smoke_signal --server smolder.foo.com \ + --username myself --password s3cr3t --file test_run.tar.gz \ + --project MyProject + +Pretty easy. + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-29 23:40:34
|
Revision: 886 http://smolder.svn.sourceforge.net/smolder/?rev=886&view=rev Author: michael_peters Date: 2009-03-29 23:40:29 +0000 (Sun, 29 Mar 2009) Log Message: ----------- moving around the old upgrade files to their new places Added Paths: ----------- trunk/lib/Smolder/Upgrade/V0_1.pm trunk/lib/Smolder/Upgrade/V0_3.pm trunk/lib/Smolder/Upgrade/V1_1.pm trunk/lib/Smolder/Upgrade/V1_21.pm trunk/lib/Smolder/Upgrade/V1_24.pm trunk/sql/upgrade/ trunk/sql/upgrade/V0_3.sql trunk/sql/upgrade/V1_1.sql trunk/sql/upgrade/V1_21.sql trunk/sql/upgrade/V1_24.sql Removed Paths: ------------- trunk/upgrades/ Added: trunk/lib/Smolder/Upgrade/V0_1.pm =================================================================== --- trunk/lib/Smolder/Upgrade/V0_1.pm (rev 0) +++ trunk/lib/Smolder/Upgrade/V0_1.pm 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,9 @@ +package Smolder::Upgrade::V0_1; +use strict; +use warnings; +use base 'Smolder::Upgrade'; + +sub pre_db_upgrade { } +sub post_db_upgrade { } + +1; Added: trunk/lib/Smolder/Upgrade/V0_3.pm =================================================================== --- trunk/lib/Smolder/Upgrade/V0_3.pm (rev 0) +++ trunk/lib/Smolder/Upgrade/V0_3.pm 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,9 @@ +package Smolder::Upgrade::V0_3; +use strict; +use warnings; +use base 'Smolder::Upgrade'; + +sub pre_db_upgrade { } +sub post_db_upgrade { } + +1; Added: trunk/lib/Smolder/Upgrade/V1_1.pm =================================================================== --- trunk/lib/Smolder/Upgrade/V1_1.pm (rev 0) +++ trunk/lib/Smolder/Upgrade/V1_1.pm 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,49 @@ +package Smolder::Upgrade::V1_1; +use strict; +use warnings; +use base 'Smolder::Upgrade'; +use File::Path qw(rmtree); +use File::Spec::Functions qw(catdir); +use Smolder::Conf; + +sub pre_db_upgrade { } + +sub post_db_upgrade { + # let's purge all the existing reports + require Smolder::DB::SmokeReport; + my @reports = Smolder::DB::SmokeReport->retrieve_all(); + foreach my $report (@reports) { + $report->delete_files(); + $report->purged(1); + $report->update(); + Smolder::DB->dbi_commit(); + } + # remove the old HTML reports in the old format + rmtree(catdir(Smolder::Conf->data_dir, 'html_smoke_reports')); + # remove the old XML reports + my $report_dir = catdir(Smolder::Conf->data_dir, 'smoke_reports'); + rmtree($report_dir); + mkdir($report_dir); +} + +# add a new random secret +sub add_to_config { + my $secret = _random_secret(); + return qq| +# Secret +# A secret key used for encrypting various bits (auth tokens, etc) +Secret $secret + +|; +} + +sub _random_secret { + my $length = int(rand(10) + 20); + my $secret = ''; + my @chars = ('a'..'z', 'A'..'Z', 0..9, qw(! @ $ % ^ & - _ = + | ; : . / < > ?)); + $secret .= $chars[int(rand($#chars + 1))] for(0..$length); + return $secret; +} + + +1; Added: trunk/lib/Smolder/Upgrade/V1_21.pm =================================================================== --- trunk/lib/Smolder/Upgrade/V1_21.pm (rev 0) +++ trunk/lib/Smolder/Upgrade/V1_21.pm 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,9 @@ +package Smolder::Upgrade::V1_21; +use strict; +use warnings; +use base 'Smolder::Upgrade'; + +sub pre_db_upgrade { } +sub post_db_upgrade { } + +1; Added: trunk/lib/Smolder/Upgrade/V1_24.pm =================================================================== --- trunk/lib/Smolder/Upgrade/V1_24.pm (rev 0) +++ trunk/lib/Smolder/Upgrade/V1_24.pm 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,9 @@ +package Smolder::Upgrade::V1_24; +use strict; +use warnings; +use base 'Smolder::Upgrade'; + +sub pre_db_upgrade { } +sub post_db_upgrade { } + +1; Added: trunk/sql/upgrade/V0_3.sql =================================================================== --- trunk/sql/upgrade/V0_3.sql (rev 0) +++ trunk/sql/upgrade/V0_3.sql 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,9 @@ +ALTER TABLE preference ADD COLUMN email_limit INTEGER DEFAULT 0; +ALTER TABLE preference ADD COLUMN email_sent INTEGER DEFAULT 0; +ALTER TABLE preference ADD COLUMN email_sent_timestamp INTEGER; + +ALTER TABLE developer ADD COLUMN guest INTEGER DEFAULT 0; + +ALTER TABLE smoke_report ADD COLUMN failed INTEGER DEFAULT 0; +UPDATE smoke_report SET failed = ( fail > 1); + Added: trunk/sql/upgrade/V1_1.sql =================================================================== --- trunk/sql/upgrade/V1_1.sql (rev 0) +++ trunk/sql/upgrade/V1_1.sql 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,3 @@ +ALTER TABLE smoke_report ADD COLUMN todo_pass INTEGER DEFAULT 0; +ALTER TABLE project ADD COLUMN enable_feed INTEGER DEFAULT 1; + Added: trunk/sql/upgrade/V1_21.sql =================================================================== --- trunk/sql/upgrade/V1_21.sql (rev 0) +++ trunk/sql/upgrade/V1_21.sql 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,12 @@ +DROP TABLE project_category; + +CREATE TABLE smoke_report_tag ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + smoke_report INTEGER NOT NULL, + tag TEXT DEFAULT '', + CONSTRAINT 'fk_smoke_report_tag_smoke_report' FOREIGN KEY ('smoke_report') REFERENCES 'smoke_report' ('id') ON DELETE CASCADE +); +CREATE INDEX i_project_smoke_tag_tag ON smoke_report_tag (tag); +INSERT INTO smoke_report_tag (smoke_report, tag) SELECT id, category FROM smoke_report; +DELETE FROM smoke_report_tag WHERE tag IS NULL; + Added: trunk/sql/upgrade/V1_24.sql =================================================================== --- trunk/sql/upgrade/V1_24.sql (rev 0) +++ trunk/sql/upgrade/V1_24.sql 2009-03-29 23:40:29 UTC (rev 886) @@ -0,0 +1,2 @@ +CREATE INDEX i_report_smoke_report_tag ON smoke_report_tag (smoke_report, tag); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-29 23:43:52
|
Revision: 887 http://smolder.svn.sourceforge.net/smolder/?rev=887&view=rev Author: michael_peters Date: 2009-03-29 23:43:47 +0000 (Sun, 29 Mar 2009) Log Message: ----------- skip .bak files Modified Paths: -------------- trunk/MANIFEST.SKIP Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - smolder.conf data Build _build blib + smolder.conf data Build _build blib *.bak Modified: trunk/MANIFEST.SKIP =================================================================== --- trunk/MANIFEST.SKIP 2009-03-29 23:40:29 UTC (rev 886) +++ trunk/MANIFEST.SKIP 2009-03-29 23:43:47 UTC (rev 887) @@ -8,3 +8,4 @@ \.svn smolder.conf \.sqlite +\.bak This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-29 23:55:51
|
Revision: 890 http://smolder.svn.sourceforge.net/smolder/?rev=890&view=rev Author: michael_peters Date: 2009-03-29 23:55:46 +0000 (Sun, 29 Mar 2009) Log Message: ----------- remove README Modified Paths: -------------- trunk/Build.PL trunk/MANIFEST Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2009-03-29 23:50:25 UTC (rev 889) +++ trunk/Build.PL 2009-03-29 23:55:46 UTC (rev 890) @@ -72,7 +72,6 @@ htdocs => catdir($SHARE_DIR, 'htdocs'), }, create_makefile_pl => 'passthrough', - create_readme => 1, add_to_cleanup => ['data/*', 'logs/*', 'Smolder-*'], ); Modified: trunk/MANIFEST =================================================================== --- trunk/MANIFEST 2009-03-29 23:50:25 UTC (rev 889) +++ trunk/MANIFEST 2009-03-29 23:55:46 UTC (rev 890) @@ -181,3 +181,4 @@ templates/TAP/individual_test.tmpl templates/wrapper.tmpl TODO +Makefile.PL This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-30 08:43:28
|
Revision: 902 http://smolder.svn.sourceforge.net/smolder/?rev=902&view=rev Author: michael_peters Date: 2009-03-30 08:43:21 +0000 (Mon, 30 Mar 2009) Log Message: ----------- upping the version # Modified Paths: -------------- trunk/Changes trunk/lib/Smolder.pm Modified: trunk/Changes =================================================================== --- trunk/Changes 2009-03-30 08:41:58 UTC (rev 901) +++ trunk/Changes 2009-03-30 08:43:21 UTC (rev 902) @@ -1,6 +1,9 @@ Revision history for Smolder -1.3 +1.31 (March 30, 2009) + + Fixing some minor Build.PL issues + +1.3 (March 29, 2009) + Rewrite of the build/install system to be installable from CPAN using Module::Build::TAPArchive - M. Peters + Drop MySQL as supported DB platform. Now we just use SQLite - M. Peters Modified: trunk/lib/Smolder.pm =================================================================== --- trunk/lib/Smolder.pm 2009-03-30 08:41:58 UTC (rev 901) +++ trunk/lib/Smolder.pm 2009-03-30 08:43:21 UTC (rev 902) @@ -1,7 +1,7 @@ package Smolder; use File::Spec::Functions qw(catdir); -our $VERSION = '1.30'; +our $VERSION = '1.31'; 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-30 12:06:31
|
Revision: 916 http://smolder.svn.sourceforge.net/smolder/?rev=916&view=rev Author: michael_peters Date: 2009-03-30 12:06:22 +0000 (Mon, 30 Mar 2009) Log Message: ----------- Fix regression where public projects that didnt allow anonymous reports actually would Modified Paths: -------------- trunk/Changes trunk/lib/Smolder/Control/Developer/Projects.pm trunk/lib/Smolder.pm Modified: trunk/Changes =================================================================== --- trunk/Changes 2009-03-30 12:01:34 UTC (rev 915) +++ trunk/Changes 2009-03-30 12:06:22 UTC (rev 916) @@ -1,5 +1,9 @@ Revision history for Smolder +1.32 (March 30, 2009) + + Fix even more build, test, install issues + + Fix regression where public projects that didn't allow anonymous reports actually would. + 1.31 (March 30, 2009) + Fixing some minor Build.PL issues Modified: trunk/lib/Smolder/Control/Developer/Projects.pm =================================================================== --- trunk/lib/Smolder/Control/Developer/Projects.pm 2009-03-30 12:01:34 UTC (rev 915) +++ trunk/lib/Smolder/Control/Developer/Projects.pm 2009-03-30 12:06:22 UTC (rev 916) @@ -156,9 +156,14 @@ return $self->error_message('Project does not exist') unless $project; - # make sure ths developer is a member of this project - unless ($project->public || $project->has_developer($self->developer)) { - return $self->error_message('Unauthorized for this project'); + # make sure ths developer is a member of this project, or it's a public project + # that allows anonymous uploads + if(!$project->has_developer($self->developer)) { + unless($self->public && $project->allow_anon) { + return $self->error_message('Project does not allow anonymous reports'); + } else { + return $self->error_message('Unauthorized for this project'); + } } $tt_params->{project} = $project; Modified: trunk/lib/Smolder.pm =================================================================== --- trunk/lib/Smolder.pm 2009-03-30 12:01:34 UTC (rev 915) +++ trunk/lib/Smolder.pm 2009-03-30 12:06:22 UTC (rev 916) @@ -1,7 +1,7 @@ package Smolder; use File::Spec::Functions qw(catdir); -our $VERSION = '1.31'; +our $VERSION = '1.32'; 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-30 15:13:19
|
Revision: 921 http://smolder.svn.sourceforge.net/smolder/?rev=921&view=rev Author: michael_peters Date: 2009-03-30 15:13:14 +0000 (Mon, 30 Mar 2009) Log Message: ----------- bumping up in version # and gave it a better 1-line description Modified Paths: -------------- trunk/Changes trunk/lib/Smolder.pm Modified: trunk/Changes =================================================================== --- trunk/Changes 2009-03-30 15:08:18 UTC (rev 920) +++ trunk/Changes 2009-03-30 15:13:14 UTC (rev 921) @@ -1,5 +1,8 @@ Revision history for Smolder +1.33 () + + Tell CPAN to not index out private modules where we still want to have POD - M. Peters + 1.32 (March 30, 2009) + Fix even more build, test, install issues + Fix regression where public projects that didn't allow anonymous reports actually would. Modified: trunk/lib/Smolder.pm =================================================================== --- trunk/lib/Smolder.pm 2009-03-30 15:08:18 UTC (rev 920) +++ trunk/lib/Smolder.pm 2009-03-30 15:13:14 UTC (rev 921) @@ -1,7 +1,6 @@ package Smolder; -use File::Spec::Functions qw(catdir); -our $VERSION = '1.32'; +our $VERSION = '1.33'; 1; @@ -9,7 +8,7 @@ =head1 NAME -Smolder - Web-based smoke test aggregator +Smolder - Web-based Continuous Integration Smoke Server =head1 SYNOPSIS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-31 18:18:20
|
Revision: 929 http://smolder.svn.sourceforge.net/smolder/?rev=929&view=rev Author: michael_peters Date: 2009-03-31 18:18:16 +0000 (Tue, 31 Mar 2009) Log Message: ----------- add IPC::Run as part of configure_requires Modified Paths: -------------- trunk/Build.PL trunk/lib/Smolder/Control/Developer/Projects.pm trunk/lib/Smolder/DB/SmokeReport.pm trunk/sql/smoke_report.sql trunk/templates/Developer/Projects/add_report.tmpl trunk/templates/Developer/Projects/smoke_report_details.tmpl trunk/templates/TAP/full_report.tmpl Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2009-03-30 21:36:05 UTC (rev 928) +++ trunk/Build.PL 2009-03-31 18:18:16 UTC (rev 929) @@ -60,14 +60,15 @@ configure_requires => { 'Module::Build' => 0, 'Module::Build::TAPArchive' => 0, + 'IPC::Run' => 0.82, }, build_requires => { 'Test::WWW::Mechanize' => 1.22, 'Test::Builder' => 0.86, 'Test::More' => 0.86, 'LWP::UserAgent' => 0, + 'IPC::Run' => 0.82, 'WWW::Mechanize' => 0, - 'IPC::Run' => 0.82, 'File::Find' => 0, 'File::Copy' => 0, 'Module::Build' => 0, Modified: trunk/lib/Smolder/Control/Developer/Projects.pm =================================================================== --- trunk/lib/Smolder/Control/Developer/Projects.pm 2009-03-30 21:36:05 UTC (rev 928) +++ trunk/lib/Smolder/Control/Developer/Projects.pm 2009-03-31 18:18:16 UTC (rev 929) @@ -221,10 +221,11 @@ my $form = { required => [qw(report_file)], - optional => [qw(architecture platform comments tags)], + optional => [qw(architecture platform comments tags revision)], constraint_methods => { architecture => length_max(255), platform => length_max(255), + revision => length_max(255), comments => length_max(1000), report_file => file_mtype( qw( @@ -252,6 +253,7 @@ architecture => $valid->{architecture}, platform => $valid->{platform}, comments => $valid->{comments}, + revision => $valid->{revision}, ); }; Modified: trunk/lib/Smolder/DB/SmokeReport.pm =================================================================== --- trunk/lib/Smolder/DB/SmokeReport.pm 2009-03-30 21:36:05 UTC (rev 928) +++ trunk/lib/Smolder/DB/SmokeReport.pm 2009-03-31 18:18:16 UTC (rev 929) @@ -540,7 +540,7 @@ # if they weren't provided during the upload if ($meta->{extra_properties}) { foreach my $k (keys %{$meta->{extra_properties}}) { - foreach my $field qw(architecture platform comments) { + foreach my $field qw(architecture platform comments revision) { if (lc($k) eq $field && !$self->get($field)) { $self->set($field => delete $meta->{extra_properties}->{$k}); last; Modified: trunk/sql/smoke_report.sql =================================================================== --- trunk/sql/smoke_report.sql 2009-03-30 21:36:05 UTC (rev 928) +++ trunk/sql/smoke_report.sql 2009-03-31 18:18:16 UTC (rev 929) @@ -18,6 +18,7 @@ duration INTEGER DEFAULT 0, purged INTEGER DEFAULT 0, failed INTEGER DEFAULT 0, + revision TEXT DEFAULT '', CONSTRAINT 'fk_smoke_report_project' FOREIGN KEY ('project') REFERENCES 'project' ('id') ON DELETE CASCADE, CONSTRAINT 'fk_smoke_report_developer' FOREIGN KEY ('developer') REFERENCES 'developer' ('id') ON DELETE CASCADE ); Modified: trunk/templates/Developer/Projects/add_report.tmpl =================================================================== --- trunk/templates/Developer/Projects/add_report.tmpl 2009-03-30 21:36:05 UTC (rev 928) +++ trunk/templates/Developer/Projects/add_report.tmpl 2009-03-31 18:18:16 UTC (rev 929) @@ -20,6 +20,9 @@ [% IF c.dfv_msgs.err_architecture %] Smolder.show_message('warning', 'Architecture must be less than 255 characters.'); [% END %] + [% IF c.dfv_msgs.err_revision %] + Smolder.show_message('warning', 'Revision must be less than 255 characters.'); + [% END %] [% IF c.dfv_msgs.err_platform %] Smolder.show_message('warning', 'Platform must be less than 255 characters.'); [% END %] @@ -64,6 +67,10 @@ </td> </tr> <tr> + <td><label [% IF c.dfv_msgs.err_revision %]class="warn"[% END %]>Revision</label></td> + <td><input type="text" size="25" name="revision" id="revision" value="" /></td> +</tr> +<tr> <td><label class="required[% IF c.dfv_msgs.err_report_file || err_valid_file %] warn[% END %]">Smoke Report File</label></td> <td><input type="file" name="report_file" id="report_file" /></td> </tr> Modified: trunk/templates/Developer/Projects/smoke_report_details.tmpl =================================================================== --- trunk/templates/Developer/Projects/smoke_report_details.tmpl 2009-03-30 21:36:05 UTC (rev 928) +++ trunk/templates/Developer/Projects/smoke_report_details.tmpl 2009-03-31 18:18:16 UTC (rev 929) @@ -72,6 +72,14 @@ <th><span[% IF report.todo %] class="todo"[% END %]># TODO</span></th> <td><span[% IF report.todo %] class="todo"[% END %]>[% report.todo | format_number %]</span></td> </tr> + [% IF report.revision %] + <tr> + <th>Revision</th> + <td><em>[% report.revision | html %]</em></td> + <td> </td> + <td> </td> + </tr> + [% END %] [% IF report.tags.size %] <tr> <th>Tags</th> Modified: trunk/templates/TAP/full_report.tmpl =================================================================== --- trunk/templates/TAP/full_report.tmpl 2009-03-30 21:36:05 UTC (rev 928) +++ trunk/templates/TAP/full_report.tmpl 2009-03-31 18:18:16 UTC (rev 929) @@ -43,6 +43,12 @@ <td>[% report.architecture | html | html_line_break %]</td> </tr> [%- END -%] +[%- IF report.revision -%] +<tr class="[% odd_even %]"> + <th>Revision</th> + <td>[% report.revision | html %]</td> +</tr> +[%- END -%] [% FOREACH k IN extra_properties.keys.sort %] <tr class="[% odd_even %]"> <th>[% k | html %]</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-03-31 18:39:26
|
Revision: 932 http://smolder.svn.sourceforge.net/smolder/?rev=932&view=rev Author: michael_peters Date: 2009-03-31 18:39:24 +0000 (Tue, 31 Mar 2009) Log Message: ----------- reverting some changes that were not ready to commit Modified Paths: -------------- trunk/lib/Smolder/Control/Developer/Projects.pm trunk/lib/Smolder/DB/SmokeReport.pm trunk/sql/smoke_report.sql trunk/templates/Developer/Projects/add_report.tmpl trunk/templates/Developer/Projects/smoke_report_details.tmpl trunk/templates/TAP/full_report.tmpl Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - smolder.conf data Build _build blib *.bak META.yml Smolder-* + smolder.conf data Build _build blib *.bak Smolder-* Modified: trunk/lib/Smolder/Control/Developer/Projects.pm =================================================================== --- trunk/lib/Smolder/Control/Developer/Projects.pm 2009-03-31 18:32:26 UTC (rev 931) +++ trunk/lib/Smolder/Control/Developer/Projects.pm 2009-03-31 18:39:24 UTC (rev 932) @@ -221,11 +221,10 @@ my $form = { required => [qw(report_file)], - optional => [qw(architecture platform comments tags revision)], + optional => [qw(architecture platform comments tags)], constraint_methods => { architecture => length_max(255), platform => length_max(255), - revision => length_max(255), comments => length_max(1000), report_file => file_mtype( qw( @@ -253,7 +252,6 @@ architecture => $valid->{architecture}, platform => $valid->{platform}, comments => $valid->{comments}, - revision => $valid->{revision}, ); }; Modified: trunk/lib/Smolder/DB/SmokeReport.pm =================================================================== --- trunk/lib/Smolder/DB/SmokeReport.pm 2009-03-31 18:32:26 UTC (rev 931) +++ trunk/lib/Smolder/DB/SmokeReport.pm 2009-03-31 18:39:24 UTC (rev 932) @@ -540,7 +540,7 @@ # if they weren't provided during the upload if ($meta->{extra_properties}) { foreach my $k (keys %{$meta->{extra_properties}}) { - foreach my $field qw(architecture platform comments revision) { + foreach my $field qw(architecture platform comments) { if (lc($k) eq $field && !$self->get($field)) { $self->set($field => delete $meta->{extra_properties}->{$k}); last; Modified: trunk/sql/smoke_report.sql =================================================================== --- trunk/sql/smoke_report.sql 2009-03-31 18:32:26 UTC (rev 931) +++ trunk/sql/smoke_report.sql 2009-03-31 18:39:24 UTC (rev 932) @@ -18,7 +18,6 @@ duration INTEGER DEFAULT 0, purged INTEGER DEFAULT 0, failed INTEGER DEFAULT 0, - revision TEXT DEFAULT '', CONSTRAINT 'fk_smoke_report_project' FOREIGN KEY ('project') REFERENCES 'project' ('id') ON DELETE CASCADE, CONSTRAINT 'fk_smoke_report_developer' FOREIGN KEY ('developer') REFERENCES 'developer' ('id') ON DELETE CASCADE ); Modified: trunk/templates/Developer/Projects/add_report.tmpl =================================================================== --- trunk/templates/Developer/Projects/add_report.tmpl 2009-03-31 18:32:26 UTC (rev 931) +++ trunk/templates/Developer/Projects/add_report.tmpl 2009-03-31 18:39:24 UTC (rev 932) @@ -20,9 +20,6 @@ [% IF c.dfv_msgs.err_architecture %] Smolder.show_message('warning', 'Architecture must be less than 255 characters.'); [% END %] - [% IF c.dfv_msgs.err_revision %] - Smolder.show_message('warning', 'Revision must be less than 255 characters.'); - [% END %] [% IF c.dfv_msgs.err_platform %] Smolder.show_message('warning', 'Platform must be less than 255 characters.'); [% END %] @@ -67,10 +64,6 @@ </td> </tr> <tr> - <td><label [% IF c.dfv_msgs.err_revision %]class="warn"[% END %]>Revision</label></td> - <td><input type="text" size="25" name="revision" id="revision" value="" /></td> -</tr> -<tr> <td><label class="required[% IF c.dfv_msgs.err_report_file || err_valid_file %] warn[% END %]">Smoke Report File</label></td> <td><input type="file" name="report_file" id="report_file" /></td> </tr> Modified: trunk/templates/Developer/Projects/smoke_report_details.tmpl =================================================================== --- trunk/templates/Developer/Projects/smoke_report_details.tmpl 2009-03-31 18:32:26 UTC (rev 931) +++ trunk/templates/Developer/Projects/smoke_report_details.tmpl 2009-03-31 18:39:24 UTC (rev 932) @@ -72,14 +72,6 @@ <th><span[% IF report.todo %] class="todo"[% END %]># TODO</span></th> <td><span[% IF report.todo %] class="todo"[% END %]>[% report.todo | format_number %]</span></td> </tr> - [% IF report.revision %] - <tr> - <th>Revision</th> - <td><em>[% report.revision | html %]</em></td> - <td> </td> - <td> </td> - </tr> - [% END %] [% IF report.tags.size %] <tr> <th>Tags</th> Modified: trunk/templates/TAP/full_report.tmpl =================================================================== --- trunk/templates/TAP/full_report.tmpl 2009-03-31 18:32:26 UTC (rev 931) +++ trunk/templates/TAP/full_report.tmpl 2009-03-31 18:39:24 UTC (rev 932) @@ -43,12 +43,6 @@ <td>[% report.architecture | html | html_line_break %]</td> </tr> [%- END -%] -[%- IF report.revision -%] -<tr class="[% odd_even %]"> - <th>Revision</th> - <td>[% report.revision | html %]</td> -</tr> -[%- END -%] [% FOREACH k IN extra_properties.keys.sort %] <tr class="[% odd_even %]"> <th>[% k | html %]</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-04-02 01:24:18
|
Revision: 933 http://smolder.svn.sourceforge.net/smolder/?rev=933&view=rev Author: michael_peters Date: 2009-04-02 01:24:08 +0000 (Thu, 02 Apr 2009) Log Message: ----------- fix more build issues as reported by Gabor Modified Paths: -------------- trunk/Build.PL trunk/Changes trunk/bin/smolder trunk/lib/Smolder/Build.pm trunk/lib/Smolder/Server.pm Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2009-03-31 18:39:24 UTC (rev 932) +++ trunk/Build.PL 2009-04-02 01:24:08 UTC (rev 933) @@ -5,8 +5,6 @@ use lib 'lib'; use Smolder::Build; -my $SHARE_DIR = catdir($Config{installsitelib}, 'auto', 'share', 'Smolder'); - my $builder = Smolder::Build->new( module_name => 'Smolder', license => 'perl', @@ -61,6 +59,8 @@ 'Module::Build' => 0, 'Module::Build::TAPArchive' => 0, 'IPC::Run' => 0.82, + 'WWW::Mechanize' => 0, + 'LWP::UserAgent' => 0, }, build_requires => { 'Test::WWW::Mechanize' => 1.22, @@ -74,11 +74,6 @@ 'Module::Build' => 0, 'Module::Build::TAPArchive' => 0, }, - install_path => { - templates => catdir($SHARE_DIR, 'templates'), - sql => catdir($SHARE_DIR, 'sql'), - htdocs => catdir($SHARE_DIR, 'htdocs'), - }, add_to_cleanup => ['data/*', 'logs/*', 'Smolder-*'], meta_add => { no_index => { Modified: trunk/Changes =================================================================== --- trunk/Changes 2009-03-31 18:39:24 UTC (rev 932) +++ trunk/Changes 2009-04-02 01:24:08 UTC (rev 933) @@ -1,5 +1,14 @@ Revision history for Smolder +1.34 + + IPC::Run, LWP::UserAgent and WWW::Mechanize should be listed as part of + configure_requires - G. Szabo, M. Peters + + Load IPC::Run, LWP::UserAgent and WWW::Mechanize conditionally in Build.PL + in case configure_requires is ignored - G. Szabo, M. Peters + + Run the smolder binary in blib/ instead of bin/ during tests - G. Szabo + + Install shared data into /blib/lib/auto so it goes into the right shared dir + even when using a different install_base - G. Szabo, M. Peters + 1.33 (March 30, 2009) + Tell CPAN to not index out private modules where we still want to have POD - M. Peters + Fix RT#44683 - M. Peters Modified: trunk/bin/smolder =================================================================== --- trunk/bin/smolder 2009-03-31 18:39:24 UTC (rev 932) +++ trunk/bin/smolder 2009-04-02 01:24:08 UTC (rev 933) @@ -50,4 +50,4 @@ $ENV{SMOLDER_CONF} = $conf if $conf; require Smolder::Server; -Smolder::Server->new(daemon => $daemon)->go(); +Smolder::Server->new(daemon => $daemon)->start(); Modified: trunk/lib/Smolder/Build.pm =================================================================== --- trunk/lib/Smolder/Build.pm 2009-03-31 18:39:24 UTC (rev 932) +++ trunk/lib/Smolder/Build.pm 2009-04-02 01:24:08 UTC (rev 933) @@ -5,10 +5,9 @@ use File::Temp; use Cwd qw(cwd); use File::Spec::Functions qw(catdir catfile tmpdir curdir rel2abs abs2rel splitdir); -use LWP::UserAgent; -use WWW::Mechanize; use File::Find (); use File::Copy qw(copy); +use File::Path qw(make_path); my $HOSTNAME = 'localhost.localdomain'; my $PORT = '112234'; @@ -16,6 +15,10 @@ BEGIN { eval { require IPC::Run }; die "IPC::Run needed to run Smolder build: $@" if $@; + eval { require LWP::UserAgent }; + die "LWP::UserAgent neede to run Smolder build: $@" if $@; + eval { require WWW::Mechanize }; + die "WWW::Mechanize neede to run Smolder build: $@" if $@; } =head1 NAME @@ -77,7 +80,7 @@ # start the smolder server my ($in, $out, $err); $ENV{PERL5LIB} = catdir($cwd, 'blib', 'lib'); - my $subprocess = IPC::Run::start([catfile($cwd, 'bin', 'smolder')], \$in, \$out, \$err); + my $subprocess = IPC::Run::start([catfile($cwd, 'blib', 'script', 'smolder')], \$in, \$out, \$err); my $tries = 0; warn "Waiting for Smolder to start...\n"; while (!_is_smolder_running() && $tries < 7) { @@ -263,10 +266,10 @@ my $cwd = cwd(); my $start_dir = rel2abs(catdir(curdir, $type)); my $start_dir_length = scalar splitdir($start_dir); - my $dest_dir = rel2abs(catdir(curdir, 'blib', $type)); + my $dest_dir = rel2abs(catdir(curdir, 'blib', 'lib', 'auto', 'share', 'Smolder', $type)); unless (-d $dest_dir) { - mkdir $dest_dir or die "Could not create directory $dest_dir: $!"; + make_path($dest_dir) or die "Could not create directory $dest_dir: $!"; } File::Find::find( Modified: trunk/lib/Smolder/Server.pm =================================================================== --- trunk/lib/Smolder/Server.pm 2009-03-31 18:39:24 UTC (rev 932) +++ trunk/lib/Smolder/Server.pm 2009-04-02 01:24:08 UTC (rev 933) @@ -32,7 +32,7 @@ print "$line\n$banner\n"; } -sub go { +sub start { my $self = shift; unless (-e Smolder::DB->db_file) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2009-04-02 13:46:37
|
Revision: 935 http://smolder.svn.sourceforge.net/smolder/?rev=935&view=rev Author: michael_peters Date: 2009-04-02 13:46:30 +0000 (Thu, 02 Apr 2009) Log Message: ----------- ripping out the old config system and going with something simpler with sane defaults; now a smolder.conf file is not needed but will be loaded if asked for (either passing -c to bin/smolder or $ENV{SMOLDER_CONF} Modified Paths: -------------- trunk/Build.PL trunk/TODO trunk/bin/smolder trunk/lib/Smolder/Build.pm trunk/lib/Smolder/Conf.pm trunk/lib/Smolder/Control.pm trunk/lib/Smolder/DB/Project.pm trunk/lib/Smolder/DB/SmokeReport.pm trunk/lib/Smolder/DB.pm trunk/lib/Smolder/Email.pm trunk/lib/Smolder/Server.pm trunk/lib/Smolder/TAPHTMLMatrix.pm trunk/lib/Smolder/TestData.pm trunk/lib/Smolder/Upgrade/V1_1.pm trunk/lib/Smolder/Upgrade.pm trunk/t/conf.t Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/Build.PL 2009-04-02 13:46:30 UTC (rev 935) @@ -22,7 +22,6 @@ 'Class::DBI' => 3.0, 'Class::DBI::SQLite' => 0, 'Class::DBI::Plugin::RetrieveAll' => 1.04, - 'Config::ApacheFormat' => 0, 'Data::FormValidator' => 4.61, 'Data::FormValidator::Constraints::DateTime' => 1.09, 'Data::Random' => 0.05, @@ -58,9 +57,6 @@ configure_requires => { 'Module::Build' => 0, 'Module::Build::TAPArchive' => 0, - 'IPC::Run' => 0.82, - 'WWW::Mechanize' => 0, - 'LWP::UserAgent' => 0, }, build_requires => { 'Test::WWW::Mechanize' => 1.22, Modified: trunk/TODO =================================================================== --- trunk/TODO 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/TODO 2009-04-02 13:46:30 UTC (rev 935) @@ -1,13 +1,11 @@ TODO tasks for Smolder ++ Change ProjectFullReportsMax to be a per-project field + + Add support for dev releases to CPAN + get /static urls working for better caching by the browser -+ reasonable defaults for all config vars so that smolder.conf isn't needed - but can be used if you want. Also allow all config vars to be set using - command line options to smolder itself - + Plugins that support + adding and overriding templates and htdocs + adding sql tables Modified: trunk/bin/smolder =================================================================== --- trunk/bin/smolder 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/bin/smolder 2009-04-02 13:46:30 UTC (rev 935) @@ -3,6 +3,8 @@ use warnings; use Getopt::Long; use Pod::Usage; +use Smolder::Conf; +use File::Spec::Functions qw(catdir); =head1 NAME @@ -28,26 +30,54 @@ =item --conf (-c) -Specify a smolder.conf config file. Smolder looks in several -places for config files but if you want to put it someplace -else then you can. +Specify a smolder.conf config file. -=item --help (-h) +=item --port (-p) +Specify the port from which Smolder will server requests. Defaults to 8080 + +=item --host (-h) + +The hostname that Smolder will use when running. Defaults to localhost@localdomain + +=item --data_dir + +The data directory that Smolder will use. Defaults to $HOME/.smolder (or equivalent) + +=item --share_dir + +The shared directory that Smolder will use for read-only things like templates, css, images and sql files + +=item --help + Show the help screen. =back =cut -my ($conf, $daemon, $help); +my ($conf, $daemon, $help, $port, $host, $data_dir, $share_dir); GetOptions( - 'conf|c=s' => \$conf, - 'daemon|d' => \$daemon, - 'help|h' => \$help, + 'conf|c=s' => \$conf, + 'daemon|d' => \$daemon, + 'port|p=s' => \$port, + 'host|h=s' => \$host, + 'data_dir=s' => \$data_dir, + 'share_dir=s' => \$share_dir, + 'help' => \$help, ); pod2usage(1) if $help; -$ENV{SMOLDER_CONF} = $conf if $conf; +my %conf_values; +$conf_values{Port} = $port if $port; +$conf_values{HostName} = $host if $host; +$conf_values{DataDir} = $data_dir if $data_dir; +if ($share_dir) { + $conf_values{TemplateDir} = catdir($share_dir, 'templates'); + $conf_values{SQLDir} = catdir($share_dir, 'sql'); + $conf_values{HtdocsDir} = catdir($share_dir, 'htdocs'); +} +Smolder::Conf->init_from_file($conf) if $conf; +Smolder::Conf->init(%conf_values) if %conf_values; require Smolder::Server; Smolder::Server->new(daemon => $daemon)->start(); Modified: trunk/lib/Smolder/Build.pm =================================================================== --- trunk/lib/Smolder/Build.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/Build.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -7,20 +7,11 @@ use File::Spec::Functions qw(catdir catfile tmpdir curdir rel2abs abs2rel splitdir); use File::Find (); use File::Copy qw(copy); -use File::Path qw(make_path); +use File::Path qw(mkpath); +my $PORT = '112234'; my $HOSTNAME = 'localhost.localdomain'; -my $PORT = '112234'; -BEGIN { - eval { require IPC::Run }; - die "IPC::Run needed to run Smolder build: $@" if $@; - eval { require LWP::UserAgent }; - die "LWP::UserAgent neede to run Smolder build: $@" if $@; - eval { require WWW::Mechanize }; - die "WWW::Mechanize neede to run Smolder build: $@" if $@; -} - =head1 NAME Smolder::Build @@ -53,40 +44,56 @@ my ($self, $action) = @_; my $cwd = cwd(); - # create a temporary database - my $tmp_dir = File::Temp->newdir(template => 'smolder-XXXXXX'); - my $conf = - "Port $PORT\nHostname $HOSTNAME\n" - . "FromAddress smolder\@$HOSTNAME\nSecret ad01i11932lsk\n" + # create a temporary database and conf file + my $tmp_dir = File::Temp->newdir(template => 'smolder-XXXXXX'); + my $share_dir = $self->_share_blib_dir; + my $tmp_conf = File::Temp->new(template => 'smolder-XXXXXX', suffix => '.conf', dir => tmpdir); + my $log_dir = rel2abs(catdir(curdir, 'blib', 'logs')); + mkpath($log_dir) unless -d $log_dir; + + my $conf = "HostName '$HOSTNAME'\nPort '$PORT'\n" . "TemplateDir '" - . catdir($cwd, 'templates') . "'\n" + . catdir($share_dir, 'templates') . "'\n" . "HtdocsDir '" - . catdir($cwd, 'htdocs') . "'\n" + . catdir($share_dir, 'htdocs') . "'\n" . "SQLDir '" - . catdir($cwd, 'sql') . "'\n" + . catdir($share_dir, 'sql') . "'\n" . "DataDir '" - . $tmp_dir->dirname . "'\n"; - - my $tmp_conf = File::Temp->new(template => 'smolder-XXXXXX', suffix => '.conf', dir => tmpdir); + . $tmp_dir->dirname . "'\n" + . "LogFile '" . catdir($log_dir, 'smolder.log') . "'\n"; print $tmp_conf $conf; close $tmp_conf; - $ENV{SMOLDER_CONF} = $tmp_conf->filename; - $ENV{SMOLDER_TEST_HARNESS_ACTIVE} = 1; + $ENV{SMOLDER_CONF} = $tmp_conf->filename; # make sure we create a DB first. Smolder will do this when it starts, # but we still want to run some tests even if we fail to start smolder $self->depends_on('db'); + # our code needs to know it's running under the test harness + $ENV{SMOLDER_TEST_HARNESS_ACTIVE} = 1; + # start the smolder server my ($in, $out, $err); $ENV{PERL5LIB} = catdir($cwd, 'blib', 'lib'); - my $subprocess = IPC::Run::start([catfile($cwd, 'blib', 'script', 'smolder')], \$in, \$out, \$err); + my @cmd = ( + $^X, + catfile($cwd, 'blib', 'script', 'smolder'), + '--host' => $HOSTNAME, + '--port' => $PORT, + ); + eval { require IPC::Run }; + die "IPC::Run needed to run Smolder test: $@" if $@; + my $subprocess = IPC::Run::start(\@cmd, \$in, \$out, \$err); my $tries = 0; warn "Waiting for Smolder to start...\n"; while (!_is_smolder_running() && $tries < 7) { sleep(3); $tries++; } + if( !_is_smolder_running()) { + warn "Could not start Smolder server: $err\n"; + warn "Trying tests anyway.\n"; + } my $method = "SUPER::ACTION_$action"; eval { @@ -108,6 +115,8 @@ my $url = "http://$HOSTNAME:$PORT/app"; # Create a user agent object + eval { require LWP::UserAgent }; + die "LWP::UserAgent neede to run Smolder tests: $@" if $@; my $ua = LWP::UserAgent->new; $ua->timeout(4); my $res = $ua->get($url); @@ -137,6 +146,8 @@ $self->ACTION_test_archive(); # now send the results off to smolder + eval { require WWW::Mechanize }; + die "WWW::Mechanize neede to run Smolder smoke: $@" if $@; my $mech = WWW::Mechanize->new(); $mech->get("$p->{server}/app"); unless ($mech->status eq '200') { @@ -266,11 +277,9 @@ my $cwd = cwd(); my $start_dir = rel2abs(catdir(curdir, $type)); my $start_dir_length = scalar splitdir($start_dir); - my $dest_dir = rel2abs(catdir(curdir, 'blib', 'lib', 'auto', 'share', 'Smolder', $type)); + my $dest_dir = catdir($self->_share_blib_dir, $type); - unless (-d $dest_dir) { - make_path($dest_dir) or die "Could not create directory $dest_dir: $!"; - } + mkpath($dest_dir) or die "Could not create directory $dest_dir: $!" unless -d $dest_dir; File::Find::find( sub { @@ -280,9 +289,9 @@ my $name = $_; my @new_dirs = splitdir($File::Find::dir); @new_dirs = @new_dirs[$start_dir_length .. $#new_dirs]; - my $full_path; + my $full_path = $dest_dir; foreach my $new_dir (@new_dirs) { - $full_path = catdir($dest_dir, $new_dir); + $full_path = catdir($full_path, $new_dir); unless (-d $full_path) { mkdir($full_path) or die "Could not create directory $full_path: $!"; } @@ -298,4 +307,8 @@ ); } +sub _share_blib_dir { + return rel2abs(catdir(curdir, 'blib', 'lib', 'auto', 'share', 'dist', 'Smolder')); +} + 1; Modified: trunk/lib/Smolder/Conf.pm =================================================================== --- trunk/lib/Smolder/Conf.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/Conf.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -2,39 +2,38 @@ use strict; use warnings; use File::Spec::Functions qw(catfile catdir rel2abs curdir); -use File::ShareDir qw(module_dir); +use File::ShareDir qw(dist_dir); use File::HomeDir; use File::Basename qw(dirname); use Carp qw(croak); use Config::ApacheFormat; -use Cwd qw(fastcwd); -use IO::Scalar; use Smolder; -# all valid configuration directives must be listed here -our (@VALID_DIRECTIVES, @REQUIRED_DIRECTIVES); +sub _random_secret { + my $length = int(rand(5) + 10); + my $secret = ''; + my @chars = ('a'..'z', 'A'..'Z', 0..9); + $secret .= $chars[int(rand($#chars + 1))] for(0..$length); + return $secret; +} +my %VALUES; + BEGIN { - @VALID_DIRECTIVES = map { lc($_) } qw( - Port - FromAddress - HostName - LogFile - Secret - SMTPHost - ProjectFullReportsMax - TemplateDir - DataDir - HtdocsDir - SQLDir + my $share_dir = dist_dir('Smolder'); + %VALUES = ( + Port => 8080, + HostName => 'localhost.localdomain', + FromAddress => 'smolder@localhost.localdomain', + SMTPHost => 'localhost.localdomain', + ProjectFullReportsMax => 0, + LogFile => '', + TemplateDir => catdir($share_dir, 'templates'), + DataDir => catdir(File::HomeDir->my_data, '.smolder'), + HtdocsDir => catdir($share_dir, 'htdocs'), + SQLDir => catdir($share_dir, 'sql'), + Secret => _random_secret(), ); - - @REQUIRED_DIRECTIVES = qw( - Port - FromAddress - HostName - Secret - ); } =head1 NAME @@ -53,183 +52,105 @@ # or you can access them as methods in the Smolder::Conf module $port = Smolder::Conf->Port; -=head1 DESCRIPTION - -This module provides access to the configuration settings in -F<smolder.conf>. - -Full details on all configuration parameters is available in the -configuration document, which you can find at F<docs/configuration>. - -=cut - -# package variables -our $CONF; - -# look for the file in various places. Return the first one that exists -sub _conf_file_path { - if ($ENV{SMOLDER_CONF}) { - return $ENV{SMOLDER_CONF}; - } elsif ($ENV{SMOLDER_ROOT}) { - my $conf_file = catfile($ENV{SMOLDER_ROOT}, 'conf', 'smolder.conf'); - return $conf_file if -e $conf_file; - } - - my @paths = ( - rel2abs(curdir), - catdir('', 'usr', 'local', 'smolder', 'conf'), - catdir('', 'etc', 'smolder'), - catdir('', 'etc'), + # give Smolder::Conf some values to override the defaults + Smolder::Conf->init( + Secret => '1Adxd23023s', + Port => 80, + HostName => 'smolder.myorg.com', + LogFile => '/path/to/logs', ); - foreach my $path (@paths) { - my $conf_file = catfile($path, 'smolder.conf'); - return $conf_file if -e $conf_file; - } - # if we got here then something is wrong - croak(<<CROAK); + # pull the conf values from a file + Smolder::Conf->init_from_file('/path/to/conf/file'); -Unable to find smolder.conf! -We will look for it in the following order: +=head1 DESCRIPTION - \$CWD/smolder.conf - \$SMOLDER_ROOT/conf/smolder.conf - /usr/local/smolder/conf/smolder.conf - /etc/smolder/smolder.conf - /etc/smolder.conf - -Or can optionally be designated by using the SMOLDER_CONF environment variable. +This module provides access to the configuration settings in +F<smolder.conf>. Smolder tries to have reasonable defaults but they +can be overridden when needed. -CROAK -} - -# internal routine to load the conf file. Called by a BEGIN during -# startup, and used during testing. -sub _load { - - # find a default conf file - my $conf_file = _conf_file_path(); - - # load conf file into package global - eval { - our $CONF = Config::ApacheFormat->new(valid_directives => \@VALID_DIRECTIVES,); - $CONF->read($conf_file); - }; - croak("Unable to read config file '$conf_file'. Error was: $@") - if $@; - croak("Unable to read config file '$conf_file'.") - unless $CONF; -} - -# load the configuration file during startup -BEGIN { _load(); } - =head1 METHODS -=head2 get_config +=head2 init -Class method that returns the underlying L<Config::ApacheFormat> object. +Override the configuration defaults by providing named-value pairs: -=cut + Smolder::Conf->init( + Secret => '1Adxd23023s', + Port => 80, + HostName => 'smolder.myorg.com', + LogFile => '/path/to/logs', + ); -sub get_config { - return $CONF; -} - -=head2 get - - -Given a directive name, returns the value (which may be a list) of a configuration directive. -Directive names are case-insensitive. - - $value = Smolder::Conf->get("DirectiveName") - - @values = Smolder::Conf->get("DirectiveName") - =cut -sub get { - return $CONF->get($_[1]); +sub init { + my ($class, %args) = @_; + foreach my $key (keys %args) { + if( exists $VALUES{$key} ) { + $VALUES{$key} = $args{$key}; + } else { + croak "$key is not a valid Smolder config parameter!"; + } + } } -=head2 check +=head2 init_from_file -Sanity-check Smolder configuration. This will croak() with an error -message if something is wrong with the configuration file. +Override the configuration defaults by providing a file. Config files are simple +lists of name-values pairs. One pair per-line and each name/value is separated by +whitespace: -This is run when the Smolder::Conf loads unless the environment variable -"SMOLDER_CONF_NOCHECK" is set to a true value. + HostName smolder.test + DataDir /var/lib/smolder/ + Port 80 + FromAddress smolder@smolder.test + TemplateDir /var/share/smolder/templates + HtdocsDir /var/share/smolder/htdocs + SQLDir /var/share/smolder/sql =cut -sub check { - my $pkg = shift; +sub init_from_file { + my ($class, $file) = @_; + croak "Config file $file does not exist!" unless -e $file; + croak "Config file $file is not readable!" unless -r $file; - # check required directives - foreach my $dir (@REQUIRED_DIRECTIVES) { - _broked("Missing required $dir directive") - unless defined $CONF->get($dir); - } - - # if we have a log file, does it exist and can we write to it? - my $log_file = $CONF->get('LogFile'); - if ($log_file) { - if (-e $log_file && -f $log_file) { - broked("We can't write to log file $log_file") unless -r $log_file; - } else { - open(my $LOG, '>>', $log_file) or _broked("Could not create log file $log_file! $!"); - print $LOG ''; - close($LOG); + open(my $FH, '<', $file) or croak "Could not open file $file for reading: $!"; + my %values; + while(my $line = <$FH>) { + # only get lines that look like name-value pairs but not comments + if( $line !~ /\s*#/ && $line =~ /(\S+)\s+(\S+)/ ) { + # strip off any quotes + my ($key, $val) = ($1, $2); + $val =~ s/^'(.*)'$/$1/; + $val =~ s/^"(.*)"$/$1/; + $values{$key} = $val; } } + $class->init(%values); } -=head2 template_dir - -The directory path for the templates for this install of Smolder - -=cut - -sub template_dir { - my $class = shift; - return $class->get('TemplateDir') || catdir(module_dir('Smolder'), 'templates'); +BEGIN { + __PACKAGE__->init_from_file($ENV{SMOLDER_CONF}) if $ENV{SMOLDER_CONF}; } -=head2 htdocs_dir +=head2 get -The directory path for the htdocs for this install of Smolder +Given a directive name, returns the value (which may be a list) of a configuration directive. +Directive names are case-insensitive. -=cut + $value = Smolder::Conf->get('DirectiveName'); -sub htdocs_dir { - my $class = shift; - return $class->get('HtdocsDir') || catdir(module_dir('Smolder'), 'htdocs'); -} - -=head2 sql_dir - -The directory path for the raw SQL files for this install of Smolder - =cut -sub sql_dir { - my $class = shift; - return $class->get('SQLDir') || catdir(module_dir('Smolder'), 'sql'); -} - -=head2 data_dir - -The directory path for data directory for this install of Smolder - -=cut - -sub data_dir { - my $class = shift; - my $dir = $class->get('DataDir') || catdir(File::HomeDir->my_data, '.smolder'); - if (!-d $dir) { - mkdir($dir) or _broked("Can't create data directory $dir! $!"); +sub get { + my ($class, $key) = @_; + if( exists $VALUES{$key} ) { + return $VALUES{$key}; + } else { + croak "$key is not a valid Smolder config parameter!"; } - return $dir; } =head2 test_data_dir @@ -287,12 +208,4 @@ } } -sub _broked { - warn("Error found in smolder.conf: $_[0].\n"); - exit(1); -} - -# run the check ASAP, unless we're in upgrade mode -BEGIN { __PACKAGE__->check() unless ($ENV{SMOLDER_CONF_NOCHECK}) } - 1; Modified: trunk/lib/Smolder/Control.pm =================================================================== --- trunk/lib/Smolder/Control.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/Control.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -8,11 +8,10 @@ use CGI::Application::Plugin::JSON qw(:all); use Template::Plugin::Cycle; use CGI::Cookie; - #use CGI::Application::Plugin::DebugScreen; use Smolder; use Smolder::Util; -use Smolder::Conf qw(HostName LogFile); +use Smolder::Conf qw(HostName LogFile TemplateDir); use Smolder::DB::Developer; use Smolder::DB::Project; use File::Spec::Functions qw(catdir catfile tmpdir); @@ -325,7 +324,7 @@ my $TT_CONFIG = { TEMPLATE_OPTIONS => { COMPILE_DIR => tmpdir(), - INCLUDE_PATH => Smolder::Conf->template_dir, + INCLUDE_PATH => TemplateDir, COMPILE_EXT => '.ttc', WRAPPER => 'wrapper.tmpl', RECURSION => 1, Modified: trunk/lib/Smolder/DB/Project.pm =================================================================== --- trunk/lib/Smolder/DB/Project.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/DB/Project.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -3,7 +3,7 @@ use warnings; use base 'Smolder::DB'; use Smolder::DB::Developer; -use Smolder::Conf qw(ProjectFullReportsMax); +use Smolder::Conf qw(ProjectFullReportsMax DataDir); use File::Path; use File::Spec::Functions qw(catdir); use DateTime::Format::MySQL; @@ -41,7 +41,7 @@ __PACKAGE__->add_trigger( after_delete => sub { my $self = shift; - my $dir = catdir(Smolder::Conf->data_dir, 'smoke_reports', $self->id); + my $dir = catdir(DataDir, 'smoke_reports', $self->id); rmtree($dir) if (-d $dir); } ); Modified: trunk/lib/Smolder/DB/SmokeReport.pm =================================================================== --- trunk/lib/Smolder/DB/SmokeReport.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/DB/SmokeReport.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -2,7 +2,7 @@ use strict; use warnings; use base 'Smolder::DB'; -use Smolder::Conf; +use Smolder::Conf qw(DataDir); use Smolder::Email; use File::Spec::Functions qw(catdir catfile); use File::Path qw(mkpath rmtree); @@ -145,7 +145,7 @@ sub data_dir { my $self = shift; - my $dir = catdir(Smolder::Conf->data_dir, 'smoke_reports', $self->project->id, $self->id); + my $dir = catdir(DataDir, 'smoke_reports', $self->project->id, $self->id); # create it if it doesn't exist mkpath($dir) if (!-d $dir); Modified: trunk/lib/Smolder/DB.pm =================================================================== --- trunk/lib/Smolder/DB.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/DB.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -1,8 +1,8 @@ package Smolder::DB; use strict; use warnings; -use Smolder::Conf; use base 'Class::DBI::SQLite'; +use Smolder::Conf qw(SQLDir DataDir); use DBI; use Class::DBI::Plugin::RetrieveAll; use File::Spec::Functions qw(catfile); @@ -214,7 +214,7 @@ =cut sub db_file { - return catfile(Smolder::Conf->data_dir, "smolder.sqlite"); + return catfile(DataDir, "smolder.sqlite"); } =head2 run_sql_file @@ -367,11 +367,10 @@ open(FH, ">$file") or die "Could not open file '$file' for writing: $!"; close(FH) or die "Could not close file '$file': $!"; - my $sql_dir = Smolder::Conf->sql_dir; - my @files = glob("$sql_dir/*.sql"); - foreach my $file (@files) { - eval { $class->run_sql_file($file) }; - die "Couldn't load SQL file $file! $@" if $@; + my @files = glob(catfile(SQLDir, '*.sql')); + foreach my $f (@files) { + eval { $class->run_sql_file($f) }; + die "Couldn't load SQL file $f! $@" if $@; } # Set the db_version Modified: trunk/lib/Smolder/Email.pm =================================================================== --- trunk/lib/Smolder/Email.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/Email.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -1,5 +1,5 @@ package Smolder::Email; -use Smolder::Conf qw(HostName FromAddress SMTPHost Port); +use Smolder::Conf qw(HostName FromAddress SMTPHost Port TemplateDir); use File::Spec::Functions qw(catdir tmpdir); use Template; use MIME::Lite; @@ -22,7 +22,7 @@ our $TEMPLATE = Template->new( COMPILE_DIR => tmpdir(), - INCLUDE_PATH => Smolder::Conf->template_dir, + INCLUDE_PATH => TemplateDir, COMPILE_EXT => '.ttc', WRAPPER => 'Email/wrapper.tmpl', FILTERS => { Modified: trunk/lib/Smolder/Server.pm =================================================================== --- trunk/lib/Smolder/Server.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/Server.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -3,7 +3,7 @@ use warnings; use base 'CGI::Application::Server'; use File::Spec::Functions qw(catdir devnull); -use Smolder::Conf qw(Port HostName LogFile); +use Smolder::Conf qw(Port HostName LogFile HtdocsDir); use Smolder::DB; sub new { @@ -11,15 +11,14 @@ my $server = $class->SUPER::new(@_); $server->host(HostName); $server->port(Port); - my $htdocs = Smolder::Conf->htdocs_dir; $server->entry_points( { '/' => 'Smolder::Redirect', '/app' => 'Smolder::Dispatch', - '/js' => $htdocs, - '/style' => $htdocs, - '/images' => $htdocs, + '/js' => HtdocsDir, + '/style' => HtdocsDir, + '/images' => HtdocsDir, }, ); $server->{"__smolder_$_"} = $args{$_} foreach keys %args; Modified: trunk/lib/Smolder/TAPHTMLMatrix.pm =================================================================== --- trunk/lib/Smolder/TAPHTMLMatrix.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/TAPHTMLMatrix.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -6,14 +6,14 @@ use File::Path; use URI::file; use Template; -use Smolder::Conf; +use Smolder::Conf qw(TemplateDir); use Smolder::Control; use Template::Plugin::Cycle; our $TMPL = Template->new( COMPILE_DIR => tmpdir(), COMPILE_EXT => '.ttc', - INCLUDE_PATH => Smolder::Conf->template_dir, + INCLUDE_PATH => TemplateDir, FILTERS => { pass_fail_color => \&Smolder::Util::pass_fail_color, format_time => \&Smolder::Util::format_time, Modified: trunk/lib/Smolder/TestData.pm =================================================================== --- trunk/lib/Smolder/TestData.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/TestData.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -2,14 +2,12 @@ use strict; use warnings; use base 'Exporter'; -use Smolder::Conf qw(HostName Port URLPrefix); +use Smolder::Conf qw(HostName Port); use Smolder::DB; use File::Spec::Functions qw(catfile); use File::Copy qw(copy); use LWP::UserAgent; -our $config = Smolder::Conf->get_config(); - our @EXPORT_OK = qw( create_project delete_projects @@ -280,7 +278,7 @@ =cut sub base_url { - return 'http://' . HostName . ':' . Port . (URLPrefix || '') . '/app'; + return 'http://' . HostName . ':' . Port . '/app'; } =head2 db_field_value Modified: trunk/lib/Smolder/Upgrade/V1_1.pm =================================================================== --- trunk/lib/Smolder/Upgrade/V1_1.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/Upgrade/V1_1.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -4,7 +4,7 @@ use base 'Smolder::Upgrade'; use File::Path qw(rmtree); use File::Spec::Functions qw(catdir); -use Smolder::Conf; +use Smolder::Conf qw(DataDir); sub pre_db_upgrade { } @@ -21,10 +21,10 @@ } # remove the old HTML reports in the old format - rmtree(catdir(Smolder::Conf->data_dir, 'html_smoke_reports')); + rmtree(catdir(DataDir, 'html_smoke_reports')); # remove the old XML reports - my $report_dir = catdir(Smolder::Conf->data_dir, 'smoke_reports'); + my $report_dir = catdir(DataDir, 'smoke_reports'); rmtree($report_dir); mkdir($report_dir); } Modified: trunk/lib/Smolder/Upgrade.pm =================================================================== --- trunk/lib/Smolder/Upgrade.pm 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/lib/Smolder/Upgrade.pm 2009-04-02 13:46:30 UTC (rev 935) @@ -3,7 +3,7 @@ use strict; use File::Spec::Functions qw(catfile); use Smolder; -use Smolder::Conf; +use Smolder::Conf qw(SQLDir); use Smolder::DB; =head1 NAME @@ -126,7 +126,7 @@ # find and run the SQL file $version =~ /(\d+)\.(\d+)/; - my $file = catfile(Smolder::Conf->sql_dir, 'upgrades', "V$1_$2.sql"); + my $file = catfile(SQLDir, 'upgrades', "V$1_$2.sql"); if (-e $file) { warn " Upgrading DB with file '$file'.\n"; Smolder::DB->run_sql_file($file); Modified: trunk/t/conf.t =================================================================== --- trunk/t/conf.t 2009-04-02 01:26:25 UTC (rev 934) +++ trunk/t/conf.t 2009-04-02 13:46:30 UTC (rev 935) @@ -3,9 +3,12 @@ use Test::More; use Smolder::TestScript; -plan(tests => 4); +plan(tests => 5); use_ok('Smolder::Conf'); ok(Smolder::Conf->get('Port')); ok(Smolder::Conf->get('HostName')); -ok(!Smolder::Conf->get('SomeFakeDirective')); + +eval { Smolder::Conf->get('SomeFakeDirective') }; +ok($@); +like($@, qr/not a valid Smolder config/); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |