[Bps-public-commit] App-Changeloggr branch, master, updated. 39a62f1cf62c4f60ed00e0295fc325d3d53fc3f1

sartak at bestpractical.com sartak at bestpractical.com
Mon Mar 30 14:39:26 EDT 2009


The branch, master has been updated
       via  39a62f1cf62c4f60ed00e0295fc325d3d53fc3f1 (commit)
      from  765d7e092334eef8b3f0589320d95df40af8db4b (commit)

Summary of changes:
 lib/App/Changeloggr.pm                        |   11 -----------
 lib/App/Changeloggr/Model/ChangeCollection.pm |   13 ++++++++++++-
 2 files changed, 12 insertions(+), 12 deletions(-)

- Log -----------------------------------------------------------------
commit 39a62f1cf62c4f60ed00e0295fc325d3d53fc3f1
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 14:39:12 2009 -0400

    Move identify_format from App::Changeloggr to ChangeCollection

diff --git a/lib/App/Changeloggr.pm b/lib/App/Changeloggr.pm
index 49d2fa3..58e22ba 100644
--- a/lib/App/Changeloggr.pm
+++ b/lib/App/Changeloggr.pm
@@ -2,16 +2,5 @@ package App::Changeloggr;
 use strict;
 use warnings;
 
-sub identify_format {
-    my $self = shift;
-    my $text = shift;
-
-    if ($text =~ /^commit \w+\r?\n/) {
-        return 'git';
-    }
-
-    return;
-}
-
 1;
 
diff --git a/lib/App/Changeloggr/Model/ChangeCollection.pm b/lib/App/Changeloggr/Model/ChangeCollection.pm
index 70bc949..452fc08 100644
--- a/lib/App/Changeloggr/Model/ChangeCollection.pm
+++ b/lib/App/Changeloggr/Model/ChangeCollection.pm
@@ -31,13 +31,24 @@ sub create_from_text {
     return $text;
 }
 
+sub identify_format {
+    my $self = shift;
+    my $text = shift;
+
+    if ($text =~ /^commit \w+\r?\n/) {
+        return 'git';
+    }
+
+    return;
+}
+
 sub extract_change_data_from_text {
     my $self = shift;
     my $text = shift;
 
     $text =~ s/^\s+//;
 
-    my $format = App::Changeloggr->identify_format($text);
+    my $format = $self->identify_format($text);
     die "I'm unable to handle the change text format: " . substr($text, 0, 30) . '...'
         if !defined($format);
 

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



More information about the Bps-public-commit mailing list