--- /dev/null
+Revision history for App-BCVI-AutoInstall
+
+0.1 2010-08-07
+ - first version, based on App::BCVI::InstallManager
+
--- /dev/null
+Changes
+lib/App/BCVI/AutoInstall.pm
+Makefile.PL
+MANIFEST
+README
+t/00-load.t
+t/pod.t
+META.yml Module meta-data (added by MakeMaker)
--- /dev/null
+--- #YAML:1.0
+name: App-BCVI-AutoInstall
+version: 0.1
+abstract: Automatically install bcvi on new servers.
+license: ~
+author:
+ - Andrew Ruthven <andrew@etc.gen.nz>
+generated_by: ExtUtils::MakeMaker version 6.42
+distribution_type: module
+requires:
+ Test::More: 0
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
--- /dev/null
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'App::BCVI::AutoInstall',
+ AUTHOR => 'Andrew Ruthven <andrew@etc.gen.nz>',
+ VERSION_FROM => 'lib/App/BCVI/AutoInstall.pm',
+ ABSTRACT_FROM => 'lib/App/BCVI/AutoInstall.pm',
+ PL_FILES => {},
+ PREREQ_PM => {
+ 'Test::More' => 0,
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'App-BCVI-AutoInstall-*' },
+);
--- /dev/null
+NAME
+ App::BCVI::AutoInstall - Automatically install bcvi on a new host
+
+DESCRIPTION
+ This module is a plugin for "bcvi" (see: App::BCVI). If you are
+ connecting to a server for the first time it will install the required
+ files for you.
+
+ It requires App::BCVI::InstallManager for tracking which servers you've
+ already installed the bcvi files on.
+
+SUPPORT
+ You can look for information at:
+
+ * RT: CPAN's request tracker
+
+ <http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-BCVI-AutoInstall>
+
+ * AnnoCPAN: Annotated CPAN documentation
+
+ <http://annocpan.org/dist/App-BCVI-AutoInstall>
+
+ * CPAN Ratings
+
+ <http://cpanratings.perl.org/d/App-BCVI-AutoInstall>
+
+ * Search CPAN
+
+ <http://search.cpan.org/dist/App-BCVI-AutoInstall>
+
+COPYRIGHT & LICENSE
+ Copyright 2010 Andrew Ruthven <andrew@etc.gen.nz>
+
+ This program is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
--- /dev/null
+package App::BCVI::AutoInstall;
+
+use warnings;
+use strict;
+
+use App::BCVI::InstallManager;
+
+our $VERSION = '0.1';
+
+sub wrap_ssh {
+ my ($self, @args_in) = @_;
+
+ my $sig = $self->get_install_signature($host);
+ if (! defined $sig) {
+ $self->install_to_host($host);
+ }
+ $self->SUPER::wrap_ssh(@args_in);
+}
+
+App::BCVI->hook_client_class();
+
+1;
+
+__END__
+
+=head1 NAME
+
+App::BCVI::AutoInstall - Automatically install bcvi on a new host
+
+
+=head1 DESCRIPTION
+
+This module is a plugin for C<bcvi> (see: L<App::BCVI>). If you are connecting
+to a server for the first time it will install the required files for you.
+
+It requires App::BCVI::InstallManager for tracking which servers you've already
+installed the bcvi files on.
+
+=head1 SUPPORT
+
+You can look for information at:
+
+=over 4
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-BCVI-AutoInstall>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/App-BCVI-AutoInstall>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/App-BCVI-AutoInstall>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/App-BCVI-AutoInstall>
+
+=back
+
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2010 Andrew Ruthven E<lt>andrew@etc.gen.nzE<gt>
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
--- /dev/null
+#!perl
+
+use File::Spec qw();
+use Test::More tests => 1;
+
+my $bin_file = find_bcvi();
+
+if(not $bin_file) {
+ diag 'App::BCVI does not appear to be installed';
+ ok(1);
+ exit(0);
+}
+
+eval { require $bin_file };
+if($@) {
+ diag qq{Your bcvi installation ($bin_file) appears to be old/broken: "$@"};
+ ok(1);
+ exit(0);
+}
+
+use_ok('App::BCVI::AutoInstall');
+
+exit;
+
+
+
+sub find_bcvi {
+ foreach my $dir (File::Spec->path) {
+ my $path = File::Spec->catfile($dir, 'bcvi');
+ return $path if -x $path;
+ }
+ return;
+}
+
--- /dev/null
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod
+my $min_tp = 1.22;
+eval "use Test::Pod $min_tp";
+plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
+
+all_pod_files_ok();