[Rt-commit] rtfm branch, master, updated. ffed7e936b4c451577db2cfbdf834ee5c725a480

Kevin Falcone falcone at bestpractical.com
Wed Sep 23 16:05:26 EDT 2009


The branch, master has been updated
       via  ffed7e936b4c451577db2cfbdf834ee5c725a480 (commit)
       via  9dd08b465023a0b195409e2bb1c6c78cba51113c (commit)
       via  6bf226ed9f51051e5d91bcc0d765a10011f073ba (commit)
       via  3e4e4c498b569142cb2c5146f6cec5647ce03825 (commit)
      from  484b0c9bf66642edde3634ca5ce18626773606a9 (commit)

Summary of changes:
 .gitignore                               |    1 +
 MANIFEST                                 |    4 +-
 UPGRADING                                |    4 +-
 bin/notify                               |  108 ----------
 {sbin => etc/upgrade}/migrate-2.0-to-2.1 |    0
 sbin/factory                             |  312 ------------------------------
 6 files changed, 4 insertions(+), 425 deletions(-)
 delete mode 100644 bin/notify
 rename {sbin => etc/upgrade}/migrate-2.0-to-2.1 (100%)
 delete mode 100644 sbin/factory

- Log -----------------------------------------------------------------
commit 3e4e4c498b569142cb2c5146f6cec5647ce03825
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Sep 23 15:47:10 2009 -0400

    This example script shouldn't be installed by default

diff --git a/bin/notify b/bin/notify
deleted file mode 100644
index 0c37314..0000000
--- a/bin/notify
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/perl -w
-# BEGIN BPS TAGGED BLOCK {{{
-# 
-# COPYRIGHT:
-#  
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC 
-#                                          <sales at bestpractical.com>
-# 
-# (Except where explicitly superseded by other copyright notices)
-# 
-# 
-# LICENSE:
-# 
-# This work is made available to you under the terms of Version 2 of
-# the GNU General Public License. A copy of that license should have
-# been provided with this software, but in any event can be snarfed
-# from www.gnu.org.
-# 
-# This work is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 or visit their web page on the internet at
-# http://www.gnu.org/copyleft/gpl.html.
-# 
-# 
-# CONTRIBUTION SUBMISSION POLICY:
-# 
-# (The following paragraph is not intended to limit the rights granted
-# to you to modify and distribute this software under the terms of
-# the GNU General Public License and is only of importance to you if
-# you choose to contribute your changes and enhancements to the
-# community by submitting them to Best Practical Solutions, LLC.)
-# 
-# By intentionally submitting any modifications, corrections or
-# derivatives to this work, or any other work intended for use with
-# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-# you are the copyright holder for those contributions and you grant
-# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
-# royalty-free, perpetual, license to use, copy, create derivative
-# works based on those contributions, and sublicense and distribute
-# those contributions and any derivatives thereof.
-# 
-# END BPS TAGGED BLOCK }}}
-use strict;
-use Carp;
-use Getopt::Long qw(:config pass_through);
-
-
-my $VERSION="!!RT_VERSION!!";
-my $CONFIGFILE = '!!CONFIG_FILE_PATH!!';
-
-use lib "!!LIB_PATH!!";
-
-#This drags in  RT's config.pm
-use RT::FM;
-RT::FM::Init($CONFIGFILE);
-
-use RT::Date;
-use RT::FM::ArticleCollection;
-
-my $CurrentUser = RT::FM::SystemUser();
-
-my $dayago = new RT::Date($CurrentUser);
-$dayago->SetToNow();
-$dayago->AddDays(-5);
-
-my $EditedToday = new RT::FM::ArticleCollection($CurrentUser);
-$EditedToday->Limit( FIELD => 'Updated',
-		     VALUE => $dayago->ISO,
-		     OPERATOR => '>=' );
-
-if ($EditedToday->Count) {
-
-open (SENDMAIL, "|/usr/sbin/sendmail -oi -t");
-
-print SENDMAIL <<HEADER;
-From: rt-doc-workers-admin\@lists.fsck.com
-To: jesse\@fsck.com
-Subject: RT/FM updates for the 24 hours leading up to @{[scalar localtime]}
-
-HEADER
-
-
-while (my $article = $EditedToday->Next) {
-
-print SENDMAIL <<EOLINE;
-
-@{[$article->Id]}: @{[$article->Summary]}
- Updated by @{[$article->UpdatedByObj->Name]}
- http://fsck.com/rtfm/factoid.html?id=@{[$article->Id()]}  
-
-EOLINE
-
-
-}
-
-
-} else {
-
-print "Nothing\n";
-
-}
-

commit 6bf226ed9f51051e5d91bcc0d765a10011f073ba
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Sep 23 16:01:27 2009 -0400

    Remove outdated class generator

diff --git a/sbin/factory b/sbin/factory
deleted file mode 100644
index d7b964a..0000000
--- a/sbin/factory
+++ /dev/null
@@ -1,312 +0,0 @@
-#!/usr/bin/perl
-# BEGIN BPS TAGGED BLOCK {{{
-# 
-# COPYRIGHT:
-#  
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC 
-#                                          <sales at bestpractical.com>
-# 
-# (Except where explicitly superseded by other copyright notices)
-# 
-# 
-# LICENSE:
-# 
-# This work is made available to you under the terms of Version 2 of
-# the GNU General Public License. A copy of that license should have
-# been provided with this software, but in any event can be snarfed
-# from www.gnu.org.
-# 
-# This work is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 or visit their web page on the internet at
-# http://www.gnu.org/copyleft/gpl.html.
-# 
-# 
-# CONTRIBUTION SUBMISSION POLICY:
-# 
-# (The following paragraph is not intended to limit the rights granted
-# to you to modify and distribute this software under the terms of
-# the GNU General Public License and is only of importance to you if
-# you choose to contribute your changes and enhancements to the
-# community by submitting them to Best Practical Solutions, LLC.)
-# 
-# By intentionally submitting any modifications, corrections or
-# derivatives to this work, or any other work intended for use with
-# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-# you are the copyright holder for those contributions and you grant
-# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
-# royalty-free, perpetual, license to use, copy, create derivative
-# works based on those contributions, and sublicense and distribute
-# those contributions and any derivatives thereof.
-# 
-# END BPS TAGGED BLOCK }}}
-use DBI;
-
-my $database = shift;
-my $namespace = shift;
-
-my $CollectionBaseclass = 'RT::FM::SearchBuilder';
-my $RecordBaseclass = 'RT::FM::Record';
-
-my $driver = 'mysql';
-my $hostname = 'localhost';
-my $user = 'root';
-my $password = '';
-my $dsn = "DBI:$driver:database=$database;host=$hostname";
-
-my $dbh = DBI->connect($dsn, $user, $password);
-
- 
-#get all tables out of database
-my @tables = $dbh->tables();
-
-my %tablemap;
-
-foreach my $table (@tables) {
-	$tablemap{$table} = $table;
-}
-$tablemap{'CreatedBy'} = 'User';
-$tablemap{'UpdatedBy'} = 'User';
-
-
-
-foreach my $table (@tables) {
-
-    my $tablesingle = $table;
-    $tablesingle =~ s/s$//;
-
-    my %requirements;
-
-    my $CollectionClassName = $namespace."::".$tablesingle."Collection";
-    my $RecordClassName = $namespace."::".$tablesingle;
-    
-    my $path = $namespace;
-    $path =~ s/::/\//g;
-    
-    my $RecordClassPath = $path."/".$tablesingle.".pm";
-    my $CollectionClassPath = $path."/".$tablesingle."Collection.pm";
-
-
-    
-    #create a collection class
-    my $CreateInParams;
-    my $CreateOutParams;
-    my $ClassAccessible = "";
-    my $FieldsPod = "";
-    my $CreatePod = "";
-    my $sth = $dbh->prepare("DESCRIBE $table");
-    $sth->execute;
-    while (my $row = $sth->fetchrow_hashref()) {
-		my $field = $row->{'Field'};
-		my $type = $row->{'Type'};
-		my $default = $row->{'Default'};
-		
-		#generate the 'accessible' datastructure
-		$ClassAccessible .= "        $field => {'read' => 1, 'write' => 1},\n";
-		
-		
-		#generate pod for the accessible fields
-		$FieldsPod .= "
-=item $field
-
-Returns the current value of $field. 
-(In the database, $field is stored as $type.)
-
-
-=item Set$field VALUE
-
-Set $field to VALUE. 
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, $field will be stored as a $type.)
-
-=cut
-
-";
-
-if ($tablemap{$field}) { 
-$FieldsPod .= "
-=item ${field}Obj
-
-Returns the $tablemap{$field} Object which has the id returned by $field
-
-
-=cut
-
-sub ${field}Obj {
-	my \$self = shift;
-	my \$$field = new ${namespace}::$tablemap{$field}(\$self->CurrentUser);
-	\$$field->Load(\$self->$field());
-	return(\$$field);
-}
-";
-$requirements{$tablemap{$field}} = "use ${namespace}::$tablemap{$field};";
-
-}
-		#generate create statement
-		$CreateInParams .= "                $field => undef,\n";
-                $CreateOutParams .= "                         $field => \$args{'$field'},\n";
-
-
-		#gerenate pod for the create statement	
-		$CreatePod .= "  $type '$field'";
-		$CreatePod .= " defaults to '$default'" if ($default);
-		$CreatePod .= ".\n";
-
-	}
-
-        $Create = "
-sub Create {
-    my \$self = shift;
-    my \%args = ( 
-$CreateInParams,
-		  \@_);
-    \$self->SUPER::Create(
-$CreateOutParams);
-
-}
-";
-	$CreatePod .= "\n=cut\n\n";
-
-
-my $CollectionClass = "
-
-# \$Header\$
-# Autogenerated by DBIx::SearchBuilder factory  (by <jesse\@fsck.com>)
-
-=head1 NAME
-
-  $CollectionClassName -- Class Description
- 
-=head1 SYNOPSIS
-
-  use $CollectionClassName
-
-=head1 DESCRIPTION
-
-
-=head1 METHODS
-
-=cut
-
-package $CollectionClassName;
-
-use $CollectionBaseclass;
-use $RecordClassName;
-
-\@ISA= qw($CollectionBaseclass);
-
-
-sub _Init {
-    my \$self = shift;
-    \$self->{'table'} = '$table';
-    \$self->{'primary_key'} = 'id';
-    return ( \$self->SUPER::_Init(\@_) );
-}
-
-
-=item NewItem
-
-Returns an empty new $RecordClassName item
-
-=cut
-
-sub NewItem {
-    my \$self = shift;
-    return(new $RecordClassName(\@_));
-}
-
-1;
-";
-
-my $RecordClassHeader = "
-# \$Header\$
-# Autogenerated by DBIx::SearchBuilder factory  (by <jesse\@fsck.com>)
-
-=head1 NAME
-
-$RecordClassName
-
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-=head1 METHODS
-
-=cut
-
-package $RecordClassName;
-use $RecordBaseclass; 
-";
-
-foreach my $key (keys %requirements) {
-	$RecordClassHeader .= $requirements{$key} . "\n";
-}
-$RecordClassHeader .="
-
-use vars qw( \@ISA );
-\@ISA= qw( $RecordBaseclass );
-
-sub _Init {
-  my \$self = shift; 
-
-  \$self->Table('$table');
-  \$self->SUPER::_Init(\@_);
-}
-
-";
-
-
-
-
-
-
-
-
-my $RecordClass = "
-
-$RecordClassHeader
-
-$RecordInit
-
-=item Create PARAMHASH
-
-Create takes a hash of values and creates a row in the database:
-
-$CreatePod
-
-$Create
-
-$FieldsPod
-
-sub _ClassAccessible {
-    {
-     
-$ClassAccessible
- }
-};
-1;
-";
-
-
-`mkdir -p $path`;
-
-open (RECORD, ">$RecordClassPath");
-print RECORD $RecordClass;
-close (RECORD);
-
-open (COL, ">$CollectionClassPath");
-print COL $CollectionClass;
-close($COL);
-
-}
-
-
-
-	

commit 9dd08b465023a0b195409e2bb1c6c78cba51113c
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Sep 23 16:04:54 2009 -0400

    move migration script into the upgrade directory

diff --git a/UPGRADING b/UPGRADING
index 65e6408..82c4f41 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -70,7 +70,7 @@ Upgrade instructions (From any  2.0.x release):
 
 1) perl Makefile.PL
 
-2) perl -I/path/to/your/rt/lib sbin/migrate-2.0-to-2.1
+2) perl -I/path/to/your/rt/lib etc/upgrade/migrate-2.0-to-2.1
 
 if you are installing 2.4.x on a new machine and have brought
 your old 2.0.x database over, you will need a copy of the
@@ -78,7 +78,7 @@ RTFM 2.0 libs.  You can bring these from your old machine or
 download them from http://download.bestpractical.com
 This command would then be
 
-perl -I/path/to/your/old/rtfm/lib -I/path/to/rt/lib sbin/migrate-2.0-to-2.1
+perl -I/path/to/your/old/rtfm/lib -I/path/to/rt/lib etc/upgrade/migrate-2.0-to-2.1
 
 3) Type "make install"
 
diff --git a/sbin/migrate-2.0-to-2.1 b/etc/upgrade/migrate-2.0-to-2.1
similarity index 100%
rename from sbin/migrate-2.0-to-2.1
rename to etc/upgrade/migrate-2.0-to-2.1

commit ffed7e936b4c451577db2cfbdf834ee5c725a480
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Sep 23 16:05:09 2009 -0400

    fix up MANIFEST

diff --git a/.gitignore b/.gitignore
index 625327a..d41d0ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 Makefile
 Makefile.old
+MANIFEST.bak
 blib
 pm_to_blib
diff --git a/MANIFEST b/MANIFEST
index f492ff7..20ba241 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,3 @@
-bin/notify
 Changelog
 docs/adding_ticketing
 docs/developers_guide
@@ -37,6 +36,7 @@ etc/upgrade/2.2.0RC2/content
 etc/upgrade/2.2.0RC2/schema.mysql
 etc/upgrade/2.2.0RC2/schema.Oracle
 etc/upgrade/2.2.0RC2/schema.Pg
+etc/upgrade/migrate-2.0-to-2.1
 etc/upgrade/upgrade-mysql-schema.pl
 html/Admin/Global/CustomFields/RTFM-Class-RTFM-Article.html
 html/Admin/RTFM/Classes/CustomFields.html
@@ -160,8 +160,6 @@ po/rtfm.pot
 po/ru.po
 po/zh_tw.po
 README
-sbin/factory
-sbin/migrate-2.0-to-2.1
 t/00smoke.t
 t/04interface.t
 t/05cfsearch.t

-----------------------------------------------------------------------


More information about the Rt-commit mailing list