[Bps-public-commit] SD branch, master, updated. 0.70-26-g32a7054

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Sep 1 22:41:21 EDT 2009


The branch, master has been updated
       via  32a70545d98457086757575596a4025816600746 (commit)
      from  64a7d9703c5c65b18a8fc3d95996f3b11fac961d (commit)

Summary of changes:
 lib/App/SD/Replica/lighthouse.pm |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 32a70545d98457086757575596a4025816600746
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Sep 2 10:41:10 2009 +0800

    better password or token prompt for lighthouse

diff --git a/lib/App/SD/Replica/lighthouse.pm b/lib/App/SD/Replica/lighthouse.pm
index 56bf6d5..dc721a1 100644
--- a/lib/App/SD/Replica/lighthouse.pm
+++ b/lib/App/SD/Replica/lighthouse.pm
@@ -29,7 +29,7 @@ sub BUILD {
     my ( $auth, $account, $project ) =
       $self->{url} =~ m{^lighthouse:(?:(.*)@)?(.*?)/(.*)}
       or die
-        "Can't parse Github server spec. Expected
+        "Can't parse lighthouse server spec. Expected
         lighthouse:user:password\@account/project or\n"
         ."lighthouse:token\@account/project.";
     my $server = "http://$account.lighthouseapp.com";
@@ -46,11 +46,19 @@ sub BUILD {
 
     unless ( $token || $password ) {
         if ($email) {
-            ( undef, $password ) =
-              $self->prompt_for_login( $server, $email );
+            ( undef, $password ) = $self->prompt_for_login(
+                uri            => $server,
+                username       => $email,
+            );
         }
         else {
-            ($token) = $self->prompt_for_login($server);
+            ( undef, $token ) = $self->prompt_for_login(
+                uri           => $server,
+                username      => 'not important',
+                secret_prompt => sub {
+                    "token for $server: ";
+                }
+            );
         }
     }
 

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



More information about the Bps-public-commit mailing list