[Bps-public-commit] SD branch, master, updated. 0.73-51-g92f4f8e

jesse jesse at bestpractical.com
Fri Mar 12 03:11:47 EST 2010


The branch, master has been updated
       via  92f4f8ea49f2367e1dd3948d2d62874f888ae790 (commit)
       via  dd0107f736fc025bdc86ee1627ee51cb6e92a6cd (commit)
       via  d0b3d1ca5f88d3231b7fc395bccf7d9eeac7bd54 (commit)
       via  14b4daf54754968fdd0d918b1a164e45f344bdb8 (commit)
      from  7aa24740e2aab14219b48e17b6f60cedd3db319b (commit)

Summary of changes:
 lib/App/SD/CLI/Dispatcher.pm     |    2 +-
 lib/App/SD/Replica/gcode.pm      |   14 +++++++++++---
 lib/App/SD/Replica/github.pm     |   10 +++++++++-
 lib/App/SD/Replica/hm.pm         |   12 ++++++++++--
 lib/App/SD/Replica/lighthouse.pm |   12 ++++++++++--
 lib/App/SD/Replica/redmine.pm    |   11 ++++++++++-
 lib/App/SD/Replica/trac.pm       |    8 +++++++-
 tools/shipwright-package         |    2 +-
 8 files changed, 59 insertions(+), 12 deletions(-)

- Log -----------------------------------------------------------------
commit 14b4daf54754968fdd0d918b1a164e45f344bdb8
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 9 15:12:54 2010 -0800

    sd help clone now shows "sd help sync"

diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index 9635a52..05465c8 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -32,7 +32,7 @@ on qr'^(?!help)' => sub {
 };
 
 under help => sub {
-    on [ [ 'intro', 'init', 'clone' ] ]   => run_command('Help::Intro');
+    on [ [ 'intro', 'init' ] ]   => run_command('Help::Intro');
     on about   => run_command('Help::About');
     on config  => run_command('Help::Config');
     on copying => run_command('Help::Copying');

commit d0b3d1ca5f88d3231b7fc395bccf7d9eeac7bd54
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 9 15:26:23 2010 -0800

    Better error messages when you don't have a replica class.

diff --git a/lib/App/SD/Replica/gcode.pm b/lib/App/SD/Replica/gcode.pm
index a9c24c5..d68e9ce 100644
--- a/lib/App/SD/Replica/gcode.pm
+++ b/lib/App/SD/Replica/gcode.pm
@@ -1,4 +1,4 @@
-package App::SD::Replica::gcode;
+ package App::SD::Replica::gcode;
 use Any::Moose;
 extends qw/App::SD::ForeignReplica/;
 
@@ -36,8 +36,16 @@ sub foreign_username { return shift->gcode->email(@_) }
 sub BUILD {
     my $self = shift;
     # Require rather than use to defer load
-    require Net::Google::Code;
-    require Net::Google::Code::Issue;
+    eval {
+        require Net::Google::Code;
+        require Net::Google::Code::Issue;
+    };
+
+    if ($@) {
+        die "SD requires Net::Google::Code to sync with Google Code.\n".
+        "'cpan Net::Google::Code' may sort this out for you.\n";
+    }
+
 
     $Net::Google::Code::Issue::USE_HYBRID = 1
       if $Net::Google::Code::VERSION ge '0.15';
diff --git a/lib/App/SD/Replica/github.pm b/lib/App/SD/Replica/github.pm
index 7a69e08..488786b 100644
--- a/lib/App/SD/Replica/github.pm
+++ b/lib/App/SD/Replica/github.pm
@@ -7,7 +7,6 @@ use Memoize;
 
 use URI;
 use Memoize;
-use Net::GitHub;
 use Config::GitLike::Git;
 use Prophet::ChangeSet;
 
@@ -26,6 +25,15 @@ our %PROP_MAP = ( state => 'status', title => 'summary' );
 sub BUILD {
     my $self = shift;
 
+    eval {
+        require Net::GitHub;
+    };
+
+    if ($@) {
+        die "SD requires Net::GitHub to sync with a GitHub server.\n".
+        "'cpan Net::GitHub' may sort this out for you";
+    }
+
     my ( $server, $owner, $repo ) =
       $self->{url} =~ m{^github:(http://.*?github.com/)?(.*?)/([^/]+)/?}
       or die
diff --git a/lib/App/SD/Replica/hm.pm b/lib/App/SD/Replica/hm.pm
index 0888932..178cc2d 100644
--- a/lib/App/SD/Replica/hm.pm
+++ b/lib/App/SD/Replica/hm.pm
@@ -1,4 +1,4 @@
-package App::SD::Replica::hm;
+cpackage App::SD::Replica::hm;
 use Any::Moose;
 extends 'App::SD::ForeignReplica';
 use Params::Validate qw(:all);
@@ -29,7 +29,15 @@ Open a connection to the source identified by C<$self->{url}>.
 
 sub BUILD {
     my $self = shift;
-    require Net::Jifty;
+    eval {
+        require Net::Jifty;
+    };
+
+    if ($@) {
+        die "SD requires Net::Jifty to sync with a Hiveminder server.\n".
+        "'cpan Net::Jifty' may sort this out for you";
+    }
+
     my ( $server, $props ) = $self->{url} =~ m/^hm:(.*?)(?:\|(.*))?$/
         or die
         "Can't parse Hiveminder server spec. Expected hm:http://hiveminder.com or hm:http://hiveminder.com|props";
diff --git a/lib/App/SD/Replica/lighthouse.pm b/lib/App/SD/Replica/lighthouse.pm
index 08f0f7c..c6345f2 100644
--- a/lib/App/SD/Replica/lighthouse.pm
+++ b/lib/App/SD/Replica/lighthouse.pm
@@ -7,8 +7,6 @@ use Memoize;
 
 use URI;
 use Memoize;
-use Net::Lighthouse::Project;
-use Net::Lighthouse::User;
 
 use Prophet::ChangeSet;
 
@@ -27,6 +25,16 @@ our %PROP_MAP = ( state => 'status', title => 'summary' );
 sub BUILD {
     my $self = shift;
 
+    eval {
+        require Net::Lighthouse::Project;
+        require Net::Lighthouse::User;
+    };
+    if ($@) {
+        die "SD requires Net::Lighthouse to sync with a Lighthouse server.\n".
+        "'cpan Net::Lighthouse' may sort this out for you";
+    }
+
+
     my ( $auth, $account, $project, $query ) =
       $self->{url} =~ m{^lighthouse:(?:(.*)@)?(.*?)/(.*?)(?:/(.*))?$}
       or die
diff --git a/lib/App/SD/Replica/redmine.pm b/lib/App/SD/Replica/redmine.pm
index f04eee1..8c23a92 100644
--- a/lib/App/SD/Replica/redmine.pm
+++ b/lib/App/SD/Replica/redmine.pm
@@ -14,11 +14,20 @@ has query => ( isa => 'Str', is => 'rw');
 has redmine => (isa => 'Net::Redmine', is => 'rw');
 
 use URI;
-use Net::Redmine;
 
 sub BUILD {
     my $self = shift;
 
+    eval {
+        require Net::Redmine;
+    };
+    if ($@) {
+        die "SD requires Net::Redmine to sync with a Redmine server.\n".
+        "'cpan Net::Redmine' may sort this out for you";
+    }
+
+
+
     my ( $server, $type, $query ) = $self->{url} =~ m/^redmine:(.*?)$/
         or die "Can't parse Redmine server spec. Expected something like redmine:http://example.com/projects/project_name\n";
 
diff --git a/lib/App/SD/Replica/trac.pm b/lib/App/SD/Replica/trac.pm
index 3f0c669..e2dd8c1 100644
--- a/lib/App/SD/Replica/trac.pm
+++ b/lib/App/SD/Replica/trac.pm
@@ -22,7 +22,13 @@ sub BUILD {
     my $self = shift;
 
     # Require rather than use to defer load
-    require Net::Trac;
+    eval {
+        require Net::Trac;
+    };
+    if ($@) {
+        die "SD requires Net::Trac to sync with a Trac server.\n".
+        "'cpan Net::Trac' may sort this out for you.\n";
+    }
 
     my ( $server, $type, $query ) = $self->{url} =~ m/^trac:(.*?)$/
         or die

commit dd0107f736fc025bdc86ee1627ee51cb6e92a6cd
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Fri Mar 12 08:43:42 2010 +0100

    don't require Test::Most

diff --git a/tools/shipwright-package b/tools/shipwright-package
index 1cd23a1..124c5cd 100644
--- a/tools/shipwright-package
+++ b/tools/shipwright-package
@@ -4,7 +4,7 @@ export REPO=${HOME}/shipwright-sd-${TODAY}.git/
 
 export GIT_PATH="git:file://$REPO"
 export MIN_PERL=5.008006
-export SKIP="--skip=Pod::Simple,Module::Signature,Test::Pod,Test::Pod::Coverage,Test::Distribution,Pod::Readme,Archive::Tar,HTML::Lint,Prophet,Encode,Date::Calc,Test::Cukes,Quantum::Superpositions,Test::Memory::Cycle,Text::Greeking,Test::HTTP::Server::Simple,Test::WWW::Mechanize,Module::Build,Test::Warn,Test::MockTime,Test::MockModule,Test::MockObject,Test::Warn,HTTP::Cookies,HTTP::Request::Common"
+export SKIP="--skip=Pod::Simple,Module::Signature,Test::Pod,Test::Most,Test::Pod::Coverage,Test::Distribution,Pod::Readme,Archive::Tar,HTML::Lint,Prophet,Encode,Date::Calc,Test::Cukes,Quantum::Superpositions,Test::Memory::Cycle,Text::Greeking,Test::HTTP::Server::Simple,Test::WWW::Mechanize,Module::Build,Test::Warn,Test::MockTime,Test::MockModule,Test::MockObject,Test::Warn,HTTP::Cookies,HTTP::Request::Common"
 export IMPORT="shipwright import --min-perl-version=$MIN_PERL $SKIP -r $GIT_PATH --log-file - --log-level debug"
 rm -rf $REPO
 

commit 92f4f8ea49f2367e1dd3948d2d62874f888ae790
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Fri Mar 12 08:46:13 2010 +0100

    don't need quantum::superpositions

diff --git a/tools/shipwright-package b/tools/shipwright-package
index 124c5cd..24027eb 100644
--- a/tools/shipwright-package
+++ b/tools/shipwright-package
@@ -4,7 +4,7 @@ export REPO=${HOME}/shipwright-sd-${TODAY}.git/
 
 export GIT_PATH="git:file://$REPO"
 export MIN_PERL=5.008006
-export SKIP="--skip=Pod::Simple,Module::Signature,Test::Pod,Test::Most,Test::Pod::Coverage,Test::Distribution,Pod::Readme,Archive::Tar,HTML::Lint,Prophet,Encode,Date::Calc,Test::Cukes,Quantum::Superpositions,Test::Memory::Cycle,Text::Greeking,Test::HTTP::Server::Simple,Test::WWW::Mechanize,Module::Build,Test::Warn,Test::MockTime,Test::MockModule,Test::MockObject,Test::Warn,HTTP::Cookies,HTTP::Request::Common"
+export SKIP="--skip=Pod::Simple,Module::Signature,Test::Pod,Test::Most,Quantum::SuperPositions,Test::Pod::Coverage,Test::Distribution,Pod::Readme,Archive::Tar,HTML::Lint,Prophet,Encode,Date::Calc,Test::Cukes,Quantum::Superpositions,Test::Memory::Cycle,Text::Greeking,Test::HTTP::Server::Simple,Test::WWW::Mechanize,Module::Build,Test::Warn,Test::MockTime,Test::MockModule,Test::MockObject,Test::Warn,HTTP::Cookies,HTTP::Request::Common"
 export IMPORT="shipwright import --min-perl-version=$MIN_PERL $SKIP -r $GIT_PATH --log-file - --log-level debug"
 rm -rf $REPO
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list