Changeset 22809
- Timestamp:
- 11/06/08 15:37:48 (8 months ago)
- Location:
- lang/perl/Catalyst-Controller-RequestToken/trunk
- Files:
-
- 3 removed
- 7 modified
-
.gitignore (deleted)
-
.shipit (modified) (1 diff)
-
MANIFEST (modified) (2 diffs)
-
META.yml (modified) (3 diffs)
-
inc (deleted)
-
lib/Catalyst/Controller/RequestToken.pm (modified) (8 diffs)
-
lib/Catalyst/Controller/RequestToken/Action/ValidateRemoveToken.pm (deleted)
-
lib/Catalyst/Controller/RequestToken/Action/ValidateToken.pm (modified) (1 diff)
-
t/lib/TestApp/Controller/Simple.pm (modified) (2 diffs)
-
t/live-test.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Catalyst-Controller-RequestToken/trunk/.shipit
r14891 r22809 1 1 steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN 2 git.tagpattern = %v 3 git.push_to = origi 2 svk.tagpattern = release-%v 4 3 -
lang/perl/Catalyst-Controller-RequestToken/trunk/MANIFEST
r14891 r22809 1 .gitignore2 1 .shipit 3 2 Changes … … 13 12 lib/Catalyst/Controller/RequestToken/Action/CreateToken.pm 14 13 lib/Catalyst/Controller/RequestToken/Action/RemoveToken.pm 15 lib/Catalyst/Controller/RequestToken/Action/ValidateRemoveToken.pm16 14 lib/Catalyst/Controller/RequestToken/Action/ValidateToken.pm 17 15 LICENSE -
lang/perl/Catalyst-Controller-RequestToken/trunk/META.yml
r14891 r22809 2 2 abstract: 'Handling transaction token across forms' 3 3 author: 4 - 'Hideo Kimura C<< <<hide @hide-k.net>> >>'4 - 'Hideo Kimura C<< <<hide<at>hide-k.net>> >>' 5 5 build_requires: 6 6 Catalyst::Action::RenderView: 0 … … 12 12 ok: 0 13 13 distribution_type: module 14 generated_by: 'Module::Install version 0.7 5'14 generated_by: 'Module::Install version 0.77' 15 15 license: perl 16 16 meta-spec: 17 url: http://module-build.sourceforge.net/META-spec-v1. 3.html18 version: 1. 317 url: http://module-build.sourceforge.net/META-spec-v1.4.html 18 version: 1.4 19 19 name: Catalyst-Controller-RequestToken 20 20 no_index: … … 22 22 - inc 23 23 - t 24 resources: 25 license: http://dev.perl.org/licenses/ 24 26 version: 0.02 -
lang/perl/Catalyst-Controller-RequestToken/trunk/lib/Catalyst/Controller/RequestToken.pm
r14891 r22809 6 6 use base qw(Catalyst::Controller); 7 7 8 use Catalyst::Exception;9 8 use Scalar::Util qw/weaken/; 10 9 use Class::C3; … … 14 13 15 14 sub ACCEPT_CONTEXT { 16 my $self = shift; 17 my $c = shift; 15 my ($self, $c) = @_; 18 16 19 17 $self->{c} = $c; … … 46 44 sub token { 47 45 my ( $self, $arg ) = @_; 46 48 47 my $c = $self->{c}; 49 48 … … 58 57 sub create_token { 59 58 my ( $self, $arg ) = @_; 59 60 60 my $c = $self->{c}; 61 61 … … 72 72 sub remove_token { 73 73 my ( $self, $arg ) = @_; 74 74 75 my $c = $self->{c}; 75 76 … … 81 82 sub validate_token { 82 83 my ( $self, $arg ) = @_; 84 83 85 my $c = $self->{c}; 84 86 my $conf = $self->config; … … 106 108 sub is_valid_token { 107 109 my ( $self, $arg ) = @_; 110 108 111 my $c = $self->{c}; 109 112 … … 330 333 =head1 AUTHOR 331 334 332 Hideo Kimura C<< <<hide @hide-k.net>> >>335 Hideo Kimura C<< <<hide<at>hide-k.net>> >> 333 336 334 337 =head1 COPYRIGHT -
lang/perl/Catalyst-Controller-RequestToken/trunk/lib/Catalyst/Controller/RequestToken/Action/ValidateToken.pm
r14891 r22809 11 11 12 12 $controller->validate_token; 13 $controller->remove_token; 13 14 return $self->next::method(@_); 14 15 } -
lang/perl/Catalyst-Controller-RequestToken/trunk/t/lib/TestApp/Controller/Simple.pm
r14891 r22809 26 26 } 27 27 28 sub confirm : Local ValidateToken{28 sub confirm : Local { 29 29 my ( $self, $c ) = @_; 30 30 31 $c->detach('error') unless $self->is_valid_token;31 #$c->detach('error') unless $self->is_valid_token; 32 32 my $html = <<HTML; 33 33 <html> … … 46 46 } 47 47 48 sub complete : Local Validate RemoveToken {48 sub complete : Local ValidateToken { 49 49 my ( $self, $c ) = @_; 50 50 -
lang/perl/Catalyst-Controller-RequestToken/trunk/t/live-test.t
r14891 r22809 16 16 my $mech = Test::WWW::Mechanize::Catalyst->new; 17 17 $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'); 19 19 20 20 $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'); 22 22 23 23 $mech->submit_form_ok({}, 'submit form'); 24 $mech->content_like(qr/CONFIRM/i, 's ee if it has our text');24 $mech->content_like(qr/CONFIRM/i, 'submit to confirm page - valid'); 25 25 26 26 $mech->submit_form_ok({}, 'submit form'); 27 $mech->content_like(qr/SUCCESS/i, 's ee if it has our text');27 $mech->content_like(qr/SUCCESS/i, 'submit to success page - valid'); 28 28 29 29 $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 32 32 $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'); 34 34 35 35 $mech->submit; 36 $mech->content_like(qr/INVALID ACCESS/i, 's ee if it has our text');36 $mech->content_like(qr/INVALID ACCESS/i, 'submit to success page - invalid'); 37 37 38 38 $mech->back; 39 39 $mech->back; 40 40 $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'); 42 42 $mech->submit; 43 $mech->content_like(qr/CONFIRM/i, 's ee if it has our text');43 $mech->content_like(qr/CONFIRM/i, 'submit to confirm page - valid'); 44 44 $mech->submit; 45 $mech->content_like(qr/SUCCESS/i, 's ee if it has our text');45 $mech->content_like(qr/SUCCESS/i, 'submit to success page - valid'); 46 46 =cut
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)