App-SD

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


requires 'Prophet'; # URI Params::Validate Class::Accessor Template::Declare::Tags Test::HTTP::Server::Simple JSON Test::WWW::Mechanize Any::Moose

requires('DateTime');
requires('Time::Progress');
# versions < 4.1 are buggy handling utf8
requires('HTML::TreeBuilder' => '4.1');
requires('DateTime::Format::Natural');
requires('HTML::Tree');
requires('URI::file');
requires('Try::Tiny' => '0.02');

build_requires('Test::Script::Run' => '0.02');

feature 'RT sync' => (
    -default => 0,
    'RT::Client::REST' => 0, # RT::Client::REST::Ticket
);

recommends 'RT::Client::REST';

lib/App/SD/CLI/Command/Publish.pm  view on Meta::CPAN

package App::SD::CLI::Command::Publish;
use Any::Moose;
extends 'Prophet::CLI::Command::Publish';
use Prophet::Util;
use File::Path;
use File::Spec;
use HTML::TreeBuilder;
use URI::file;
use Try::Tiny;

sub export_html {
    my $self = shift;
    my $path = $self->arg('path');

    # if they specify both html and replica, then stick rendered templates
    # into a subdirectory. if they specify only html, assume they really
    # want to publish directly into the specified directory
    if ( $self->has_arg('replica') ) {
        $path = File::Spec->catdir( $path => 'html' );

lib/App/SD/ForeignReplica.pm  view on Meta::CPAN

package App::SD::ForeignReplica;
use Any::Moose;
use Params::Validate qw/:all/;

use Try::Tiny;
use URI;

extends 'Prophet::ForeignReplica';


has uuid => (
    lazy    => 1,
    isa     => 'Str',
    is      => 'ro',
    default => sub {

lib/App/SD/Replica/gcode.pm  view on Meta::CPAN

 package App::SD::Replica::gcode;
use Any::Moose;
extends qw/App::SD::ForeignReplica/;

use Params::Validate qw(:all);
use File::Temp 'tempdir';
use Memoize;
use Try::Tiny;

use constant scheme => 'gcode';
use constant pull_encoder => 'App::SD::Replica::gcode::PullEncoder';
use constant push_encoder => 'App::SD::Replica::gcode::PushEncoder';
use Prophet::ChangeSet;

our %PROP_MAP = (
    summary    => 'summary',
    status     => 'status',
    owner      => 'owner',

lib/App/SD/Replica/gcode/PushEncoder.pm  view on Meta::CPAN

package App::SD::Replica::gcode::PushEncoder;
use Any::Moose;
use Params::Validate;
use Net::Google::Code::Issue;
use Net::Google::Code;
use Try::Tiny;

has sync_source => (
    isa => 'App::SD::Replica::gcode',
    is  => 'rw',
);

sub integrate_change {
    my $self = shift;
    my ( $change, $changeset ) = validate_pos(
        @_,

lib/App/SD/Replica/hm.pm  view on Meta::CPAN

package App::SD::Replica::hm;
use Any::Moose;
extends 'App::SD::ForeignReplica';
use Params::Validate qw(:all);
use Memoize;
use Prophet::ChangeSet;
use File::Temp 'tempdir';
use Carp;
use Try::Tiny;

has hm               => ( isa => 'Net::Jifty', is => 'rw' );
has remote_url       => ( isa => 'Str',        is => 'rw' );
has foreign_username => ( isa => 'Str',        is => 'rw' );
has props            => ( isa => 'HashRef',    is => 'rw' );

use constant scheme       => 'hm';
use constant pull_encoder => 'App::SD::Replica::hm::PullEncoder';
use constant push_encoder => 'App::SD::Replica::hm::PushEncoder';

lib/App/SD/Replica/rt.pm  view on Meta::CPAN

package App::SD::Replica::rt;
use Any::Moose;
extends qw/App::SD::ForeignReplica/;

use Params::Validate qw(:all);
use File::Temp 'tempdir';
use Memoize;
use Try::Tiny;

use constant scheme => 'rt';
use constant pull_encoder => 'App::SD::Replica::rt::PullEncoder';
use constant push_encoder => 'App::SD::Replica::rt::PushEncoder';


use Prophet::ChangeSet;

has rt               => ( isa => 'RT::Client::REST', is => 'rw');
has remote_url       => ( isa => 'Str', is              => 'rw');

lib/App/SD/Replica/trac.pm  view on Meta::CPAN

package App::SD::Replica::trac;
use Any::Moose;
extends qw/App::SD::ForeignReplica/;

use Params::Validate qw(:all);
use File::Temp 'tempdir';
use Memoize;
use Try::Tiny;

use constant scheme => 'trac';
use constant pull_encoder => 'App::SD::Replica::trac::PullEncoder';
use constant push_encoder => 'App::SD::Replica::trac::PushEncoder';

has trac             => ( isa => 'Net::Trac::Connection', is => 'rw');
has remote_url       => ( isa => 'Str', is                   => 'rw');
has query            => ( isa => 'Maybe[Str]', is            => 'rw');
has foreign_username => ( isa => 'Str', is                   => 'rw' );



( run in 0.618 second using v1.01-cache-2.11-cpan-05444aca049 )