App-Standby

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "mro" : "0",
            "namespace::autoclean" : "0",
            "perl" : "5.010_000",
            "strict" : "0",
            "warnings" : "0"
         }
      },
      "test" : {
         "requires" : {
            "File::Temp" : "0",
            "HTTP::Request::Common" : "0",
            "Plack::Test" : "0",
            "Test::MockObject::Universal" : "0",
            "Test::More" : "0"
         }
      }
   },
   "release_status" : "stable",
   "version" : "0.04",
   "x_authority" : "cpan:TEX"
}

META.yml  view on Meta::CPAN

---
abstract: 'Managing on-call rotation and notification queues'
author:
  - 'Dominik Schulz <dominik.schulz@gauner.org>'
build_requires:
  File::Temp: 0
  HTTP::Request::Common: 0
  Plack::Test: 0
  Test::MockObject::Universal: 0
  Test::More: 0
configure_requires:
  ExtUtils::MakeMaker: 6.30
  File::ShareDir::Install: 0.06
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.132661'
license: perl
meta-spec:

Makefile.PL  view on Meta::CPAN

    "URI::Escape" => 0,
    "feature" => 0,
    "lib" => 0,
    "mro" => 0,
    "namespace::autoclean" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "File::Temp" => 0,
    "HTTP::Request::Common" => 0,
    "Plack::Test" => 0,
    "Test::MockObject::Universal" => 0,
    "Test::More" => 0
  },
  "VERSION" => "0.04",
  "test" => {
    "TESTS" => "t/*.t"
  }
);


my %FallbackPrereqs = (
  "Config::Yak" => 0,
  "Config::Yak::RequiredConfig" => 0,
  "DBD::SQLite" => 0,
  "DBI" => 0,
  "Data::Pwgen" => 0,
  "File::ShareDir" => 0,
  "File::Temp" => 0,
  "HTTP::Request::Common" => 0,
  "JSON" => 0,
  "LWP::UserAgent" => 0,
  "List::Util" => 0,
  "Log::Tree" => 0,
  "Log::Tree::RequiredLogger" => 0,
  "Module::Pluggable" => 0,
  "Moose" => 0,
  "MooseX::App::Cmd" => 0,
  "MooseX::App::Cmd::Command" => 0,
  "Pingdom::Client" => 0,

lib/App/Standby/Service/HTTP.pm  view on Meta::CPAN

}

sub _update {
    my $self = shift;
    my $user_ref = shift;

    my $count = 0;

    foreach my $endpoint (@{$self->endpoints()}) {
        $self->logger()->log( message => "Updating endpoint: ".$endpoint, level => 'debug', );
        my $req = HTTP::Request::->new( POST => $endpoint );
        $req->content_type('application/x-www-form-urlencoded');
        my $payload = $self->_build_payload($user_ref);
        $req->content($payload);
        $self->logger()->log( message => "Payload: ".$payload, level => 'debug', );

        if($self->username() && $self->password()) {
            $req->authorization_basic( $self->username(), $self->password() );
        }

        my $content;

t/frontend.t  view on Meta::CPAN

#!perl -T

use strict;
use warnings;
use Test::More;
use File::Temp;
use Config::Yak;
use Test::MockObject::Universal;
use Plack::Test;
use HTTP::Request::Common;

use App::Standby::Cmd;
use App::Standby::Frontend;
use App::Standby::Cmd::Command::bootstrap;

my $tempdir = File::Temp::tempdir( CLEANUP => 1);
my $Config  = Config::Yak::->new({ locations => [$tempdir]});
my $MOU  = Test::MockObject::Universal->new();

$Config->set('App::Standby::DBFile',$tempdir.'/db.sqlite3');



( run in 0.518 second using v1.01-cache-2.11-cpan-de7293f3b23 )