Changeset 22809

Show
Ignore:
Timestamp:
11/06/08 15:37:48 (2 months ago)
Author:
hidek
Message:

API戻した

Location:
lang/perl/Catalyst-Controller-RequestToken/trunk
Files:
3 removed
7 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Catalyst-Controller-RequestToken/trunk/.shipit

    r14891 r22809  
    11steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN 
    2 git.tagpattern = %v 
    3 git.push_to    = origi 
     2svk.tagpattern = release-%v 
    43 
  • lang/perl/Catalyst-Controller-RequestToken/trunk/MANIFEST

    r14891 r22809  
    1 .gitignore 
    21.shipit 
    32Changes 
     
    1312lib/Catalyst/Controller/RequestToken/Action/CreateToken.pm 
    1413lib/Catalyst/Controller/RequestToken/Action/RemoveToken.pm 
    15 lib/Catalyst/Controller/RequestToken/Action/ValidateRemoveToken.pm 
    1614lib/Catalyst/Controller/RequestToken/Action/ValidateToken.pm 
    1715LICENSE 
  • lang/perl/Catalyst-Controller-RequestToken/trunk/META.yml

    r14891 r22809  
    22abstract: 'Handling transaction token across forms' 
    33author: 
    4   - 'Hideo Kimura C<< <<hide@hide-k.net>> >>' 
     4  - 'Hideo Kimura C<< <<hide<at>hide-k.net>> >>' 
    55build_requires: 
    66  Catalyst::Action::RenderView: 0 
     
    1212  ok: 0 
    1313distribution_type: module 
    14 generated_by: 'Module::Install version 0.75' 
     14generated_by: 'Module::Install version 0.77' 
    1515license: perl 
    1616meta-spec: 
    17   url: http://module-build.sourceforge.net/META-spec-v1.3.html 
    18   version: 1.3 
     17  url: http://module-build.sourceforge.net/META-spec-v1.4.html 
     18  version: 1.4 
    1919name: Catalyst-Controller-RequestToken 
    2020no_index: 
     
    2222    - inc 
    2323    - t 
     24resources: 
     25  license: http://dev.perl.org/licenses/ 
    2426version: 0.02 
  • lang/perl/Catalyst-Controller-RequestToken/trunk/lib/Catalyst/Controller/RequestToken.pm

    r14891 r22809  
    66use base qw(Catalyst::Controller); 
    77 
    8 use Catalyst::Exception; 
    98use Scalar::Util qw/weaken/; 
    109use Class::C3; 
     
    1413 
    1514sub ACCEPT_CONTEXT { 
    16     my $self = shift; 
    17     my $c    = shift; 
     15    my ($self, $c) = @_; 
    1816 
    1917    $self->{c} = $c; 
     
    4644sub token { 
    4745    my ( $self, $arg ) = @_; 
     46 
    4847    my $c = $self->{c}; 
    4948 
     
    5857sub create_token { 
    5958    my ( $self, $arg ) = @_; 
     59 
    6060    my $c = $self->{c}; 
    6161 
     
    7272sub remove_token { 
    7373    my ( $self, $arg ) = @_; 
     74 
    7475    my $c = $self->{c}; 
    7576 
     
    8182sub validate_token { 
    8283    my ( $self, $arg ) = @_; 
     84 
    8385    my $c    = $self->{c}; 
    8486    my $conf = $self->config; 
     
    106108sub is_valid_token { 
    107109    my ( $self, $arg ) = @_; 
     110 
    108111    my $c    = $self->{c}; 
    109112 
     
    330333=head1 AUTHOR 
    331334 
    332 Hideo Kimura C<< <<hide@hide-k.net>> >> 
     335Hideo Kimura C<< <<hide<at>hide-k.net>> >> 
    333336 
    334337=head1 COPYRIGHT 
  • lang/perl/Catalyst-Controller-RequestToken/trunk/lib/Catalyst/Controller/RequestToken/Action/ValidateToken.pm

    r14891 r22809  
    1111 
    1212    $controller->validate_token; 
     13    $controller->remove_token; 
    1314    return $self->next::method(@_); 
    1415} 
  • lang/perl/Catalyst-Controller-RequestToken/trunk/t/lib/TestApp/Controller/Simple.pm

    r14891 r22809  
    2626} 
    2727 
    28 sub confirm : Local ValidateToken { 
     28sub confirm : Local { 
    2929    my ( $self, $c ) = @_; 
    3030 
    31     $c->detach('error') unless $self->is_valid_token; 
     31    #$c->detach('error') unless $self->is_valid_token; 
    3232    my $html = <<HTML; 
    3333<html> 
     
    4646} 
    4747 
    48 sub complete : Local ValidateRemoveToken { 
     48sub complete : Local ValidateToken { 
    4949    my ( $self, $c ) = @_; 
    5050 
  • lang/perl/Catalyst-Controller-RequestToken/trunk/t/live-test.t

    r14891 r22809  
    1616my $mech = Test::WWW::Mechanize::Catalyst->new; 
    1717$mech->get_ok('http://localhost/', 'get main page'); 
    18 $mech->content_like(qr/it works/i, 'see if it has our text'); 
     18$mech->content_like(qr/it works/i, 'index page'); 
    1919 
    2020$mech->get_ok('http://localhost/simple/form', 'get main page'); 
    21 $mech->content_like(qr/FORM/i, 'see if it has our text'); 
     21$mech->content_like(qr/FORM/i, 'form page - valid'); 
    2222 
    2323$mech->submit_form_ok({}, 'submit form'); 
    24 $mech->content_like(qr/CONFIRM/i, 'see if it has our text'); 
     24$mech->content_like(qr/CONFIRM/i, 'submit to confirm page - valid'); 
    2525 
    2626$mech->submit_form_ok({}, 'submit form'); 
    27 $mech->content_like(qr/SUCCESS/i, 'see if it has our text'); 
     27$mech->content_like(qr/SUCCESS/i, 'submit to success page - valid'); 
    2828 
    2929$mech->reload; 
    30 $mech->content_like(qr/INVALID ACCESS/i, 'see if it has our text'); 
    31 =cut 
     30$mech->content_like(qr/INVALID ACCESS/i, 'reload on success page - invalid'); 
     31 
    3232$mech->back; 
    33 $mech->content_like(qr/CONFIRM/i, 'see if it has our text'); 
     33$mech->content_like(qr/CONFIRM/i, 'back to confirm page - valid'); 
    3434 
    3535$mech->submit; 
    36 $mech->content_like(qr/INVALID ACCESS/i, 'see if it has our text'); 
     36$mech->content_like(qr/INVALID ACCESS/i, 'submit to success page - invalid'); 
    3737 
    3838$mech->back; 
    3939$mech->back; 
    4040$mech->reload; 
    41 $mech->content_like(qr/FORM/i, 'see if it has our text'); 
     41$mech->content_like(qr/FORM/i, 'back to form page - valid'); 
    4242$mech->submit; 
    43 $mech->content_like(qr/CONFIRM/i, 'see if it has our text'); 
     43$mech->content_like(qr/CONFIRM/i, 'submit to confirm page - valid'); 
    4444$mech->submit; 
    45 $mech->content_like(qr/SUCCESS/i, 'see if it has our text'); 
     45$mech->content_like(qr/SUCCESS/i, 'submit to success page - valid'); 
    4646=cut