[Bps-public-commit] App-Changeloggr branch, master, updated. 263d75adb2d86c08f7b99d0e40882d9f1c26063e

sartak at bestpractical.com sartak at bestpractical.com
Wed May 20 13:52:50 EDT 2009


The branch, master has been updated
       via  263d75adb2d86c08f7b99d0e40882d9f1c26063e (commit)
       via  0039c4ec0f2b4b21888fc448ea52332c579d5887 (commit)
       via  0457396b7a63b74241209a382d8cc38b26691c6b (commit)
      from  6be6c92252fd22d217620aff3d3e95a0eaa621db (commit)

Summary of changes:
 lib/App/Changeloggr.pm                   |    9 +++++++++
 lib/App/Changeloggr/Dispatcher.pm        |   18 +++++++++++++++++-
 lib/App/Changeloggr/OutputFormat.pm      |    4 ----
 lib/App/Changeloggr/OutputFormat/Perl.pm |    2 +-
 4 files changed, 27 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 0457396b7a63b74241209a382d8cc38b26691c6b
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed May 20 13:44:46 2009 -0400

    Syntax error fix

diff --git a/lib/App/Changeloggr/OutputFormat/Perl.pm b/lib/App/Changeloggr/OutputFormat/Perl.pm
index 2bcb737..8720cef 100644
--- a/lib/App/Changeloggr/OutputFormat/Perl.pm
+++ b/lib/App/Changeloggr/OutputFormat/Perl.pm
@@ -29,7 +29,7 @@ EOT
         my @changes = map  { $_->[0] }
                       sort { $a->[1] <=> $b->[1] }
                       map  { [$_, $_->numeric_importance] }
-                      @{$args{categories}{$cat}}
+                      @{$args{categories}{$cat}};
 
         for my $change (@changes) {
             my($summary) = $change->message =~ /\A(.*)$/m;

commit 0039c4ec0f2b4b21888fc448ea52332c579d5887
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed May 20 13:44:54 2009 -0400

    App::Changeloggr->output_formats

diff --git a/lib/App/Changeloggr.pm b/lib/App/Changeloggr.pm
index f436699..feabb41 100644
--- a/lib/App/Changeloggr.pm
+++ b/lib/App/Changeloggr.pm
@@ -3,6 +3,7 @@ use strict;
 use warnings;
 
 use App::Changeloggr::InputFormat;
+use App::Changeloggr::OutputFormat;
 
 sub start {
     my $class = shift;
@@ -14,6 +15,14 @@ sub start {
         inner       => 0,
         sub_name    => 'log_formats',
     );
+
+    # Find all log format generators
+    Jifty::Module::Pluggable->import(
+        search_path => 'App::Changeloggr::OutputFormat',
+        require     => 1,
+        inner       => 0,
+        sub_name    => 'output_formats',
+    );
 }
 
 1;
diff --git a/lib/App/Changeloggr/OutputFormat.pm b/lib/App/Changeloggr/OutputFormat.pm
index 3806f3d..1aab36f 100644
--- a/lib/App/Changeloggr/OutputFormat.pm
+++ b/lib/App/Changeloggr/OutputFormat.pm
@@ -3,8 +3,4 @@ use warnings;
 
 package App::Changeloggr::OutputFormat;
 
-use Module::Pluggable (
-    sub_name => 'output_formats',
-);
-
 1;

commit 263d75adb2d86c08f7b99d0e40882d9f1c26063e
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed May 20 13:52:32 2009 -0400

    Add links for exporting changelogs

diff --git a/lib/App/Changeloggr/Dispatcher.pm b/lib/App/Changeloggr/Dispatcher.pm
index 4d1e06f..7ca69dc 100644
--- a/lib/App/Changeloggr/Dispatcher.pm
+++ b/lib/App/Changeloggr/Dispatcher.pm
@@ -18,7 +18,23 @@ on '/admin/created-changelog' => run {
 };
 
 on '/changelog/*' => run {
-    set name => $1;
+    my $name = $1;
+    set name => $name;
+
+    my $changelog = Jifty->web->navigation->child(
+        $name  => url => "/changelog/$name",
+        active => 1,
+    );
+
+    my @output_formats = map { s/.*:://; $_ } App::Changeloggr->output_formats;
+
+    for my $format_name (@output_formats) {
+        $changelog->child(
+            "Export as $format_name" =>
+            url => "/changelog/$name/$format_name/Changes",
+        );
+    }
+
     show '/changelog';
 };
 

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



More information about the Bps-public-commit mailing list