[Bps-public-commit] App-Changeloggr branch, master, updated. 197ecdf2b935bafb7c7b016c0b3024d0605c9f5b

sartak at bestpractical.com sartak at bestpractical.com
Mon Mar 30 14:34:02 EDT 2009


The branch, master has been updated
       via  197ecdf2b935bafb7c7b016c0b3024d0605c9f5b (commit)
       via  7b0e49e0b0f96f50f19ca830c5aeee70cb139e42 (commit)
      from  5b5337383e69b696797537d600a352afe5efe098 (commit)

Summary of changes:
 lib/App/Changeloggr/Action/AddChanges.pm      |    2 +-
 lib/App/Changeloggr/Model/ChangeCollection.pm |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 7b0e49e0b0f96f50f19ca830c5aeee70cb139e42
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 14:30:38 2009 -0400

    Need to include the _() to get localization :)

diff --git a/lib/App/Changeloggr/Action/AddChanges.pm b/lib/App/Changeloggr/Action/AddChanges.pm
index 792ac0b..d678e71 100644
--- a/lib/App/Changeloggr/Action/AddChanges.pm
+++ b/lib/App/Changeloggr/Action/AddChanges.pm
@@ -48,7 +48,7 @@ sub take_action {
     my $changes = $changelog->parse_and_add_changes($self->argument_value('changes'));
 
     if ($changes->count) {
-        $self->result->message("Added your [quant,_1,change]!", $changes->count);
+        $self->result->message(_("Added your [quant,_1,change]!", $changes->count));
     }
     else {
         $self->result->message("No changes to add.");
diff --git a/lib/App/Changeloggr/Model/ChangeCollection.pm b/lib/App/Changeloggr/Model/ChangeCollection.pm
index ba837e2..fc63030 100644
--- a/lib/App/Changeloggr/Model/ChangeCollection.pm
+++ b/lib/App/Changeloggr/Model/ChangeCollection.pm
@@ -14,7 +14,7 @@ sub create_from_text {
     my $text      = $args{text};
     my $changelog = $args{changelog};
 
-    while (length $text) {
+    while ($text =~ /\S/) {
         my ($fields, $newtext) = $self->extract_change_data_from_text($text);
         last if !defined($newtext);
 

commit 197ecdf2b935bafb7c7b016c0b3024d0605c9f5b
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 14:31:09 2009 -0400

    Include some of the text in the unknown format error

diff --git a/lib/App/Changeloggr/Model/ChangeCollection.pm b/lib/App/Changeloggr/Model/ChangeCollection.pm
index fc63030..70bc949 100644
--- a/lib/App/Changeloggr/Model/ChangeCollection.pm
+++ b/lib/App/Changeloggr/Model/ChangeCollection.pm
@@ -38,7 +38,7 @@ sub extract_change_data_from_text {
     $text =~ s/^\s+//;
 
     my $format = App::Changeloggr->identify_format($text);
-    die "I'm unable to handle the change text format."
+    die "I'm unable to handle the change text format: " . substr($text, 0, 30) . '...'
         if !defined($format);
 
     my $extract_method = "extract_change_data_from_$format";

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



More information about the Bps-public-commit mailing list