[Bps-public-commit] App-Todo branch, master, updated. 64777db5c622a09b4ecd5fb5f2fea766faf957bb

Alex M Vandiver alexmv at bestpractical.com
Wed Dec 30 14:26:49 EST 2009


The branch, master has been updated
       via  64777db5c622a09b4ecd5fb5f2fea766faf957bb (commit)
       via  7db473799f1167e290d134b43a5e9eedb5814163 (commit)
       via  7b3491763ec80e085ea8c68785a4ed3aeccf78db (commit)
      from  6091a1d82fe41b412e560f29cd7161d26c815dfa (commit)

Summary of changes:
 .gitignore      |    4 ++++
 SIGNATURE       |   40 ++++++++++++++++++++++++++++++++++++++++
 bin/todo.pl     |   12 ++++++++++--
 lib/App/Todo.pm |    2 +-
 4 files changed, 55 insertions(+), 3 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 SIGNATURE

- Log -----------------------------------------------------------------
commit 7b3491763ec80e085ea8c68785a4ed3aeccf78db
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 30 14:22:34 2009 -0500

    Re-authenticate and retry if the session-id is expired

diff --git a/bin/todo.pl b/bin/todo.pl
index 365fbba..2ed9b7c 100755
--- a/bin/todo.pl
+++ b/bin/todo.pl
@@ -34,6 +34,8 @@ our $default_query = "not/complete/starts/before/tomorrow/accepted/but_first/not
 our $unaccepted_query = "unaccepted/not/complete";
 our $requests_query = "requestor/me/not/owner/me/not/complete";
 our %args;
+our $command;
+our %commands;
 
 # Setup our user agent string (useful for feedback)
 $ua->agent("todo.pl/$VERSION ($Config{osname} $Config{osvers}; perl v$Config{version}, $Config{archname}) ");
@@ -112,7 +114,7 @@ sub main {
 
     do_login() or die("Bad username/password -- edit $CONFFILE and try again.");
 
-    my %commands = (
+    %commands = (
         list      => \&list_tasks,
         ls        => \&list_tasks,
         add       => \&add_task,
@@ -139,7 +141,7 @@ sub main {
         feedback  => \&feedback,
        );
     
-    my $command = shift @ARGV || "list";
+    $command = shift @ARGV || "list";
     $commands{$command} or pod2usage(-message => "Unknown command: $command", -exitval => 2);
 
     $commands{$command}->();
@@ -622,6 +624,12 @@ sub result_ok {
 
     if(!$result->{failure}) {
         print ref($message) ? $message->() . "\n" : "$message\n";
+    } elsif ($result->{message} =~ /^Access Denied/) {
+        warn("Session expired, attempting to re-authenticate\n");
+        delete $config{sid};
+        save_config();
+        do_login() or die("Bad username/password -- edit $CONFFILE and try again.");
+        $commands{$command}->();
     } else {
         my $death = YAML::Dump($result);
         $death .= "\n$error\n" if defined $error;
diff --git a/lib/App/Todo.pm b/lib/App/Todo.pm
index 20a9ab6..dfb980f 100644
--- a/lib/App/Todo.pm
+++ b/lib/App/Todo.pm
@@ -1,6 +1,6 @@
 package App::Todo;
 
-our $VERSION = 0.96;
+our $VERSION = 0.97;
 
 =head1 NAME
 

commit 7db473799f1167e290d134b43a5e9eedb5814163
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 30 14:25:43 2009 -0500

    Add a simple .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ffabd7e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+Makefile
+blib
+pm_to_blib
+MANIFEST.bak

commit 64777db5c622a09b4ecd5fb5f2fea766faf957bb
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 30 14:26:10 2009 -0500

    Sign 0.97

diff --git a/SIGNATURE b/SIGNATURE
new file mode 100644
index 0000000..34bdccf
--- /dev/null
+++ b/SIGNATURE
@@ -0,0 +1,40 @@
+This file contains message digests of all files listed in MANIFEST,
+signed via the Module::Signature module, version 0.55.
+
+To verify the content in this distribution, first make sure you have
+Module::Signature installed, then type:
+
+    % cpansign -v
+
+It will check each file's integrity, as well as the signature's
+validity.  If "==> Signature verified OK! <==" is not displayed,
+the distribution may already have been compromised, and you should
+not run its Makefile.PL or Build.PL.
+
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+SHA1 5c1abee774cb51d0e8d2e7e6f608237196185c23 MANIFEST
+SHA1 67203d9d9495e627ebbc05380ba677770affbeae META.yml
+SHA1 e77ce049acc242a80e3a1d0401289bfcbc464bee Makefile.PL
+SHA1 d837f9bb05ea22156c95b06505905c599405ad3a bin/todo.pl
+SHA1 603bb9de29fb8cba7f13409c546750972eff645d inc/Module/AutoInstall.pm
+SHA1 8b836389e4bc170eb8d19b7296b2f4978ac36136 inc/Module/Install.pm
+SHA1 182a0df45b65151afdc2be0b7246a2d02d0f0567 inc/Module/Install/AutoInstall.pm
+SHA1 85b32a1d5f215d99f411c3dd6113b537fcd5c57d inc/Module/Install/Base.pm
+SHA1 fde745e180861c7c0ba3ee5a767cafdbdb1d3ebd inc/Module/Install/Can.pm
+SHA1 e259400ceb54c34def9c994f52d7091108ce7ffc inc/Module/Install/Fetch.pm
+SHA1 ecd277fcac91f6901ad652d5d58b515d0412b306 inc/Module/Install/Include.pm
+SHA1 da42b522e5a7ffbae0ceec900f3635ad9990c565 inc/Module/Install/Makefile.pm
+SHA1 ba005818ee9f97146bfa4e14e53c684e9e446902 inc/Module/Install/Metadata.pm
+SHA1 73ee3646edc50965fe695bddb936ed3f5070fe78 inc/Module/Install/Scripts.pm
+SHA1 85e6b1cf5b7ca81bfb469a99389fa947d4b8a08e inc/Module/Install/Win32.pm
+SHA1 d32dff9f0d2f02023ca6d79a48d62fd855916351 inc/Module/Install/WriteAll.pm
+SHA1 b424c056746d48965ad670cdbdfdada1028a1426 lib/App/Todo.pm
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.14 (GNU/Linux)
+
+iEYEARECAAYFAks7qRoACgkQMflWJZZAbqC4CQCfUBqzQQKrJtqneDyJWvxZEUtC
+w9cAn3gK4OKemgmXippN86+UuwFsAOkc
+=PJAU
+-----END PGP SIGNATURE-----

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



More information about the Bps-public-commit mailing list