[Bps-public-commit] App-Changeloggr branch, master, updated. 864430c5327361b76f40ad696762f54a95e1cb43

sartak at bestpractical.com sartak at bestpractical.com
Mon Mar 30 15:05:42 EDT 2009


The branch, master has been updated
       via  864430c5327361b76f40ad696762f54a95e1cb43 (commit)
       via  f0ca55400fa978290c9beb206d2dd1b34168bb5f (commit)
       via  1a6bc3568588742abd14bd32ac88b29511d92eba (commit)
      from  36e5acd702a0b362819190815d2c354de7ac2cb7 (commit)

Summary of changes:
 .gitignore                             |    1 +
 lib/App/Changeloggr/Model/Changelog.pm |    9 ++++++++-
 lib/App/Changeloggr/View.pm            |   14 +++++++++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 1a6bc3568588742abd14bd32ac88b29511d92eba
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 14:46:42 2009 -0400

    Ignore vim .swp files

diff --git a/.gitignore b/.gitignore
index 54e4d9b..016dbd9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ Makefile
 Makefile.old
 blib
 pm_to_blib
+*.swp

commit f0ca55400fa978290c9beb206d2dd1b34168bb5f
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 15:03:56 2009 -0400

    Changelog->changes, use JXMH more

diff --git a/lib/App/Changeloggr/Model/Changelog.pm b/lib/App/Changeloggr/Model/Changelog.pm
index e14a2fb..70ddc41 100644
--- a/lib/App/Changeloggr/Model/Changelog.pm
+++ b/lib/App/Changeloggr/Model/Changelog.pm
@@ -3,6 +3,7 @@ use warnings;
 
 package App::Changeloggr::Model::Changelog;
 use Jifty::DBI::Schema;
+use JiftyX::ModelHelpers;
 
 use App::Changeloggr::Record schema {
     column name =>
@@ -43,7 +44,7 @@ sub parse_and_add_changes {
     my $self = shift;
     my $text = shift;
 
-    my $changes = App::Changeloggr::Model::ChangeCollection->new;
+    my $changes = M('ChangeCollection');
     $changes->create_from_text(
         text      => $text,
         changelog => $self,
@@ -52,5 +53,11 @@ sub parse_and_add_changes {
     return $changes;
 }
 
+sub changes {
+    my $self = shift;
+
+    return M('ChangeCollection', changelog => $self->id);
+}
+
 1;
 

commit 864430c5327361b76f40ad696762f54a95e1cb43
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 15:04:29 2009 -0400

    Start sketching out changes UI

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index 3f47736..97564a2 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -34,7 +34,8 @@ template '/create-changelog' => page {
 
 template '/changelog' => page {
     my $changelog = Changelog(name => get('name'));
-    h1 { $changelog->name }
+    h1 { $changelog->name };
+    show_changes_of($changelog);
 };
 
 template '/changelog/admin' => page {
@@ -82,5 +83,16 @@ sub changelog_summary {
     );
 }
 
+sub show_changes_of {
+    my $changelog = shift;
+    my $changes = $changelog->changes;
+
+    ol {
+        while (my $change = $changes->next) {
+            li { $change->message }
+        }
+    }
+}
+
 1;
 

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



More information about the Bps-public-commit mailing list