view release on metacpan or search on metacpan
META.yml
Makefile.PL
README
SIGNATURE
dist.ini
lib/Abilities.pm
lib/Abilities/Features.pm
t/00-load.t
t/01-abilities.t
t/02-features.t
t/lib/TestCustomer.pm
t/lib/TestManager.pm
t/lib/TestPlan.pm
t/lib/TestRole.pm
t/lib/TestUser.pm
t/release-dist-manifest.t
t/release-pod-coverage.t
t/release-pod-syntax.t
"name" : "Abilities",
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.30"
}
},
"develop" : {
"requires" : {
"Pod::Coverage::TrustPod" : "0",
"Test::Pod" : "1.41",
"Test::Pod::Coverage" : "1.08"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Hash::Merge" : "0",
"Moo::Role" : "0",
"namespace::autoclean" : "0",
"perl" : "5.006"
}
},
"test" : {
"requires" : {
"Moo" : "0",
"Test::More" : "0",
"strict" : "0",
"warnings" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"homepage" : "https://github.com/ido50/Abilities",
"repository" : {
"type" : "git",
---
abstract: 'Simple, hierarchical user authorization for web applications, with optional support for plan-based (paid) services.'
author:
- 'Ido Perlmuter <ido@ido50.net>'
build_requires:
Moo: 0
Test::More: 0
strict: 0
warnings: 0
configure_requires:
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
generated_by: 'Dist::Zilla version 4.300031, CPAN::Meta::Converter version 2.120921'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Makefile.PL view on Meta::CPAN
use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
"ABSTRACT" => "Simple, hierarchical user authorization for web applications, with optional support for plan-based (paid) services.",
"AUTHOR" => "Ido Perlmuter <ido\@ido50.net>",
"BUILD_REQUIRES" => {
"Moo" => 0,
"Test::More" => 0,
"strict" => 0,
"warnings" => 0
},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30"
},
"DISTNAME" => "Abilities",
"EXE_FILES" => [],
"LICENSE" => "perl",
"NAME" => "Abilities",
SHA1 79363be94119dee40e43d2b7b32962e9bd3efc25 META.json
SHA1 9674a80d81366885a992c06f608b0964d77923c6 META.yml
SHA1 548e1b4c55b9ebc755adeab12b43235409201209 Makefile.PL
SHA1 584c885eaa73ec7b92fd17db4891fd099569fd80 README
SHA1 92f96a5defd798a8643ad925dd3b86f10e2836c2 dist.ini
SHA1 ac56180c952cdc52935ea53ce590f5d384431447 lib/Abilities.pm
SHA1 6d3acce2f84f4360a4768d93c82663a884279145 lib/Abilities/Features.pm
SHA1 b968ed1c0d3c90f8bc8d8ad970aa3e6de5fbc150 t/00-load.t
SHA1 913156ea716a1551101e218ba6e663fd37c89f18 t/01-abilities.t
SHA1 52a99df8d7dcf5e2b599fbeba6c011a99f23f820 t/02-features.t
SHA1 6a7b6c44a92ac5b4c07cad3d1addab03d01e72d8 t/lib/TestCustomer.pm
SHA1 a735c6657aeb8677e6fc8adf8b982090d5685442 t/lib/TestManager.pm
SHA1 ec23fe5e511b42f09053e897fe7006c4a5772702 t/lib/TestPlan.pm
SHA1 168a46d7f5c5a4376f6c46e90ae926e69a343c79 t/lib/TestRole.pm
SHA1 b2b28919aa35e8ef5bdc061d5f8774e8b33e06d6 t/lib/TestUser.pm
SHA1 87768d177f8c2e2df9c591cde869e7c8a245555e t/release-dist-manifest.t
SHA1 9433c240fe590bc404ab68ff63984df763e347ed t/release-pod-coverage.t
SHA1 b30cbdfaf935017c4568c0c91b242438cb87786e t/release-pod-syntax.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iF4EAREIAAYFAlGD+nsACgkQa4OHQAFM10dF1gD7BfmZneDfUYd2e4kUCzD/n/Cu
xNR4hCTHL9DxaZc70PgA/A37Fftl8En07WImobZ1UuQHl/ym24YTZttOv6ss9ket
=ocDd
-----END PGP SIGNATURE-----
t/00-load.t view on Meta::CPAN
#!perl -T
use Test::More tests => 2;
BEGIN {
use_ok( 'Abilities' ) || print "Bail out!\n";
use_ok( 'Abilities::Features' ) || print "Bail out!\n";
}
diag( "Testing Abilities $Abilities::VERSION, Perl $], $^X" );
diag( "Testing Abilities::Features $Abilities::Features::VERSION, Perl $], $^X" );
t/01-abilities.t view on Meta::CPAN
#!perl
use lib 't/lib';
use TestManager;
use TestRole;
use TestUser;
use Test::More tests => 29;
my $mg = TestManager->new;
my $ra = TestRole->new(name => 'RA', actions => ['create_comment'], mg => $mg);
my $rc = TestRole->new(name => 'RC', actions => ['do_something'], mg => $mg);
my $rb = TestRole->new(name => 'RB', actions => ['edit_comment', 'delete_comment', 'edit_post', 'delete_post'], roles => ['RC'], mg => $mg);
my $ua = TestUser->new(name => 'UA', actions => ['create_post', ['edit_post', 'his'], ['delete_post', 'his']], roles => ['RA'], mg => $mg);
my $ub = TestUser->new(name => 'UB', is_super => 1, mg => $mg);
my $uc = TestUser->new(name => 'UC', actions => [['create_post', 'news_only']], roles => ['RA', 'RB'], mg => $mg);
$mg->add_objects($ra, $rb, $rc);
ok($ra, 'Got RA');
ok($rb, 'Got RB');
ok($rc, 'Got RC');
ok($ua, 'Got UA');
ok($ub, 'Got UB');
ok($uc, 'Got UC');
t/02-features.t view on Meta::CPAN
#!perl
use lib 't/lib';
use TestManager;
use TestPlan;
use TestCustomer;
use Test::More tests => 14;
my $mg = TestManager->new;
my $pa = TestPlan->new(name => 'PA', features => ['ssl', ['storage', '5GB']], mg => $mg);
my $pb = TestPlan->new(name => 'PB', features => ['backups', ['storage', '10GB']], plans => ['PA'], mg => $mg);
my $pc = TestPlan->new(name => 'PC', features => ['backups', ['phone_support', '24hrs']], mg => $mg);
my $ca = TestCustomer->new(name => 'CA', plans => ['PA'], mg => $mg);
my $cb = TestCustomer->new(name => 'CB', plans => ['PB'], features => [['phone_support', '12h']], mg => $mg);
my $cc = TestCustomer->new(name => 'CC', plans => ['PC'], mg => $mg);
my $cd = TestCustomer->new(name => 'CD', features => [['storage', '200GB']], mg => $mg);
$mg->add_objects($pa, $pb, $pc);
ok($pa, 'Got PA');
ok($pb, 'Got PB');
ok($pc, 'Got PC');
ok($ca, 'Got CA');
ok($cb, 'Got CB');
ok($cc, 'Got CC');
ok($cd, 'Got CD');
t/lib/TestCustomer.pm view on Meta::CPAN
package TestCustomer;
use Moo;
use namespace::autoclean;
has 'name' => (
is => 'ro',
required => 1
);
has 'features' => (
t/lib/TestManager.pm view on Meta::CPAN
package TestManager;
use warnings;
use strict;
sub new { bless {}, shift }
sub add_objects {
my $self = shift;
foreach (@_) {
t/lib/TestPlan.pm view on Meta::CPAN
package TestPlan;
use Moo;
use namespace::autoclean;
has 'name' => (
is => 'ro',
required => 1
);
has 'features' => (
t/lib/TestRole.pm view on Meta::CPAN
package TestRole;
use Moo;
use namespace::autoclean;
has 'name' => (
is => 'ro',
required => 1
);
has 'actions' => (
t/lib/TestUser.pm view on Meta::CPAN
package TestUser;
use Moo;
use namespace::autoclean;
has 'name' => (
is => 'ro',
required => 1
);
has 'actions' => (
t/release-dist-manifest.t view on Meta::CPAN
#!perl
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
}
use Test::More;
eval "use Test::DistManifest";
plan skip_all => "Test::DistManifest required for testing the manifest"
if $@;
manifest_ok();
t/release-pod-coverage.t view on Meta::CPAN
#!perl
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
}
use Test::More;
eval "use Test::Pod::Coverage 1.08";
plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
if $@;
eval "use Pod::Coverage::TrustPod";
plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
if $@;
all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
t/release-pod-syntax.t view on Meta::CPAN
#!perl
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
}
use Test::More;
eval "use Test::Pod 1.41";
plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
all_pod_files_ok();
view all matches for this distributionview release on metacpan - search on metacpan