App-Dochazka-REST
view release on metacpan or search on metacpan
'App::CELL' => 0.215,
'App::Dochazka::Common' => 0.205,
'Authen::Passphrase::SaltedDigest' => 0.008,
'Date::Holidays::CZ' => 0.12,
'DBIx::Connector' => 0.47,
'File::ShareDir::Install' => 0.11,
'File::Slurp' => 0,
'HTTP::Request' => 0,
'Mason' => 0,
'Plack::Test' => 0,
'Test::Fatal' => 0,
'Test::JSON' => 0,
'Test::Warnings' => 0,
'Web::Machine' => 0.15,
'Web::MREST' => 0.287,
'Web::MREST::CLI' => 0.276,
},
requires => {
'perl' => 5.012,
'App::CELL' => 0.215,
'App::Dochazka::Common' => 0.207,
- allow site admin to set nick-to-LDAP mapping (DOCHAZKA_LDAP_NICK_MAPPING)
0.124 2014-07-31 15:38 CEST
- resolve ticket "make LDAP auth switchable so unit testing scripts can
disable it" by adding META_DOCHAZKA_UNIT_TESTING meta param and testing
for it in Resource.pm
- LDAP.pm now exports the ldap_exists and ldap_auth functions
0.125 2014-07-31 16:33 CEST
- t/000-depends.t: add dependency on Params::Validate
- Build.PL: build_require Test::Fatal, require Params::Validate
- Model/Activity.pm: add parameter validation code
0.126 2014-08-01 13:23 CEST
- Model/Activity.pm: load_by_code, load_by_aid, _load now use "best practices"
established in Model/Employee.pm
- start adding parameter validation code using Param::Validate
- start adding unit tests for the new parameter validation code
0.127 2014-08-01 17:07 CEST
- cleanup, validate parameters, add some tests that call functions with
"App::CELL" : "0.215",
"App::Dochazka::Common" : "0.205",
"Authen::Passphrase::SaltedDigest" : "0.008",
"DBIx::Connector" : "0.47",
"Date::Holidays::CZ" : "0.12",
"File::ShareDir::Install" : "0.11",
"File::Slurp" : "0",
"HTTP::Request" : "0",
"Mason" : "0",
"Plack::Test" : "0",
"Test::Fatal" : "0",
"Test::JSON" : "0",
"Test::Warnings" : "0",
"Web::MREST" : "0.287",
"Web::MREST::CLI" : "0.276",
"Web::Machine" : "0.15"
}
},
"configure" : {
"requires" : {
"Module::Build" : "0"
App::CELL: '0.215'
App::Dochazka::Common: '0.205'
Authen::Passphrase::SaltedDigest: '0.008'
DBIx::Connector: '0.47'
Date::Holidays::CZ: '0.12'
File::ShareDir::Install: '0.11'
File::Slurp: '0'
HTTP::Request: '0'
Mason: '0'
Plack::Test: '0'
Test::Fatal: '0'
Test::JSON: '0'
Test::Warnings: '0'
Web::MREST: '0.287'
Web::MREST::CLI: '0.276'
Web::Machine: '0.15'
configure_requires:
Module::Build: '0'
dynamic_config: 1
generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150010'
license: bsd
t/dispatch/001-resource.t view on Meta::CPAN
#use App::CELL::Test::LogToFile;
use App::CELL qw( $log $meta $site );
use App::CELL::Status;
use App::Dochazka::REST::Test;
use Data::Dumper;
use HTTP::Request::Common qw( GET PUT POST DELETE );
use JSON;
use Plack::Test;
use Scalar::Util qw( blessed );
use Test::Fatal;
use Test::JSON;
use Test::More;
use Test::Warnings;
use Web::MREST::Resource;
note( 'initialize, connect to database, and set up a testing plan' );
my $app = initialize_regression_test();
isnt( $app, undef );
note( 'instantiate Plack::Test object' );
);
use App::Dochazka::REST::Fillup;
use App::Dochazka::REST::Model::Tempintvl;
use App::Dochazka::REST::Model::Shared qw(
noof
schedule_by_eid
);
use App::Dochazka::REST::Model::Schedhistory;
use App::Dochazka::REST::Test;
use Test::More;
use Test::Fatal;
my ( $note, $status );
# given a Fillup object with populated context, reset it
# without clobbering the context
sub reset_obj {
my $obj = shift;
my $saved_context = $obj->context;
$obj->reset;
$obj->context( $saved_context );
t/model/activity.t view on Meta::CPAN
use 5.012;
use strict;
use warnings;
#use App::CELL::Test::LogToFile;
use App::CELL qw( $meta $site );
use Data::Dumper;
use App::Dochazka::REST::ConnBank qw( $dbix_conn );
use App::Dochazka::REST::Model::Activity qw( aid_by_code aid_exists code_exists get_all_activities );
use App::Dochazka::REST::Test;
use Test::Fatal;
use Test::More;
use Test::Warnings;
note( "initialize, connect to database, and set up a testing plan" );
initialize_regression_test();
note( 'spawn two activity objects' );
my $act = App::Dochazka::REST::Model::Activity->spawn;
isa_ok( $act, 'App::Dochazka::REST::Model::Activity' );
t/model/component.t view on Meta::CPAN
use 5.012;
use strict;
use warnings;
#use App::CELL::Test::LogToFile;
use App::CELL qw( $meta $site );
use Data::Dumper;
use App::Dochazka::REST::ConnBank qw( $dbix_conn );
use App::Dochazka::REST::Model::Component qw( cid_by_path cid_exists path_exists );
use App::Dochazka::REST::Test;
use Test::Fatal;
use Test::More;
use Test::Warnings;
note( "initialize, connect to database, and set up a testing plan" );
initialize_regression_test();
note( 'spawn two component objects' );
my $comp = App::Dochazka::REST::Model::Component->spawn;
isa_ok( $comp, 'App::Dochazka::REST::Model::Component' );
t/model/employee.t view on Meta::CPAN
use Data::Dumper;
use App::Dochazka::REST::ConnBank qw( $dbix_conn );
use App::Dochazka::REST::Model::Employee qw(
eid_exists
get_all_sync_employees
list_employees_by_priv
nick_exists
);
use App::Dochazka::REST::Model::Shared qw( noof );
use App::Dochazka::REST::Test;
use Test::Fatal;
use Test::More;
use Test::Warnings;
note( 'initialize, connect to database, and set up a testing plan' );
initialize_regression_test();
note( 'get EID of root employee from DOCHAZKA_EID_OF_ROOT site parameter' );
# (root employee is created at dbinit time)
my $eid_of_root = $site->DOCHAZKA_EID_OF_ROOT;
ok( $eid_of_root, "EID of root is not zero or undef" );
t/model/split_tsrange.t view on Meta::CPAN
use strict;
use warnings;
#use App::CELL::Test::LogToFile;
use App::CELL qw( $meta $site );
use Data::Dumper;
use DBI;
use App::Dochazka::REST::ConnBank qw( $dbix_conn );
use App::Dochazka::REST::Model::Shared qw( split_tsrange );
use App::Dochazka::REST::Test;
use Test::Fatal;
use Test::More;
use Test::Warnings;
sub test_is_ok {
my ( $status ) = @_;
is( $status->level, 'OK' );
is( $status->code, 'DISPATCH_RECORDS_FOUND' );
}
note( 'initialize, connect to database, and set up a testing plan' );
t/unit/ACL.t view on Meta::CPAN
#!perl
use 5.012;
use strict;
use warnings;
#use App::CELL::Test::LogToFile;
use App::CELL qw( $meta $site );
use Data::Dumper;
use App::Dochazka::REST::ACL qw( check_acl );
use App::Dochazka::REST::Test;
use Test::Fatal;
use Test::More;
use Test::Warnings;
note( 'check_acl() tests' );
my $profile = 'passerby';
note( "check privlevel logic: $profile" );
ok( check_acl( profile => $profile, privlevel => 'passerby' ) );
ok( check_acl( profile => $profile, privlevel => 'inactive' ) );
ok( check_acl( profile => $profile, privlevel => 'active' ) );
( run in 1.391 second using v1.01-cache-2.11-cpan-54e63673c56 )