Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added ssh path and scp path for Sync Role

  • Loading branch information...
commit 1ca092acea5ba3d8e8a8754c640a8a8fd3ab31de 1 parent 76462d0
Pavel Zhytomirsky authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 lib/Gup/Role/Sync.pm
View
15 lib/Gup/Role/Sync.pm
@@ -6,16 +6,30 @@ package Gup::Role::Sync;
use English '-no_match_vars';
use Moo::Role;
use Sub::Quote;
+use MooX::Types::MooseLike::Base qw/Str/;
requires 'sync';
with 'Gup::Role::Plugin';
+has ssh_path => (
+ is => 'ro',
+ isa => Str,
+ default => quote_sub( q{'/usr/bin/ssh'} ),
+);
+
+has scp_path => (
+ is => 'ro',
+ isa => Str,
+ default => quote_sub( q{'/usr/bin/scp'} ),
+);
+
has host => (
is => 'ro',
isa => quote_sub( q{
$_[0] =~ /^(?:[A-Za-z0-9_-]|\.)+$/ or die "Improper host: '$_[0]'\n";
} ),
+ predicate => 'has_host',
);
# these two could be separated at some point to Gup::Role::SyncUser
@@ -35,4 +49,3 @@ sub _build_username { getpwuid $REAL_USER_ID }
1;
__END__
-
Please sign in to comment.
Something went wrong with that request. Please try again.