[Rt-commit] r10631 - in rt/branches/3.999-DANGEROUS: . html/Elements/GnuPG html/REST/1.0/Forms/ticket html/REST/1.0/ticket html/Ticket html/Ticket/Elements lib/RT/Crypt lib/RT/Interface lib/RT/Model lib/RT/Report lib/RT/Report/Tickets lib/RT/ScripAction lib/t/data/crypt-gnupg t/mail

jesse at bestpractical.com jesse at bestpractical.com
Thu Jan 31 19:46:03 EST 2008


Author: jesse
Date: Thu Jan 31 19:46:03 2008
New Revision: 10631

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/html/Elements/GnuPG/SignEncryptWidget
   rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/comment
   rt/branches/3.999-DANGEROUS/html/REST/1.0/ticket/comment
   rt/branches/3.999-DANGEROUS/html/Ticket/Create.html
   rt/branches/3.999-DANGEROUS/html/Ticket/Display.html
   rt/branches/3.999-DANGEROUS/html/Ticket/Elements/PreviewScrips
   rt/branches/3.999-DANGEROUS/html/Ticket/GnuPG.html
   rt/branches/3.999-DANGEROUS/lib/RT/Crypt/GnuPG.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Report/Tickets.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Report/Tickets/Entry.pm
   rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/CreateTickets.pm
   rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/RecordComment.pm
   rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/RecordCorrespondence.pm
   rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SendEmail.pm
   rt/branches/3.999-DANGEROUS/lib/t/data/crypt-gnupg/pubring.gpg
   rt/branches/3.999-DANGEROUS/lib/t/data/crypt-gnupg/secring.gpg
   rt/branches/3.999-DANGEROUS/lib/t/data/crypt-gnupg/trustdb.gpg
   rt/branches/3.999-DANGEROUS/t/mail/crypt-gnupg.t
   rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t
   rt/branches/3.999-DANGEROUS/t/web/crypt-gnupg.t
   rt/branches/3.999-DANGEROUS/t/web/gnupg-outgoing.t
   rt/branches/3.999-DANGEROUS/t/web/gnupg-select-keys-on-create.t
   rt/branches/3.999-DANGEROUS/t/web/gnupg-select-keys-on-update.t

Log:
 r76023 at pinglin:  jesse | 2008-01-31 19:44:59 -0500
  sign/encyrpt lower caseing. fixing "Type" on MIME::Entity calls


Modified: rt/branches/3.999-DANGEROUS/html/Elements/GnuPG/SignEncryptWidget
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/GnuPG/SignEncryptWidget	(original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/GnuPG/SignEncryptWidget	Thu Jan 31 19:46:03 2008
@@ -1,10 +1,10 @@
 <table>
-<td><% _('Sign')%></td>
-<td><& /Widgets/Form/Boolean:InputOnly, name => 'Sign', current_value => $self->{'Sign'} &>
+<td><% _('sign')%></td>
+<td><& /Widgets/Form/Boolean:InputOnly, name => 'sign', current_value => $self->{'sign'} &>
 using <& SelectKeyForSigning, User => Jifty->web->current_user->user_object &>
 </td>
-<td><% _('Encrypt')%></td>
-<td><& /Widgets/Form/Boolean:InputOnly, name => 'Encrypt', current_value => $self->{'Encrypt'} &></td>
+<td><% _('encrypt')%></td>
+<td><& /Widgets/Form/Boolean:InputOnly, name => 'encrypt', current_value => $self->{'encrypt'} &></td>
 </table>
 <%ARGS>
 $self => undef,
@@ -51,7 +51,7 @@
 
 $queue_obj ||= $ticket_obj->queue_obj if $ticket_obj;
 
-foreach ( qw(Sign Encrypt) ) {
+foreach ( qw(sign encrypt) ) {
     $self->{ $_ } = $m->comp( '/Widgets/Form/Boolean:Process',
         name => $_,
         DefaultValue => $queue_obj->$_,
@@ -73,7 +73,7 @@
 
 my $checks_failure = 0;
 
-if ( $self->{'Sign'} ) {
+if ( $self->{'sign'} ) {
     $queue_obj ||= $ticket_obj->queue_obj
         if $ticket_obj;
 
@@ -91,7 +91,7 @@
     }
 }
 
-if ( $self->{'Encrypt'} ) {
+if ( $self->{'encrypt'} ) {
 
     my @recipients;
 

Modified: rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/comment
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/comment	(original)
+++ rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/comment	Thu Jan 31 19:46:03 2008
@@ -90,7 +90,7 @@
 }
 
 my $cgi = Jifty->handler->cgi;
-my $ent = MIME::Entity->build(type => "multipart/mixed");
+my $ent = MIME::Entity->build(Type => "multipart/mixed");
 $ent->attach(Data => $changes{Text}) if $changes{Text};
 
 my $i = 1;

Modified: rt/branches/3.999-DANGEROUS/html/REST/1.0/ticket/comment
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/REST/1.0/ticket/comment	(original)
+++ rt/branches/3.999-DANGEROUS/html/REST/1.0/ticket/comment	Thu Jan 31 19:46:03 2008
@@ -106,7 +106,7 @@
 }
 
 my $cgi = Jifty->handler->cgi;
-my $ent = MIME::Entity->build(type => "multipart/mixed");
+my $ent = MIME::Entity->build(Type => "multipart/mixed");
 $ent->attach(Data => $k->{Text}) if $k->{Text};
 
 my $i = 1;

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Create.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Create.html	Thu Jan 31 19:46:03 2008
@@ -317,7 +317,7 @@
 }
 my @results;
 my $queue_obj = RT::Model::Queue->new();
-$queue_obj->load($Queue) || abort(_("Queue could not be loaded."));
+$queue_obj->load($queue) || abort(_("Queue could not be loaded."));
 
 $m->callback( queue_obj => $queue_obj, ARGSRef => \%ARGS );
 
@@ -421,6 +421,6 @@
 $DependedOnBy => undef
 $MemberOf => undef
 $QuoteTransaction => undef
-$Queue => undef
+$queue => undef
 $cloneTicket => undef
 </%ARGS>

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Display.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Display.html	Thu Jan 31 19:46:03 2008
@@ -128,7 +128,7 @@
         ticket_obj => $ticket_obj, Tickets => $Tickets,
         ActionsRef => \@Actions, ARGSRef => \%ARGS );
     if ( defined $ARGS{'Action'} ) {
-        if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) {
+        if ($ARGS{'Action'} =~ /^(steal|kill|take|set_old)$/) {
             my $action = $1;
             my ($res, $msg) = $ticket_obj->$action();
             push(@Actions, $msg);

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/PreviewScrips
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/PreviewScrips	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/PreviewScrips	Thu Jan 31 19:46:03 2008
@@ -226,7 +226,7 @@
     my $action = $scrip->action_obj->action;
     next unless $action->isa('RT::ScripAction::SendEmail');
 
-    foreach my $type qw(To Cc Bcc) {
+    foreach my $type qw(to cc bcc) {
         push @recipients, $action->$type();
     }
 }

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/GnuPG.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/GnuPG.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/GnuPG.html	Thu Jan 31 19:46:03 2008
@@ -12,8 +12,8 @@
 <% _('Return back to the ticket') %>
 </a>
 <& /Elements/Submit,
-    Label => ($encrypted? _('Decrypt'): _('Encrypt')),
-    name  => ($encrypted? 'Decrypt': 'Encrypt'),
+    Label => ($encrypted? _('Decrypt'): _('encrypt')),
+    name  => ($encrypted? 'Decrypt': 'encrypt'),
 &>
 </form>
 <%ARGS>

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Crypt/GnuPG.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Crypt/GnuPG.pm	Thu Jan 31 19:46:03 2008
@@ -383,7 +383,7 @@
     return shift->();
 }
 
-=head2 sign_encrypt Entity => MIME::Entity, [ Encrypt => 1, Sign => 1, ... ]
+=head2 sign_encrypt Entity => MIME::Entity, [ encrypt => 1, sign => 1, ... ]
 
 Signs and/or encrypts an email message with GnuPG utility.
 
@@ -419,12 +419,12 @@
     my %args = (@_);
 
     my $entity = $args{'Entity'};
-    if ( $args{'Sign'} && !defined $args{'Signer'} ) {
+    if ( $args{'sign'} && !defined $args{'Signer'} ) {
         $args{'Signer'} = use_key_for_signing()
             || ( Mail::Address->parse( $entity->head->get('From') ) )[0]
             ->address;
     }
-    if ( $args{'Encrypt'} && !$args{'Recipients'} ) {
+    if ( $args{'encrypt'} && !$args{'Recipients'} ) {
         my %seen;
         $args{'Recipients'} = [
             grep $_ && !$seen{$_}++,
@@ -447,11 +447,11 @@
     my %args = (
         Entity => undef,
 
-        Sign       => 1,
+        sign       => 1,
         Signer     => undef,
         Passphrase => undef,
 
-        Encrypt    => 1,
+        encrypt    => 1,
         Recipients => undef,
 
         @_
@@ -461,7 +461,7 @@
     my %opt   = RT->config->get('GnuPGOptions');
     $opt{'digest-algo'} ||= 'SHA1';
     $opt{'default_key'} = $args{'Signer'}
-        if $args{'Sign'} && $args{'Signer'};
+        if $args{'sign'} && $args{'Signer'};
     $gnupg->options->hash_init(
         _prepare_gnupg_options(%opt),
         armor            => 1,
@@ -474,12 +474,12 @@
     $args{'Passphrase'} = delete $opt{'passphrase'}
         if !defined $args{'Passphrase'};
 
-    if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
+    if ( $args{'sign'} && !defined $args{'Passphrase'} ) {
         $args{'Passphrase'} = get_passphrase( Address => $args{'Signer'} );
     }
 
     my %res;
-    if ( $args{'Sign'} && !$args{'Encrypt'} ) {
+    if ( $args{'sign'} && !$args{'encrypt'} ) {
 
         # required by RFC3156(Ch. 5) and RFC1847(Ch. 2.1)
         $entity->head->mime_attr(
@@ -532,13 +532,13 @@
         $entity->head->mime_attr(
             'Content-Type.micalg' => 'pgp-' . lc $opt{'digest-algo'} );
         $entity->attach(
-            type        => $protocol,
+            Type        => $protocol,
             Disposition => 'inline',
             Data        => \@signature,
             Encoding    => '7bit',
         );
     }
-    if ( $args{'Encrypt'} ) {
+    if ( $args{'encrypt'} ) {
         my %seen;
         $gnupg->options->push_recipients($_)
             foreach map use_key_for_encryption($_) || $_, grep !$seen{$_}++,
@@ -557,12 +557,12 @@
             status => ( $handle{'status'} = new IO::Handle ),
         );
         $handles->options('stdout')->{'direct'} = 1;
-        $gnupg->passphrase( $args{'Passphrase'} ) if $args{'Sign'};
+        $gnupg->passphrase( $args{'Passphrase'} ) if $args{'sign'};
 
         eval {
             local $SIG{'CHLD'} = 'DEFAULT';
             my $pid = _safe_run_child {
-                $args{'Sign'}
+                $args{'sign'}
                     ? $gnupg->sign_and_encrypt( handles => $handles )
                     : $gnupg->encrypt( handles => $handles );
             };
@@ -592,13 +592,13 @@
         $entity->head->mime_attr( 'Content-Type' => 'multipart/encrypted' );
         $entity->head->mime_attr( 'Content-Type.protocol' => $protocol );
         $entity->attach(
-            type        => $protocol,
+            Type        => $protocol,
             Disposition => 'inline',
             Data        => [ 'Version: 1', '' ],
             Encoding    => '7bit',
         );
         $entity->attach(
-            type        => 'application/octet-stream',
+            Type        => 'application/octet-stream',
             Disposition => 'inline',
             Path        => $tmp_fn,
             Filename    => '',
@@ -635,22 +635,22 @@
     my %args = (
         Entity => undef,
 
-        Sign       => 1,
+        sign       => 1,
         Signer     => undef,
         Passphrase => undef,
 
-        Encrypt    => 1,
+        encrypt    => 1,
         Recipients => undef,
 
         @_
     );
-    return unless $args{'Sign'} || $args{'Encrypt'};
+    return unless $args{'sign'} || $args{'encrypt'};
 
     my $gnupg = new GnuPG::Interface;
     my %opt   = RT->config->get('GnuPGOptions');
     $opt{'digest-algo'} ||= 'SHA1';
     $opt{'default_key'} = $args{'Signer'}
-        if $args{'Sign'} && $args{'Signer'};
+        if $args{'sign'} && $args{'Signer'};
     $gnupg->options->hash_init(
         _prepare_gnupg_options(%opt),
         armor            => 1,
@@ -661,11 +661,11 @@
     $args{'Passphrase'} = delete $opt{'passphrase'}
         if !defined( $args{'Passphrase'} );
 
-    if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
+    if ( $args{'sign'} && !defined $args{'Passphrase'} ) {
         $args{'Passphrase'} = get_passphrase( Address => $args{'Signer'} );
     }
 
-    if ( $args{'Encrypt'} ) {
+    if ( $args{'encrypt'} ) {
         $gnupg->options->push_recipients($_)
             foreach map use_key_for_encryption($_) || $_,
             @{ $args{'Recipients'} || [] };
@@ -685,15 +685,15 @@
         status => ( $handle{'status'} = new IO::Handle ),
     );
     $handles->options('stdout')->{'direct'} = 1;
-    $gnupg->passphrase( $args{'Passphrase'} ) if $args{'Sign'};
+    $gnupg->passphrase( $args{'Passphrase'} ) if $args{'sign'};
 
     my $entity = $args{'Entity'};
     eval {
         local $SIG{'CHLD'} = 'DEFAULT';
         my $method
-            = $args{'Sign'} && $args{'Encrypt'}
+            = $args{'sign'} && $args{'encrypt'}
             ? 'sign_and_encrypt'
-            : ( $args{'Sign'} ? 'clearsign' : 'encrypt' );
+            : ( $args{'sign'} ? 'clearsign' : 'encrypt' );
         my $pid = _safe_run_child { $gnupg->$method( handles => $handles ) };
         $entity->bodyhandle->print( $handle{'input'} );
         close $handle{'input'};
@@ -728,22 +728,22 @@
     my %args = (
         Entity => undef,
 
-        Sign       => 1,
+        sign       => 1,
         Signer     => undef,
         Passphrase => undef,
 
-        Encrypt    => 1,
+        encrypt    => 1,
         Recipients => undef,
 
         @_
     );
-    return unless $args{'Sign'} || $args{'Encrypt'};
+    return unless $args{'sign'} || $args{'encrypt'};
 
     my $gnupg = new GnuPG::Interface;
     my %opt   = RT->config->get('GnuPGOptions');
     $opt{'digest-algo'} ||= 'SHA1';
     $opt{'default_key'} = $args{'Signer'}
-        if $args{'Sign'} && $args{'Signer'};
+        if $args{'sign'} && $args{'Signer'};
     $gnupg->options->hash_init(
         _prepare_gnupg_options(%opt),
         armor            => 1,
@@ -754,12 +754,12 @@
     $args{'Passphrase'} = delete $opt{'passphrase'}
         if !defined( $args{'Passphrase'} );
 
-    if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
+    if ( $args{'sign'} && !defined $args{'Passphrase'} ) {
         $args{'Passphrase'} = get_passphrase( Address => $args{'Signer'} );
     }
 
     my $entity = $args{'Entity'};
-    if ( $args{'Encrypt'} ) {
+    if ( $args{'encrypt'} ) {
         $gnupg->options->push_recipients($_)
             foreach map use_key_for_encryption($_) || $_,
             @{ $args{'Recipients'} || [] };
@@ -779,14 +779,14 @@
         status => ( $handle{'status'} = new IO::Handle ),
     );
     $handles->options('stdout')->{'direct'} = 1;
-    $gnupg->passphrase( $args{'Passphrase'} ) if $args{'Sign'};
+    $gnupg->passphrase( $args{'Passphrase'} ) if $args{'sign'};
 
     eval {
         local $SIG{'CHLD'} = 'DEFAULT';
         my $method
-            = $args{'Sign'} && $args{'Encrypt'}
+            = $args{'sign'} && $args{'encrypt'}
             ? 'sign_and_encrypt'
-            : ( $args{'Sign'} ? 'detach_sign' : 'encrypt' );
+            : ( $args{'sign'} ? 'detach_sign' : 'encrypt' );
         my $pid = _safe_run_child { $gnupg->$method( handles => $handles ) };
         $entity->bodyhandle->print( $handle{'input'} );
         close $handle{'input'};
@@ -812,10 +812,10 @@
     }
 
     my $filename = $entity->head->recommended_filename || 'no_name';
-    if ( $args{'Sign'} && !$args{'Encrypt'} ) {
+    if ( $args{'sign'} && !$args{'encrypt'} ) {
         $entity->make_multipart;
         $entity->attach(
-            type        => 'application/octet-stream',
+            Type        => 'application/octet-stream',
             Path        => $tmp_fn,
             Filename    => "$filename.sig",
             Disposition => 'attachment',
@@ -836,22 +836,22 @@
     my %args = (
         Content => undef,
 
-        Sign       => 1,
+        sign       => 1,
         Signer     => undef,
         Passphrase => undef,
 
-        Encrypt    => 1,
+        encrypt    => 1,
         Recipients => undef,
 
         @_
     );
-    return unless $args{'Sign'} || $args{'Encrypt'};
+    return unless $args{'sign'} || $args{'encrypt'};
 
     my $gnupg = new GnuPG::Interface;
     my %opt   = RT->config->get('GnuPGOptions');
     $opt{'digest-algo'} ||= 'SHA1';
     $opt{'default_key'} = $args{'Signer'}
-        if $args{'Sign'} && $args{'Signer'};
+        if $args{'sign'} && $args{'Signer'};
     $gnupg->options->hash_init(
         _prepare_gnupg_options(%opt),
         armor            => 1,
@@ -862,11 +862,11 @@
     $args{'Passphrase'} = delete $opt{'passphrase'}
         if !defined( $args{'Passphrase'} );
 
-    if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
+    if ( $args{'sign'} && !defined $args{'Passphrase'} ) {
         $args{'Passphrase'} = get_passphrase( Address => $args{'Signer'} );
     }
 
-    if ( $args{'Encrypt'} ) {
+    if ( $args{'encrypt'} ) {
         $gnupg->options->push_recipients($_)
             foreach map use_key_for_encryption($_) || $_,
             @{ $args{'Recipients'} || [] };
@@ -886,14 +886,14 @@
         status => ( $handle{'status'} = new IO::Handle ),
     );
     $handles->options('stdout')->{'direct'} = 1;
-    $gnupg->passphrase( $args{'Passphrase'} ) if $args{'Sign'};
+    $gnupg->passphrase( $args{'Passphrase'} ) if $args{'sign'};
 
     eval {
         local $SIG{'CHLD'} = 'DEFAULT';
         my $method
-            = $args{'Sign'} && $args{'Encrypt'}
+            = $args{'sign'} && $args{'encrypt'}
             ? 'sign_and_encrypt'
-            : ( $args{'Sign'} ? 'clearsign' : 'encrypt' );
+            : ( $args{'sign'} ? 'clearsign' : 'encrypt' );
         my $pid = _safe_run_child { $gnupg->$method( handles => $handles ) };
         $handle{'input'}->print( ${ $args{'Content'} } );
         close $handle{'input'};
@@ -1678,7 +1678,7 @@
             push @res, \%res;
         } elsif ( $keyword eq 'END_ENCRYPTION' ) {
             my %res = (
-                Operation => 'Encrypt',
+                Operation => 'encrypt',
                 Status    => 'DONE',
                 Message   => 'Data has been encrypted',
             );
@@ -1795,7 +1795,7 @@
             my @props = split /\s+/, $args;
             push @res,
                 {
-                Operation      => 'Sign',
+                Operation      => 'sign',
                 Status         => 'DONE',
                 Message        => "Signed message",
                 type           => $props[0],
@@ -2389,16 +2389,16 @@
     my $from = shift;
 
     my $mime = MIME::Entity->build(
-        type    => "text/plain",
+        Type    => "text/plain",
         From    => 'nobody at localhost',
         To      => 'nobody at localhost',
-        subject => "dry sign",
+        Subject => "dry sign",
         Data    => ['t'],
     );
 
     my %res = sign_encrypt(
-        Sign    => 1,
-        Encrypt => 0,
+        sign    => 1,
+        encrypt => 0,
         Entity  => $mime,
         Signer  => $from,
     );

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm	Thu Jan 31 19:46:03 2008
@@ -267,7 +267,7 @@
 
     # the colons are necessary to make ->build include non-standard headers
     my $entity = MIME::Entity->build(
-        type                    => "multipart/mixed",
+        Type                    => "multipart/mixed",
         From                    => $args{'From'},
         Bcc                     => $args{'Bcc'},
         To                      => $args{'To'},
@@ -275,7 +275,7 @@
         'Precedence:'           => 'bulk',
         'X-RT-Loop-Prevention:' => RT->config->get('rtname'),
     );
-    SetInReplyTo( Message => $entity, InReplyTo => $args{'mime_obj'} );
+    set_in_reply_to( Message => $entity, InReplyTo => $args{'mime_obj'} );
 
     $entity->attach( Data => $args{'Explanation'} . "\n" );
 
@@ -312,12 +312,12 @@
 headers of a transaction's attachment or properties of a ticket's queue.
 To get full access to the configuration Ticket and/or Transaction
 arguments must be provided, but you can force behaviour using Sign
-and/or Encrypt arguments.
+and/or encrypt arguments.
 
 The following precedence of arguments are used to figure out if
 the message should be encrypted and/or signed:
 
-* if Sign or Encrypt argument is defined then its value is used
+* if sign or encrypt argument is defined then its value is used
 
 * else if Transaction's first attachment has X-RT-Sign or X-RT-Encrypt
 header field then it's value is used
@@ -373,7 +373,7 @@
         $attachment = $args{'Transaction'}->attachments->first
             if $args{'Transaction'};
 
-        foreach my $argument (qw(Sign Encrypt)) {
+        foreach my $argument (qw(sign encrypt)) {
             next if defined $args{$argument};
 
             if ( $attachment
@@ -576,7 +576,7 @@
     $mail->head->set( $_ => $args{$_} )
         foreach grep defined $args{$_}, qw(To Cc Bcc From);
 
-    SetInReplyTo( Message => $mail, InReplyTo => $args{'InReplyTo'} );
+    set_in_reply_to( Message => $mail, InReplyTo => $args{'InReplyTo'} );
 
     return SendEmail( Entity => $mail );
 }
@@ -665,7 +665,7 @@
             . " of a ticket #"
             . $txn->object_id;
         $mail = MIME::Entity->build(
-            type => 'text/plain',
+            Type => 'text/plain',
             Data => $description,
         );
     }
@@ -697,13 +697,13 @@
     my $status = RT->config->get('ForwardFromUser')
 
         # never sign if we forward from User
-        ? SendEmail( Entity => $mail, Transaction => $txn, Sign => 0 )
+        ? SendEmail( Entity => $mail, Transaction => $txn, sign => 0 )
         : SendEmail( Entity => $mail, Transaction => $txn );
     return ( 0, $txn->_("Couldn't send email") ) unless $status;
     return ( 1, $txn->_("Send email successfully") );
 }
 
-=head2 sign_encrypt Entity => undef, Sign => 0, Encrypt => 0
+=head2 sign_encrypt Entity => undef, sign => 0, encrypt => 0
 
 Signs and encrypts message using L<RT::Crypt::GnuPG>, but as well
 handle errors with users' keys.
@@ -722,17 +722,17 @@
 sub sign_encrypt {
     my %args = (
         Entity  => undef,
-        Sign    => 0,
-        Encrypt => 0,
+        sign    => 0,
+        encrypt => 0,
         @_
     );
-    return 1 unless $args{'Sign'} || $args{'Encrypt'};
+    return 1 unless $args{'sign'} || $args{'encrypt'};
 
     my $msgid = $args{'Entity'}->head->get('Message-ID') || '';
     chomp $msgid;
 
-    Jifty->log->debug("$msgid Signing message")    if $args{'Sign'};
-    Jifty->log->debug("$msgid Encrypting message") if $args{'Encrypt'};
+    Jifty->log->debug("$msgid Signing message")    if $args{'sign'};
+    Jifty->log->debug("$msgid Encrypting message") if $args{'encrypt'};
 
     require RT::Crypt::GnuPG;
     my %res = RT::Crypt::GnuPG::sign_encrypt(%args);

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm	Thu Jan 31 19:46:03 2008
@@ -302,7 +302,7 @@
         }
     }
 
-    foreach my $argument (qw(Encrypt Sign)) {
+    foreach my $argument (qw(encrypt sign)) {
         $mime_obj->head->add( "X-RT-$argument" => $ARGS{$argument} )
             if defined $ARGS{$argument};
     }
@@ -543,7 +543,7 @@
     }
 
     if ( my $msg = $old_txn->message->first ) {
-        RT::Interface::Email::SetInReplyTo(
+        RT::Interface::Email::set_in_reply_to(
             Message   => $Message,
             InReplyTo => $msg
         );
@@ -571,8 +571,8 @@
     my %message_args = (
         CcMessageTo  => $cc,
         BccMessageTo => $bcc,
-        Sign         => $args{ARGSRef}->{'Sign'},
-        Encrypt      => $args{ARGSRef}->{'Encrypt'},
+        sign         => $args{ARGSRef}->{'sign'},
+        encrypt      => $args{ARGSRef}->{'encrypt'},
         mime_obj      => $Message,
         time_taken    => $args{ARGSRef}->{'UpdateTimeWorked'}
     );
@@ -637,7 +637,7 @@
         @_,
     );
     my $Message = MIME::Entity->build(
-        type    => 'multipart/mixed',
+        Type    => 'multipart/mixed',
         subject => $args{'subject'} || "",
         From    => $args{'From'},
         Cc      => $args{'Cc'},
@@ -653,7 +653,7 @@
         no utf8;
         use bytes;
         $Message->attach(
-            type => $args{'type'} || 'text/plain',
+            Type => $args{'type'} || 'text/plain',
             Charset => 'UTF-8',
             Data    => $args{'Body'},
         );
@@ -681,7 +681,7 @@
             $filename =~ s#^.*[\\/]##;
 
             $Message->attach(
-                type     => $uploadinfo->{'Content-Type'},
+                Type     => $uploadinfo->{'Content-Type'},
                 Filename => Encode::decode_utf8($filename),
                 Data     => \@content,
             );

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm	Thu Jan 31 19:46:03 2008
@@ -637,8 +637,8 @@
     my $content = $self->content;
     my %res     = RT::Crypt::GnuPG::sign_encrypt_content(
         Content    => \$content,
-        Sign       => 0,
-        Encrypt    => 1,
+        sign       => 0,
+        encrypt    => 1,
         Recipients => [$encrypt_for],
     );
     if ( $res{'exit_code'} ) {

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm	Thu Jan 31 19:46:03 2008
@@ -356,8 +356,8 @@
         initial_priority   => 0,
         final_priority     => 0,
         default_due_in       => 0,
-        Sign               => undef,
-        Encrypt            => undef,
+        sign               => undef,
+        encrypt            => undef,
         @_
     );
 
@@ -394,14 +394,14 @@
     }
     Jifty->handle->commit;
 
-    if ( defined $args{'Sign'} ) {
-        my ( $status, $msg ) = $self->set_sign( $args{'Sign'} );
-        Jifty->log->error("Couldn't set attribute 'Sign': $msg")
+    if ( defined $args{'sign'} ) {
+        my ( $status, $msg ) = $self->set_sign( $args{'sign'} );
+        Jifty->log->error("Couldn't set attribute 'sign': $msg")
             unless $status;
     }
-    if ( defined $args{'Encrypt'} ) {
-        my ( $status, $msg ) = $self->set_encrypt( $args{'Encrypt'} );
-        Jifty->log->error("Couldn't set attribute 'Encrypt': $msg")
+    if ( defined $args{'encrypt'} ) {
+        my ( $status, $msg ) = $self->set_encrypt( $args{'encrypt'} );
+        Jifty->log->error("Couldn't set attribute 'encrypt': $msg")
             unless $status;
     }
 
@@ -497,7 +497,7 @@
     my $value = shift;
 
     return undef unless $self->current_user_has_right('SeeQueue');
-    my $attr = $self->first_attribute('Sign') or return 0;
+    my $attr = $self->first_attribute('sign') or return 0;
     return $attr->content;
 }
 
@@ -509,7 +509,7 @@
         unless $self->current_user_has_right('AdminQueue');
 
     my ( $status, $msg ) = $self->set_attribute(
-        name        => 'Sign',
+        name        => 'sign',
         description => 'Sign outgoing messages by default',
         content     => $value,
     );
@@ -523,7 +523,7 @@
     my $value = shift;
 
     return undef unless $self->current_user_has_right('SeeQueue');
-    my $attr = $self->first_attribute('Encrypt') or return 0;
+    my $attr = $self->first_attribute('encrypt') or return 0;
     return $attr->content;
 }
 
@@ -535,7 +535,7 @@
         unless $self->current_user_has_right('AdminQueue');
 
     my ( $status, $msg ) = $self->set_attribute(
-        name        => 'Encrypt',
+        name        => 'encrypt',
         description => 'Encrypt outgoing messages by default',
         content     => $value,
     );

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm	Thu Jan 31 19:46:03 2008
@@ -846,7 +846,7 @@
     }
     $args{'mime_obj'} = MIME::Entity->new();
     $args{'mime_obj'}->build(
-        type => ( $args{'contenttype'} || 'text/plain' ),
+        Type => ( $args{'contenttype'} || 'text/plain' ),
         Data => ( $args{'content'}     || '' )
     );
 
@@ -2228,8 +2228,8 @@
     my %args = (
         CcMessageTo   => undef,
         BccMessageTo  => undef,
-        Encrypt       => undef,
-        Sign          => undef,
+        encrypt       => undef,
+        sign          => undef,
         mime_obj       => undef,
         Content       => undef,
         NoteType      => 'Correspond',
@@ -2268,7 +2268,7 @@
         }
     }
 
-    foreach my $argument (qw(Encrypt Sign)) {
+    foreach my $argument (qw(encrypt sign)) {
         $args{'mime_obj'}->head->add( "X-RT-$argument" => $args{$argument} )
             if defined $args{$argument};
     }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Report/Tickets.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Report/Tickets.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Report/Tickets.pm	Thu Jan 31 19:46:03 2008
@@ -57,9 +57,9 @@
     my $self   = shift;
     my %args   = (@_);
     my @fields = qw(
-        Owner
-        Status
-        Queue
+        owner
+        status
+        queue
         DueDaily
         DueMonthly
         DueAnnually
@@ -140,7 +140,7 @@
     my $self = shift;
     my %args = (@_);
 
-    if ( $args{'column'} && !$args{'FUNCTION'} ) {
+    if ( $args{'column'} && !$args{'function'} ) {
         %args = $self->_field_to_function(%args);
     }
 
@@ -176,11 +176,11 @@
     if ( $field =~ /^(.*)(Daily|Monthly|Annually)$/ ) {
         my ( $field, $grouping ) = ( $1, $2 );
         if ( $grouping =~ /Daily/ ) {
-            $args{'FUNCTION'} = "SUBSTR($field,1,10)";
+            $args{'function'} = "SUBSTR($field,1,10)";
         } elsif ( $grouping =~ /Monthly/ ) {
-            $args{'FUNCTION'} = "SUBSTR($field,1,7)";
+            $args{'function'} = "SUBSTR($field,1,7)";
         } elsif ( $grouping =~ /Annually/ ) {
-            $args{'FUNCTION'} = "SUBSTR($field,1,4)";
+            $args{'function'} = "SUBSTR($field,1,4)";
         }
     } elsif ( $field =~ /^(?:CF|CustomField)\.{(.*)}$/ )
     {    #XXX: use CFDecipher method
@@ -232,8 +232,8 @@
 
 sub add_empty_rows {
     my $self = shift;
-    if ( $self->{'_group_by_field'} eq 'Status' ) {
-        my %has = map { $_->__value('Status') => 1 }
+    if ( $self->{'_group_by_field'} eq 'status' ) {
+        my %has = map { $_->__value('status') => 1 }
             @{ $self->items_array_ref || [] };
 
         foreach

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Report/Tickets/Entry.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Report/Tickets/Entry.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Report/Tickets/Entry.pm	Thu Jan 31 19:46:03 2008
@@ -49,6 +49,10 @@
 use base qw/RT::Record/;
 
 # XXX TODO: how the heck do we acl a report?
+#
+
+
+sub table { 'Tickets'}
 sub current_user_has_right {1}
 
 1;

Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/CreateTickets.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/CreateTickets.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/CreateTickets.pm	Thu Jan 31 19:46:03 2008
@@ -775,7 +775,7 @@
     if ( $args{content} ) {
         my $mime_obj = MIME::Entity->new();
         $mime_obj->build(
-            type => $args{'contenttype'} || 'text/plain',
+            Type => $args{'contenttype'} || 'text/plain',
             Data => $args{'content'}
         );
         $ticketargs{mime_obj} = $mime_obj;

Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/RecordComment.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/RecordComment.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/RecordComment.pm	Thu Jan 31 19:46:03 2008
@@ -45,11 +45,10 @@
 # those contributions and any derivatives thereof.
 #
 # END BPS TAGGED BLOCK }}}
-package RT::ScripAction::RecordComment;
-require RT::ScripAction::Generic;
+use warnings;
 use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::ScripAction::Generic);
+package RT::ScripAction::RecordComment;
+use base = qw(RT::ScripAction::Generic);
 
 =head1 name
 
@@ -78,7 +77,7 @@
 sub prepare {
     my $self = shift;
     if ( defined $self->{'transaction_obj'}
-        && $self->{'transaction_obj'}->type =~ /^(comment|Correspond)$/ )
+        && $self->{'transaction_obj'}->type =~ /^(comment|correspond)$/ )
     {
         return undef;
     }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/RecordCorrespondence.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/RecordCorrespondence.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/RecordCorrespondence.pm	Thu Jan 31 19:46:03 2008
@@ -45,11 +45,10 @@
 # those contributions and any derivatives thereof.
 #
 # END BPS TAGGED BLOCK }}}
-package RT::ScripAction::RecordCorrespondence;
-require RT::ScripAction::Generic;
 use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::ScripAction::Generic);
+use warnings;
+package RT::ScripAction::RecordCorrespondence;
+use base qw(RT::ScripAction::Generic);
 
 =head1 name
 
@@ -79,7 +78,7 @@
 sub prepare {
     my $self = shift;
     if ( defined $self->{'transaction_obj'}
-        && $self->{'transaction_obj'}->type =~ /^(comment|Correspond)$/ )
+        && $self->{'transaction_obj'}->type =~ /^(comment|correspond)$/ )
     {
         return undef;
     }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SendEmail.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SendEmail.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SendEmail.pm	Thu Jan 31 19:46:03 2008
@@ -112,7 +112,7 @@
         my $attachment = $self->transaction_obj->attachments->first;
 
         my %crypt;
-        foreach my $argument (qw(Sign Encrypt)) {
+        foreach my $argument (qw(sign encrypt)) {
             if ( $attachment
                 && defined $attachment->get_header("X-RT-$argument") )
             {
@@ -121,7 +121,7 @@
                 $crypt{$argument} = $self->ticket_obj->queue_obj->$argument();
             }
         }
-        if ( $crypt{'Sign'} || $crypt{'Encrypt'} ) {
+        if ( $crypt{'sign'} || $crypt{'encrypt'} ) {
             $orig_message = $message->dup;
         }
     }
@@ -130,7 +130,7 @@
     if ( $ret > 0 && RT->config->get('RecordOutgoingEmail') ) {
         if ($orig_message) {
             $message->attach(
-                type        => 'application/x-rt-original-message',
+                Type        => 'application/x-rt-original-message',
                 Disposition => 'inline',
                 Data        => $orig_message->as_string,
             );
@@ -393,7 +393,7 @@
     my $mime_obj = shift || $self->template_obj->mime_obj;
 
     $mime_obj->attach(
-        type     => $attach->content_type,
+        Type     => $attach->content_type,
         Charset  => $attach->original_encoding,
         Data     => $attach->original_content,
         Filename => defined( $attach->filename )
@@ -472,7 +472,7 @@
     $attachs->order_by( column => 'Created' );
 
     my $ticket_mime = MIME::Entity->build(
-        type        => 'multipart/mixed',
+        Type        => 'multipart/mixed',
         Top         => 0,
         description => "ticket #$tid",
     );

Modified: rt/branches/3.999-DANGEROUS/lib/t/data/crypt-gnupg/pubring.gpg
==============================================================================
Binary files. No diff available.

Modified: rt/branches/3.999-DANGEROUS/lib/t/data/crypt-gnupg/secring.gpg
==============================================================================
Binary files. No diff available.

Modified: rt/branches/3.999-DANGEROUS/lib/t/data/crypt-gnupg/trustdb.gpg
==============================================================================
Binary files. No diff available.

Modified: rt/branches/3.999-DANGEROUS/t/mail/crypt-gnupg.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/mail/crypt-gnupg.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/mail/crypt-gnupg.t	Thu Jan 31 19:46:03 2008
@@ -31,10 +31,10 @@
 {
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Encrypt => 0, Passphrase => 'test' );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, encrypt => 0, Passphrase => 'test' );
     ok( $entity, 'signed entity');
     ok( !$res{'logger'}, "log is here as well" );
     warn $res{'logger'};
@@ -42,7 +42,7 @@
     is( scalar @status, 2, 'two records: passphrase, signing');
     is( $status[0]->{'Operation'}, 'PassphraseCheck', 'operation is correct');
     is( $status[0]->{'Status'}, 'DONE', 'good passphrase');
-    is( $status[1]->{'Operation'}, 'Sign', 'operation is correct');
+    is( $status[1]->{'Operation'}, 'sign', 'operation is correct');
     is( $status[1]->{'Status'}, 'DONE', 'done');
     is( $status[1]->{'User'}->{'email'}, 'rt at example.com', 'correct email');
 
@@ -68,10 +68,10 @@
 {
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Encrypt => 0, Passphrase => '' );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, encrypt => 0, Passphrase => '' );
     ok( $res{'exit_code'}, "couldn't sign without passphrase");
     ok( $res{'error'}, "error is here" );
     ok( $res{'logger'}, "log is here as well" );
@@ -86,10 +86,10 @@
 {
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Encrypt => 0, Passphrase => 'wrong' );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, encrypt => 0, Passphrase => 'wrong' );
     ok( $res{'exit_code'}, "couldn't sign with bad passphrase");
     ok( $res{'error'}, "error is here" );
     ok( $res{'logger'}, "log is here as well" );
@@ -105,16 +105,16 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Sign => 0 );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, sign => 0 );
     ok( !$res{'exit_code'}, "successful encryption" );
     ok( !$res{'logger'}, "no records in logger" );
 
     my @status = RT::Crypt::GnuPG::parse_status( $res{'status'} );
     is( scalar @status, 1, 'one record');
-    is( $status[0]->{'Operation'}, 'Encrypt', 'operation is correct');
+    is( $status[0]->{'Operation'}, 'encrypt', 'operation is correct');
     is( $status[0]->{'Status'}, 'DONE', 'done');
 
     ok($entity, 'get an encrypted part');
@@ -131,10 +131,10 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'keyless at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Sign => 0 );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, sign => 0 );
     ok( $res{'exit_code'}, 'no way to encrypt without keys of recipients');
     ok( $res{'logger'}, "errors are in logger" );
 
@@ -148,7 +148,7 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
     my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Passphrase => 'test' );
@@ -159,9 +159,9 @@
     is( scalar @status, 3, 'three records: passphrase, sign and encrypt');
     is( $status[0]->{'Operation'}, 'PassphraseCheck', 'operation is correct');
     is( $status[0]->{'Status'}, 'DONE', 'done');
-    is( $status[1]->{'Operation'}, 'Sign', 'operation is correct');
+    is( $status[1]->{'Operation'}, 'sign', 'operation is correct');
     is( $status[1]->{'Status'}, 'DONE', 'done');
-    is( $status[2]->{'Operation'}, 'Encrypt', 'operation is correct');
+    is( $status[2]->{'Operation'}, 'encrypt', 'operation is correct');
     is( $status[2]->{'Status'}, 'DONE', 'done');
 
     ok($entity, 'get an encrypted and signed part');
@@ -178,13 +178,13 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Sign => 0 );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, sign => 0 );
     ok( !$res{'exit_code'}, 'successful encryption' );
     ok( !$res{'logger'}, "no records in logger" );
-    %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Encrypt => 0, Passphrase => 'test' );
+    %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, encrypt => 0, Passphrase => 'test' );
     ok( !$res{'exit_code'}, 'successful signing' );
     ok( !$res{'logger'}, "no records in logger" );
 
@@ -200,14 +200,14 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Sign => 0 );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, sign => 0 );
     ok( !$res{'exit_code'}, "success" );
     $entity->make_multipart( 'mixed', Force => 1 );
     $entity->attach(
-        type => 'text/plain',
+        Type => 'text/plain',
         Data => ['-'x76, 'this is mailing list'],
     );
 
@@ -223,10 +223,10 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Sign => 0 );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, sign => 0 );
     ok( !$res{'exit_code'}, 'success' );
     $entity->head->mime_attr( 'Content-Type.protocol' => undef );
 
@@ -239,10 +239,10 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Sign => 0 );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, sign => 0 );
     ok( !$res{'exit_code'}, 'success' );
     $entity->parts([ $entity->parts(0) ]);
 
@@ -255,10 +255,10 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Sign => 0 );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, sign => 0 );
     ok( !$res{'exit_code'}, 'success' );
     $entity->head->mime_attr( 'Content-Type.protocol' => 'application/bad-proto' );
 
@@ -271,10 +271,10 @@
     my $entity = MIME::Entity->build(
         From    => 'rt at example.com',
         To      => 'rt at example.com',
-        subject => 'test',
+        Subject => 'test',
         Data    => ['test'],
     );
-    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, Encrypt => 0, Passphrase => 'test' );
+    my %res = RT::Crypt::GnuPG::sign_encrypt( Entity => $entity, encrypt => 0, Passphrase => 'test' );
     ok( !$res{'exit_code'}, 'success' );
     $entity->head->mime_attr( 'Content-Type.protocol' => 'application/bad-proto' );
 

Modified: rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t	Thu Jan 31 19:46:03 2008
@@ -28,6 +28,7 @@
         },
     );
     $m->content_like( qr/Object Created/, 'Created CF sucessfully' );
+    die $m->content;
     $cfid = $m->form_name('ModifyCustomField')->value('id');
     ok $cfid, "found id of the CF in the form, it's #$cfid";
 }

Modified: rt/branches/3.999-DANGEROUS/t/web/crypt-gnupg.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/crypt-gnupg.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/crypt-gnupg.t	Thu Jan 31 19:46:03 2008
@@ -66,8 +66,8 @@
 ok $m->login, 'logged in';
 
 $m->get_ok("/Admin/Queues/Modify.html?id=$qid");
-$m->form_with_fields('Sign', 'Encrypt');
-$m->field(Encrypt => 1);
+$m->form_with_fields('sign', 'encrypt');
+$m->field(encrypt => 1);
 $m->submit;
 
 RT::Test->fetch_caught_mails;
@@ -77,8 +77,8 @@
 
 $m->field('subject', 'Encryption test');
 $m->field('Content', 'Some content');
-ok($m->value('Encrypt', 2), "encrypt tick box is checked");
-ok(!$m->value('Sign', 2), "sign tick box is unchecked");
+ok($m->value('encrypt', 2), "encrypt tick box is checked");
+ok(!$m->value('sign', 2), "sign tick box is unchecked");
 $m->submit;
 is($m->status, 200, "request successful");
 
@@ -134,9 +134,9 @@
 }
 
 $m->get("$baseurl/Admin/Queues/Modify.html?id=$qid");
-$m->form_with_fields('Sign', 'Encrypt');
-$m->field(Encrypt => undef);
-$m->field(Sign => 1);
+$m->form_with_fields('sign', 'encrypt');
+$m->field(encrypt => undef);
+$m->field(sign => 1);
 $m->submit;
 
 RT::Test->fetch_caught_mails;
@@ -145,8 +145,8 @@
 $m->form_name('TicketCreate');
 $m->field('subject', 'Signing test');
 $m->field('Content', 'Some other content');
-ok(!$m->value('Encrypt', 2), "encrypt tick box is unchecked");
-ok($m->value('Sign', 2), "sign tick box is checked");
+ok(!$m->value('encrypt', 2), "encrypt tick box is unchecked");
+ok($m->value('sign', 2), "sign tick box is checked");
 $m->submit;
 is($m->status, 200, "request successful");
 
@@ -206,9 +206,9 @@
 }
 
 $m->get("$baseurl/Admin/Queues/Modify.html?id=$qid");
-$m->form_with_fields('Sign', 'Encrypt');
-$m->field(Encrypt => 1);
-$m->field(Sign => 1);
+$m->form_with_fields('sign', 'encrypt');
+$m->field(encrypt => 1);
+$m->field(sign => 1);
 $m->submit;
 
 RT::Test->fetch_caught_mails;
@@ -217,8 +217,8 @@
 $m->form_name('TicketCreate');
 $m->field('subject', 'Crypt+Sign test');
 $m->field('Content', 'Some final? content');
-ok($m->value('Encrypt', 2), "encrypt tick box is checked");
-ok($m->value('Sign', 2), "sign tick box is checked");
+ok($m->value('encrypt', 2), "encrypt tick box is checked");
+ok($m->value('sign', 2), "sign tick box is checked");
 $m->submit;
 is($m->status, 200, "request successful");
 $m->get($baseurl); # ensure that the mail has been processed
@@ -281,9 +281,9 @@
 $m->form_name('TicketCreate');
 $m->field('subject', 'Test crypt-off on encrypted queue');
 $m->field('Content', 'Thought you had me figured out didya');
-$m->field(Encrypt => undef, 2); # turn off encryption
-ok(!$m->value('Encrypt', 2), "encrypt tick box is now unchecked");
-ok($m->value('Sign', 2), "sign tick box is still checked");
+$m->field(encrypt => undef, 2); # turn off encryption
+ok(!$m->value('encrypt', 2), "encrypt tick box is now unchecked");
+ok($m->value('sign', 2), "sign tick box is still checked");
 $m->submit;
 is($m->status, 200, "request successful");
 

Modified: rt/branches/3.999-DANGEROUS/t/web/gnupg-outgoing.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/gnupg-outgoing.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/gnupg-outgoing.t	Thu Jan 31 19:46:03 2008
@@ -47,9 +47,9 @@
 
 my @variants = (
     {},
-    { Sign => 1 },
-    { Encrypt => 1 },
-    { Sign => 1, Encrypt => 1 },
+    { sign => 1 },
+    { encrypt => 1 },
+    { sign => 1, encrypt => 1 },
 );
 
 # collect emails
@@ -66,15 +66,15 @@
         set_queue_crypt_options( %$variant );
         $m->goto_create_ticket( $queue );
         $m->form_name('TicketCreate');
-        if ( $variant->{'Encrypt'} ) {
-            ok $m->value('Encrypt', 2), "encrypt tick box is checked";
+        if ( $variant->{'encrypt'} ) {
+            ok $m->value('encrypt', 2), "encrypt tick box is checked";
         } else {
-            ok !$m->value('Encrypt', 2), "encrypt tick box is unchecked";
+            ok !$m->value('encrypt', 2), "encrypt tick box is unchecked";
         }
-        if ( $variant->{'Sign'} ) {
-            ok $m->value('Sign', 2), "sign tick box is checked";
+        if ( $variant->{'sign'} ) {
+            ok $m->value('sign', 2), "sign tick box is checked";
         } else {
-            ok !$m->value('Sign', 2), "sign tick box is unchecked";
+            ok !$m->value('sign', 2), "sign tick box is unchecked";
         }
     }
 
@@ -94,15 +94,15 @@
         $m->goto_ticket( $id );
         $m->follow_link_ok({text => 'Reply'}, '-> reply');
         $m->form_number(3);
-        if ( $variant->{'Encrypt'} ) {
-            ok $m->value('Encrypt', 2), "encrypt tick box is checked";
+        if ( $variant->{'encrypt'} ) {
+            ok $m->value('encrypt', 2), "encrypt tick box is checked";
         } else {
-            ok !$m->value('Encrypt', 2), "encrypt tick box is unchecked";
+            ok !$m->value('encrypt', 2), "encrypt tick box is unchecked";
         }
-        if ( $variant->{'Sign'} ) {
-            ok $m->value('Sign', 2), "sign tick box is checked";
+        if ( $variant->{'sign'} ) {
+            ok $m->value('sign', 2), "sign tick box is checked";
         } else {
-            ok !$m->value('Sign', 2), "sign tick box is unchecked";
+            ok !$m->value('sign', 2), "sign tick box is unchecked";
         }
     }
 }
@@ -256,7 +256,7 @@
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content    => 'Some content' );
 
-    foreach ( qw(Sign Encrypt) ) {
+    foreach ( qw(sign encrypt) ) {
         if ( $args{ $_ } ) {
             $m->tick( $_ => 1 );
         } else {
@@ -287,7 +287,7 @@
     $m->form_number(3);
     $m->field( UpdateContent => 'Some content' );
 
-    foreach ( qw(Sign Encrypt) ) {
+    foreach ( qw(sign encrypt) ) {
         if ( $args{ $_ } ) {
             $m->tick( $_ => 1 );
         } else {
@@ -311,24 +311,24 @@
 
     ok scalar @mail, "got some mail";
     for my $mail (@mail) {
-        if ( $args{'Encrypt'} ) {
+        if ( $args{'encrypt'} ) {
             unlike $mail, qr/Some content/, "outgoing email was encrypted";
         } else {
             like $mail, qr/Some content/, "outgoing email was not encrypted";
         } 
-        if ( $args{'Sign'} && $args{'Encrypt'} ) {
+        if ( $args{'sign'} && $args{'encrypt'} ) {
             like $mail, qr/BEGIN PGP MESSAGE/, 'outgoing email was signed';
-        } elsif ( $args{'Sign'} ) {
+        } elsif ( $args{'sign'} ) {
             like $mail, qr/SIGNATURE/, 'outgoing email was signed';
         } else {
             unlike $mail, qr/SIGNATURE/, 'outgoing email was not signed';
         }
     }
-    if ( $args{'Sign'} && $args{'Encrypt'} ) {
+    if ( $args{'sign'} && $args{'encrypt'} ) {
         push @{ $mail{'signed_encrypted'} }, @mail;
-    } elsif ( $args{'Sign'} ) {
+    } elsif ( $args{'sign'} ) {
         push @{ $mail{'signed'} }, @mail;
-    } elsif ( $args{'Encrypt'} ) {
+    } elsif ( $args{'encrypt'} ) {
         push @{ $mail{'encrypted'} }, @mail;
     } else {
         push @{ $mail{'plain'} }, @mail;
@@ -349,8 +349,8 @@
 sub set_queue_crypt_options {
     my %args = @_;
     $m->get_ok("/Admin/Queues/Modify.html?id=". $queue->id);
-    $m->form_with_fields('Sign', 'Encrypt');
-    foreach my $opt ('Sign', 'Encrypt') {
+    $m->form_with_fields('sign', 'encrypt');
+    foreach my $opt ('sign', 'encrypt') {
         if ( $args{$opt} ) {
             $m->tick($opt => 1);
         } else {

Modified: rt/branches/3.999-DANGEROUS/t/web/gnupg-select-keys-on-create.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/gnupg-select-keys-on-create.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/gnupg-select-keys-on-create.t	Thu Jan 31 19:46:03 2008
@@ -49,7 +49,7 @@
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
     $m->form_number(3);
-    $m->tick( Sign => 1 );
+    $m->tick( sign => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
     $m->submit;
@@ -75,7 +75,7 @@
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
     $m->submit;
@@ -110,7 +110,7 @@
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
     $m->submit;
@@ -157,7 +157,7 @@
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
     $m->submit;
@@ -202,7 +202,7 @@
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
     $m->submit;
@@ -229,7 +229,7 @@
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
     $m->submit;
@@ -252,7 +252,7 @@
 
     my @mail = RT::Test->fetch_caught_mails;
     ok @mail, 'there are some emails';
-    check_text_emails( { Encrypt => 1 }, @mail );
+    check_text_emails( { encrypt => 1 }, @mail );
 }
 
 diag "check encrypting of attachments";
@@ -261,7 +261,7 @@
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
     $m->field( Attach => $0 );
@@ -285,7 +285,7 @@
 
     my @mail = RT::Test->fetch_caught_mails;
     ok @mail, 'there are some emails';
-    check_text_emails( { Encrypt => 1, Attachment => 1 }, @mail );
+    check_text_emails( { encrypt => 1, Attachment => 1 }, @mail );
 }
 
 sub check_text_emails {
@@ -301,7 +301,7 @@
                         ? "Some content"
                         : "Attachment content";
 
-            if ( $args{'Encrypt'} ) {
+            if ( $args{'encrypt'} ) {
                 unlike $mail, qr/$content/, "outgoing $type was encrypted";
             } else {
                 like $mail, qr/$content/, "outgoing $type was not encrypted";
@@ -309,9 +309,9 @@
 
             next unless $type eq 'email';
 
-            if ( $args{'Sign'} && $args{'Encrypt'} ) {
+            if ( $args{'sign'} && $args{'encrypt'} ) {
                 like $mail, qr/BEGIN PGP MESSAGE/, 'outgoing email was signed';
-            } elsif ( $args{'Sign'} ) {
+            } elsif ( $args{'sign'} ) {
                 like $mail, qr/SIGNATURE/, 'outgoing email was signed';
             } else {
                 unlike $mail, qr/SIGNATURE/, 'outgoing email was not signed';

Modified: rt/branches/3.999-DANGEROUS/t/web/gnupg-select-keys-on-update.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/gnupg-select-keys-on-update.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/gnupg-select-keys-on-update.t	Thu Jan 31 19:46:03 2008
@@ -61,7 +61,7 @@
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
     $m->form_number(3);
-    $m->tick( Sign => 1 );
+    $m->tick( sign => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
     $m->click('SubmitTicket');
@@ -88,7 +88,7 @@
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
     $m->click('SubmitTicket');
@@ -125,7 +125,7 @@
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
     $m->click('SubmitTicket');
@@ -173,7 +173,7 @@
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
     $m->click('SubmitTicket');
@@ -219,7 +219,7 @@
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
     $m->click('SubmitTicket');
@@ -247,7 +247,7 @@
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
     $m->click('SubmitTicket');
@@ -270,7 +270,7 @@
 
     my @mail = RT::Test->fetch_caught_mails;
     ok @mail, 'there are some emails';
-    check_text_emails( { Encrypt => 1 }, @mail );
+    check_text_emails( { encrypt => 1 }, @mail );
 }
 
 diag "check encrypting of attachments";
@@ -280,7 +280,7 @@
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
     $m->form_number(3);
-    $m->tick( Encrypt => 1 );
+    $m->tick( encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
     $m->field( Attach => $0 );
@@ -304,7 +304,7 @@
 
     my @mail = RT::Test->fetch_caught_mails;
     ok @mail, 'there are some emails';
-    check_text_emails( { Encrypt => 1, Attachment => 1 }, @mail );
+    check_text_emails( { encrypt => 1, Attachment => 1 }, @mail );
 }
 
 sub check_text_emails {
@@ -320,7 +320,7 @@
                         ? "Some content"
                         : "Attachment content";
 
-            if ( $args{'Encrypt'} ) {
+            if ( $args{'encrypt'} ) {
                 unlike $mail, qr/$content/, "outgoing $type was encrypted";
             } else {
                 like $mail, qr/$content/, "outgoing $type was not encrypted";
@@ -328,9 +328,9 @@
 
             next unless $type eq 'email';
 
-            if ( $args{'Sign'} && $args{'Encrypt'} ) {
+            if ( $args{'sign'} && $args{'encrypt'} ) {
                 like $mail, qr/BEGIN PGP MESSAGE/, 'outgoing email was signed';
-            } elsif ( $args{'Sign'} ) {
+            } elsif ( $args{'sign'} ) {
                 like $mail, qr/SIGNATURE/, 'outgoing email was signed';
             } else {
                 unlike $mail, qr/SIGNATURE/, 'outgoing email was not signed';


More information about the Rt-commit mailing list