« auto/share/dist/Dist-Zilla-MintingProfile-AppKitX/profiles/default/skel/t/lib/TestApp.pm
↑ Summary
auto/share/dist/Dist-Zilla-MintingProfile-AppKitX/profiles/default/skel/t/lib/script/testapp_server.pl »
| 1 | package TestApp::Builder; | ||
| 2 | |||
| 3 | use Moose; | ||
| 4 | extends 'OpusVL::AppKit::Builder'; | ||
| 5 | |||
| 6 | override _build_superclasses => sub | ||
| 7 | { | ||
| 8 | return [ 'OpusVL::AppKit' ] | ||
| 9 | }; | ||
| 10 | |||
| 11 | override _build_plugins => sub { | ||
| 12 | my $plugins = super(); # Get what CatalystX::AppBuilder gives you | ||
| 13 | |||
| 14 | push @$plugins, qw( | ||
| 15 | +{{ $dist->name =~ s/-/::/gr }} | ||
| 16 | ); | ||
| 17 | |||
| 18 | return $plugins; | ||
| 19 | }; | ||
| 20 | |||
| 21 | override _build_config => sub { | ||
| 22 | my $self = shift; | ||
| 23 | my $config = super(); # Get what CatalystX::AppBuilder gives you | ||
| 24 | |||
| 25 | # point the AppKitAuth Model to the correct DB file.... | ||
| 26 | $config->{'Model::AppKitAuthDB'} = | ||
| 27 | { | ||
| 28 | schema_class => 'OpusVL::AppKit::Schema::AppKitAuthDB', | ||
| 29 | connect_info => [ | ||
| 30 | 'dbi:SQLite:' . TestApp->path_to('root','appkit-auth.db'), | ||
| 31 | ], | ||
| 32 | }; | ||
| 33 | |||
| 34 | # .. add static dir into the config for Static::Simple.. | ||
| 35 | my $static_dirs = $config->{static}->{include_path}; | ||
| 36 | unshift(@$static_dirs, TestApp->path_to('root')); | ||
| 37 | $config->{static}->{include_path} = $static_dirs; | ||
| 38 | |||
| 39 | # .. allow access regardless of ACL rules... | ||
| 40 | $config->{'appkit_can_access_actionpaths'} = ['custom/custom']; | ||
| 41 | |||
| 42 | # DEBUGIN!!!! | ||
| 43 | $config->{'appkit_can_access_everything'} = 1; | ||
| 44 | |||
| 45 | $config->{application_name} = 'AppKit TestApp'; | ||
| 46 | $config->{default_view} = 'AppKitTT'; | ||
| 47 | |||
| 48 | return $config; | ||
| 49 | }; | ||
| 50 | |||
| 51 | 1; |