[Bps-public-commit] rtx-rest branch, dev, updated. fc394e3c48bc37bc8be65cbc82e7569941f8b787

Wallace Reis wreis at bestpractical.com
Fri Dec 19 13:06:53 EST 2014


The branch, dev has been updated
       via  fc394e3c48bc37bc8be65cbc82e7569941f8b787 (commit)
       via  844c02e106b77e0afe3e5623572fece38acf7df2 (commit)
       via  3f6ff9b1d0338c163de7f653c4942f299bf93b89 (commit)
       via  3972b6993d75a61e5ff8440cb01f107affe33e0f (commit)
      from  3aaa5eed1cf55454cadf87630503691f9222926a (commit)

Summary of changes:
 Makefile.PL                          |  4 ++++
 lib/RT/Extension/REST2.pm            |  4 ++--
 lib/RT/Extension/REST2/Dispatcher.pm |  8 ++++++++
 lib/RT/Extension/REST2/PodViewer.pm  | 19 +++++++++++++++++++
 4 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 lib/RT/Extension/REST2/PodViewer.pm

- Log -----------------------------------------------------------------
commit 3972b6993d75a61e5ff8440cb01f107affe33e0f
Author: Wallace Reis <wreis at bestpractical.com>
Date:   Fri Dec 19 10:15:33 2014 -0200

    Baseline for viewing docs

diff --git a/Makefile.PL b/Makefile.PL
index 4b11103..fcbab41 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -20,6 +20,8 @@ requires 'Web::Simple';
 requires 'Class::Method::Modifiers';
 requires 'Plack::Middleware::RequestHeaders';
 requires 'Plack::Middleware::ReverseProxyPath';
+requires 'Module::Path';
+requires 'Pod::POM';
 
 sign;
 WriteAll;
diff --git a/lib/RT/Extension/REST2/Dispatcher.pm b/lib/RT/Extension/REST2/Dispatcher.pm
index 5bbfd89..309ad07 100644
--- a/lib/RT/Extension/REST2/Dispatcher.pm
+++ b/lib/RT/Extension/REST2/Dispatcher.pm
@@ -4,9 +4,17 @@ use strict;
 use warnings;
 use Web::Simple;
 use Web::Machine;
+use RT::Extension::REST2::PodViewer 'podview_as_html';
 
 sub dispatch_request {
     my ($self) = @_;
+    sub (/) {
+        return [
+            200,
+            ['Content-Type' => 'text/html'],
+            [ podview_as_html('RT::Extension::REST2') ]
+        ];
+    },
     sub (/*/*) {
         my $resource_name = ucfirst lc $_[1];
         my $resource = "RT::Extension::REST2::Resource::${resource_name}";
diff --git a/lib/RT/Extension/REST2/PodViewer.pm b/lib/RT/Extension/REST2/PodViewer.pm
new file mode 100644
index 0000000..ab0dcb2
--- /dev/null
+++ b/lib/RT/Extension/REST2/PodViewer.pm
@@ -0,0 +1,19 @@
+package RT::Extension::REST2::PodViewer;
+
+use strict;
+use warnings;
+use Module::Path 'module_path';
+use Pod::POM;
+use Pod::POM::View::HTML;
+
+use Sub::Exporter -setup => {
+    exports => [qw(podview_as_html)]
+};
+
+sub podview_as_html {
+    my ($module_name) = @_;
+    my $pom = Pod::POM->new->parse( module_path($module_name) );
+    return $pom->present('Pod::POM::View::HTML');
+}
+
+1;

commit 3f6ff9b1d0338c163de7f653c4942f299bf93b89
Author: Wallace Reis <wreis at bestpractical.com>
Date:   Fri Dec 19 10:43:41 2014 -0200

    Recommends JSON::XS

diff --git a/Makefile.PL b/Makefile.PL
index fcbab41..9e8859a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -23,5 +23,7 @@ requires 'Plack::Middleware::ReverseProxyPath';
 requires 'Module::Path';
 requires 'Pod::POM';
 
+recommends 'JSON::XS';
+
 sign;
 WriteAll;

commit 844c02e106b77e0afe3e5623572fece38acf7df2
Author: Wallace Reis <wreis at bestpractical.com>
Date:   Fri Dec 19 10:53:29 2014 -0200

    Bump VERSION

diff --git a/lib/RT/Extension/REST2.pm b/lib/RT/Extension/REST2.pm
index 917d6f9..a953333 100644
--- a/lib/RT/Extension/REST2.pm
+++ b/lib/RT/Extension/REST2.pm
@@ -4,7 +4,7 @@ use 5.010;
 
 package RT::Extension::REST2;
 
-our $VERSION = '0.01';
+our $VERSION = '1.00';
 our $DEFAULT_REST_PATH = '/REST/2.0';
 
 use UNIVERSAL::require;

commit fc394e3c48bc37bc8be65cbc82e7569941f8b787
Author: Wallace Reis <wreis at bestpractical.com>
Date:   Fri Dec 19 10:56:56 2014 -0200

    Update Copyright

diff --git a/lib/RT/Extension/REST2.pm b/lib/RT/Extension/REST2.pm
index a953333..29b4990 100644
--- a/lib/RT/Extension/REST2.pm
+++ b/lib/RT/Extension/REST2.pm
@@ -259,7 +259,7 @@ L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-REST
 
 =head1 LICENSE AND COPYRIGHT
 
-This software is Copyright (c) 2013 by Best Practical Solutions
+(c) Copyright Best Practical Solutions, LLC.
 
 This is free software, licensed under:
 

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


More information about the Bps-public-commit mailing list