[Bps-public-commit] SD branch, master, updated. fd7aeed7984c928f06d1c9e6ab386bf347f03779

jesse jesse at bestpractical.com
Mon Aug 10 08:23:35 EDT 2009


The branch, master has been updated
       via  fd7aeed7984c928f06d1c9e6ab386bf347f03779 (commit)
       via  0cd4e635edc0a5b42412ad4cfdfcd8f5d4696fdc (commit)
       via  8af979ee6f9df5c449bec83a1a2bc1856c33b418 (commit)
      from  d12ea619736ba858799831af439c741a04c1134a (commit)

Summary of changes:
 bin/sd                               |    2 +-
 lib/App/SD/CLI/Command/Help/Intro.pm |    5 ++---
 lib/App/SD/CLI/Dispatcher.pm         |   19 +++++++++++++++++++
 t/sd-trac/basic.t                    |    1 +
 4 files changed, 23 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 8af979ee6f9df5c449bec83a1a2bc1856c33b418
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Aug 10 13:20:15 2009 +0100

    Fix Trac tests for the refactoring of prophet to remive Test::Script::Run

diff --git a/t/sd-trac/basic.t b/t/sd-trac/basic.t
index bc4f1d8..7fa0aac 100644
--- a/t/sd-trac/basic.t
+++ b/t/sd-trac/basic.t
@@ -3,6 +3,7 @@ use strict;
 
 use Prophet::Test;
 use App::SD::Test;
+use Test::Script::Run qw/:all/;
 
 BEGIN {
     require File::Temp;

commit 0cd4e635edc0a5b42412ad4cfdfcd8f5d4696fdc
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Aug 10 13:20:38 2009 +0100

    Remove code that assumes an implicit ~/.sd replica path

diff --git a/bin/sd b/bin/sd
index 679c19d..eb91a27 100755
--- a/bin/sd
+++ b/bin/sd
@@ -6,7 +6,7 @@ BEGIN { $ENV{'CLASS_MOP_NO_XS'} = 1 if ($^V == 5.0010); }
 
 use App::SD::CLI;
 
-$ENV{'PROPHET_REPO'} ||= $ENV{'SD_REPO'} || $ENV{'HOME'}.'/.sd';
+$ENV{'PROPHET_REPO'} ||= $ENV{'SD_REPO'};
 
 # Moose likes generating very noisy backtraces. Most users don't need to see
 # anything more than the root cause of the failure. Developers and the curious
diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index 3306313..c11ab46 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -63,6 +63,25 @@ on help => run_command('Help');
 
 on qr'.*' => sub {
     my $self = shift;
+
+    unless ( $self->cli->app_handle->local_replica_url ) {
+
+        print join "\n",
+            "",
+            "It appears that you haven't specified a local replica path.",
+            "You can do so by setting the SD_REPO environment variable.",
+            "",
+            " 'sd help intro' will tell you a bit about how to get started with sd.",
+            " 'sd help' will show show you a list of help topics.",
+            "", "";
+
+        exit 1;
+    }
+	next_rule;
+};
+
+on qr'.*' => sub {
+    my $self = shift;
     my $command = $_;
     next_rule if $command =~ /^(?:shell|clone|init)$/;
     next_rule if $self->cli->app_handle->handle->replica_exists;

commit fd7aeed7984c928f06d1c9e6ab386bf347f03779
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Aug 10 13:23:20 2009 +0100

    remove doc for now-removed ~/.sd path

diff --git a/lib/App/SD/CLI/Command/Help/Intro.pm b/lib/App/SD/CLI/Command/Help/Intro.pm
index a5c74df..5c4d9ae 100644
--- a/lib/App/SD/CLI/Command/Help/Intro.pm
+++ b/lib/App/SD/CLI/Command/Help/Intro.pm
@@ -16,9 +16,8 @@ To get started with SD, you need a ticket database. To get an ticket
 database, you have two options: You can clone an existing database
 or start a new one.
 
-SD will store its local database replica in the ".sd" directory in your 
-home directory. You can override this behaviour by setting the SD_REPO
-environment variable.
+SD will store its local database replica in the path specified by the
+C<SD_REPO> environment variable.
 
 To clone a ticket database:
 

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



More information about the Bps-public-commit mailing list