App-Git-Workflow

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

my $builder = Module::Build->new(
    module_name       => 'App-Git-Workflow',
    license           => 'perl',
    dist_author       => 'Ivan Wills <ivan.wills@gmail.com>',
    dist_version_from => 'lib/App/Git/Workflow.pm',
    dist_abstract     => 'Tools to help make git workflows easier',
    requires          => {
        'perl'                   => '5.010',
        'autodie'                => 0,
        'CHI::Memoize'           => 0,
        'DateTime::Format::HTTP' => 0,
        'Error'                  => 0,
        'File::chdir'            => 0,
        'File::Touch'            => '0.11',
        'Git'                    => 0,
        'List::MoreUtils'        => 0,
        'Path::Tiny'             => 0,
        'XML::Tiny'              => 0,
        'Time::Piece'            => 0,
        'YAML'                   => 0,
        'version'                => 0,

Changes  view on Meta::CPAN

        Trapping errors for badly formatted JSON (Ivan Wills)
        Fixing up saving and determining old information (Ivan Wills)
        Don't create a blank settings left code read from file (Ivan Wills)
        Fixing version number comparison (Ivan Wills)

1.1.1   2019-02-22
        Updating for release of version 1.1.1
        Updated date (Ivan Wills)
        Adding new file to manifest (Ivan Wills)
        Getting basic testing of branch-age (Ivan Wills)
        Added new dependency DateTime::Format::HTTP (Ivan Wills)
        Getting ready to write tests (Ivan Wills)
        Getting branch age working (Ivan Wills)
        Travis has stopped support for perl 5.8 (Ivan Wills)

1.1.0   2018-09-02
        Updating for release of version 1.1.0
        Updated arguments (and documentation) to match new default operation (Ivan Wills)
        Made --all not be the default mode and adding filtering out branches not in the specified mode (Ivan Wills)
        Updating the documentation (Ivan Wills)
        Added ability to truncate based on specific paths rather than --depths all paths (Ivan Wills)

META.json  view on Meta::CPAN

      },
      "runtime" : {
         "recommends" : {
            "JIRA::REST" : "0",
            "JSON" : "2.0",
            "Path::Tiny" : "0",
            "Term::Spinner" : "0"
         },
         "requires" : {
            "CHI::Memoize" : "0",
            "DateTime::Format::HTTP" : "0",
            "Error" : "0",
            "File::Touch" : "0.11",
            "File::chdir" : "0",
            "Git" : "0",
            "List::MoreUtils" : "0",
            "Path::Tiny" : "0",
            "Time::Piece" : "0",
            "XML::Tiny" : "0",
            "YAML" : "0",
            "autodie" : "0",

META.yml  view on Meta::CPAN

  Test::Git::Workflow::Command:
    file: lib/Test/Git/Workflow/Command.pm
    version: v1.1.20
recommends:
  JIRA::REST: '0'
  JSON: '2.0'
  Path::Tiny: '0'
  Term::Spinner: '0'
requires:
  CHI::Memoize: '0'
  DateTime::Format::HTTP: '0'
  Error: '0'
  File::Touch: '0.11'
  File::chdir: '0'
  Git: '0'
  List::MoreUtils: '0'
  Path::Tiny: '0'
  Time::Piece: '0'
  XML::Tiny: '0'
  YAML: '0'
  autodie: '0'

lib/App/Git/Workflow/Command/BranchAge.pm  view on Meta::CPAN

# $Revision$, $Source$, $Date$

use strict;
use warnings;
use version;
use English qw/ -no_match_vars /;
use List::MoreUtils qw/zip/;
use Term::ANSIColor qw/colored/;
use App::Git::Workflow;
use App::Git::Workflow::Command qw/get_options/;
use DateTime::Format::HTTP;
use Data::Dumper qw/Dumper/;

our $VERSION  = version->new(1.1.20);
our $workflow = App::Git::Workflow->new;
our ($name)   = $PROGRAM_NAME =~ m{^.*/(.*?)$}mxs;
our %option = (
    master => 'origin/master',
);

sub run {

lib/App/Git/Workflow/Command/BranchAge.pm  view on Meta::CPAN

            my $date = `git log -n 1 --format=format:%ai $branch->{short} -- $files`;
            chomp $date;

            if ($date) {
                $date = $branch->{authordate};
            }
        }

        my ($date, $tz) = $branch->{authordate} =~ /^(.*)\s+([+-]\d{4})$/;
        if ($date && $tz) {
            $branch->{age} = DateTime::Format::HTTP->parse_datetime($date, $tz)->iso8601;
        }
        else {
            $Data::Dumper::Sortkeys = 1;
            $Data::Dumper::Indent = 1;
            die Dumper $branch;
        }
        push @data, $branch;
    }

    my %max = map {$_ => length $_} @headings;

lib/App/Git/Workflow/Command/Touch.pm  view on Meta::CPAN

# Created on: 2014-03-11 20:58:59
# Create by:  Ivan Wills
# $Id$
# $Revision$, $HeadURL$, $Date$
# $Revision$, $Source$, $Date$

use strict;
use warnings;
use version;
use English qw/ -no_match_vars /;
use DateTime::Format::HTTP;
use File::Touch;
use Term::ANSIColor qw/colored/;
use Path::Tiny;

use App::Git::Workflow;
use App::Git::Workflow::Command qw/get_options/;

our $VERSION  = version->new(1.1.20);
our $workflow = App::Git::Workflow->new;
our ($name)   = $PROGRAM_NAME =~ m{^.*/(.*?)$}mxs;

lib/App/Git/Workflow/Command/Touch.pm  view on Meta::CPAN

        return $max_time;
    }

    my ($log) = $workflow->git->log( '-n1', '--format=format:%ai', $file );

    if ( !$log ) {
        return 0;
    }

    my ( $date, $tz ) = $log =~ /^(.*)\s+([+-]\d{4})$/;
    my $time = DateTime::Format::HTTP->parse_datetime( $date, $tz )->epoch;

    File::Touch->new( time => $time )->touch($file);

    return $time;
}

1;

__DATA__



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