Hello community,

here is the log from the commit of package perl-Web-MREST for openSUSE:Factory 
checked in at 2016-10-20 23:10:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Web-MREST (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Web-MREST.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Web-MREST"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Web-MREST/perl-Web-MREST.changes    
2016-10-18 10:38:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Web-MREST.new/perl-Web-MREST.changes       
2016-10-20 23:10:44.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Sep 27 15:03:21 UTC 2016 - [email protected]
+
+- updated to 0.286
+   see /usr/share/doc/packages/perl-Web-MREST/Changes
+
+-------------------------------------------------------------------

Old:
----
  Web-MREST-0.285.tar.gz
  _service

New:
----
  Web-MREST-0.286.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Web-MREST.spec ++++++
--- /var/tmp/diff_new_pack.9cut8F/_old  2016-10-20 23:10:45.000000000 +0200
+++ /var/tmp/diff_new_pack.9cut8F/_new  2016-10-20 23:10:45.000000000 +0200
@@ -17,14 +17,14 @@
 
 
 Name:           perl-Web-MREST
-Version:        0.285
+Version:        0.286
 Release:        0
 %define cpan_name Web-MREST
 Summary:        Minimalistic REST server
 License:        BSD-3-Clause
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Web-MREST/
-Source0:        Web-MREST-0.285.tar.gz
+Source0:        Web-MREST-0.286.tar.gz
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
@@ -84,19 +84,19 @@
 
 %description
 MREST stands for "minimalistic" or "mechanical" REST server. (Mechanical
-because it relies on the Web::Machine manpage.)
+because it relies on Web::Machine.)
 
-the Web::MREST manpage provides a fully functional REST server that can be
-started with a simple command. Without modification, the server provides a
-set of generalized resources that can be used to demonstrate how the REST
-server works, or for testing.
-
-Developers can use the Web::MREST manpage as a platform for implementing
-their own REST servers, as described below. the App::Dochazka::REST manpage
-is a "real-world" example of such a server.
+Web::MREST provides a fully functional REST server that can be started with
+a simple command. Without modification, the server provides a set of
+generalized resources that can be used to demonstrate how the REST server
+works, or for testing.
+
+Developers can use Web::MREST as a platform for implementing their own REST
+servers, as described below. App::Dochazka::REST is a "real-world" example
+of such a server.
 
-For an introduction to REST and Web Services, see the
-Web::MREST::WebServicesIntro manpage.
+For an introduction to REST and Web Services, see
+Web::MREST::WebServicesIntro.
 
 %prep
 %setup -q -n %{cpan_name}-%{version}

++++++ Web-MREST-0.285.tar.gz -> Web-MREST-0.286.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Web-MREST-0.285/Changes new/Web-MREST-0.286/Changes
--- old/Web-MREST-0.285/Changes 2016-09-05 09:02:58.000000000 +0200
+++ new/Web-MREST-0.286/Changes 2016-09-27 17:03:10.000000000 +0200
@@ -506,3 +506,9 @@
 - Merge README files into single README.rst
 - Add helper files for release automation scripting
 
+0.286 2016-09-24 14:35 CEST
+- Drop deprecated local release scripts
+- cleanup: drop unused _get_sharedir() argument in bin/mrest
+- cleanup: fix copyright header in bin/mrest
+- Add get_session() function to Util.pm
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Web-MREST-0.285/META.json 
new/Web-MREST-0.286/META.json
--- old/Web-MREST-0.285/META.json       2016-09-05 09:02:58.000000000 +0200
+++ new/Web-MREST-0.286/META.json       2016-09-27 17:03:10.000000000 +0200
@@ -91,7 +91,7 @@
    "provides" : {
       "Web::MREST" : {
          "file" : "lib/Web/MREST.pm",
-         "version" : "0.285"
+         "version" : "0.286"
       },
       "Web::MREST::Dispatch" : {
          "file" : "lib/Web/MREST/Dispatch.pm"
@@ -130,6 +130,6 @@
          "http://opensource.org/licenses/bsd-license.php";
       ]
    },
-   "version" : "0.285",
+   "version" : "0.286",
    "x_serialization_backend" : "JSON::PP version 2.27203"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Web-MREST-0.285/META.yml new/Web-MREST-0.286/META.yml
--- old/Web-MREST-0.285/META.yml        2016-09-05 09:02:58.000000000 +0200
+++ new/Web-MREST-0.286/META.yml        2016-09-27 17:03:10.000000000 +0200
@@ -45,7 +45,7 @@
 provides:
   Web::MREST:
     file: lib/Web/MREST.pm
-    version: '0.285'
+    version: '0.286'
   Web::MREST::Dispatch:
     file: lib/Web/MREST/Dispatch.pm
   Web::MREST::Entity:
@@ -97,5 +97,5 @@
   perl: '5.012'
 resources:
   license: http://opensource.org/licenses/bsd-license.php
-version: '0.285'
+version: '0.286'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.012'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Web-MREST-0.285/bin/mrest 
new/Web-MREST-0.286/bin/mrest
--- old/Web-MREST-0.285/bin/mrest       2016-09-05 09:02:58.000000000 +0200
+++ new/Web-MREST-0.286/bin/mrest       2016-09-27 17:03:10.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # ************************************************************************* 
-# Copyright (c) 2014-2015-2015, SUSE LLC
+# Copyright (c) 2014-2016, SUSE LLC
 # 
 # All rights reserved.
 # 
@@ -78,6 +78,7 @@
 Run this script from the bash prompt to start the server. 
 
 
+
 =head1 PASSING OPTIONS TO PLACK
 
 This script starts the server by instantiates a L<Plack::Runner> object and
@@ -86,6 +87,8 @@
 parsing its own options. Options intended to be parsed by L<Plack::Runner>
 should be placed at the end of the command line, preceded by C<-->.
 
+
+
 =head1 DEBUGGING OPTIONS
 
 You can include an C<--early-debug> option on the command line, with
@@ -94,6 +97,7 @@
 log file (i.e. the one defined in the site parameters) is known.
 
 
+
 =head1 FUNCTIONS
 
 =cut
@@ -105,7 +109,7 @@
 }
 
 sub _get_sharedir {
-    my ( $distro, $module, $sitedir ) = @_;
+    my ( $distro, $module ) = @_;
 
     # for distro, we allow both formats My::Distro and My-Distro
     # distro might be just Foo, or Foo::Bar, or Foo-Bar
@@ -133,7 +137,7 @@
     if ( $status ) {
         die $status;
     }
-    return ( $app_distro, $app_module, $distro_sharedir, $sitedir );
+    return ( $app_distro, $app_module, $distro_sharedir );
 }
 
 sub _load_config_params {
@@ -234,7 +238,7 @@
             $log->$level( $message );
         };
 #        enable "StackTrace", force => 1;
-        enable "Session";
+        enable "Session", store => 'File';
         enable "Static", path => qr{/favicon}, root => $distro_sharedir;
         $app;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Web-MREST-0.285/lib/Web/MREST/Util.pm 
new/Web-MREST-0.286/lib/Web/MREST/Util.pm
--- old/Web-MREST-0.285/lib/Web/MREST/Util.pm   2016-09-05 09:02:58.000000000 
+0200
+++ new/Web-MREST-0.286/lib/Web/MREST/Util.pm   2016-09-27 17:03:10.000000000 
+0200
@@ -1,5 +1,5 @@
 # ************************************************************************* 
-# Copyright (c) 2014-2015-2015, SUSE LLC
+# Copyright (c) 2014-2016, SUSE LLC
 # 
 # All rights reserved.
 # 
@@ -39,6 +39,8 @@
 use App::CELL qw( $log );
 use File::Spec;
 use JSON;
+use Params::Validate qw( :all );
+use Plack::Session;
 use Pod::Simple::HTML;
 use Pod::Simple::Text;
 
@@ -70,6 +72,8 @@
 
 =item C<$JSON> (singleton)
 
+=item C<get_session> (function)
+
 =item C<pod_to_html> (function)
 
 =item C<pod_to_text> (function)
@@ -79,7 +83,12 @@
 =cut
 
 use Exporter qw( import );
-our @EXPORT_OK = qw( $JSON pod_to_html pod_to_text );
+our @EXPORT_OK = qw(
+    $JSON
+    get_session
+    pod_to_html
+    pod_to_text
+);
 
 
 
@@ -132,4 +141,31 @@
     return $text_str;
 }
 
+
+=head2 get_session
+
+Given a Plack environment (hashref), returns session object. If there is no
+session object in the environment, it creates one.
+
+Returns: nothing
+
+=cut
+
+sub get_session {
+    my ( $env ) = validate_pos( @_, { type => HASHREF } );
+    my $session;
+
+    if ( ${ $env->{'psgix.session'} } ) {
+        $session = $env->{'psgix.session'};
+        $log->info( "Plack environment already contains session " . 
$session->id );
+    } else {
+        $session = Plack::Session->new( $env );
+        $log->info( "Session missing in Plack environment; created new session 
" . $session->id );
+    }
+
+    die "Dying in Web::MREST::Util::get_session because Plack environment 
still doesn't have a psgix.session property" unless ${ $env->{'psgix.session'} 
};
+
+    return;
+}
+
 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Web-MREST-0.285/lib/Web/MREST.pm 
new/Web-MREST-0.286/lib/Web/MREST.pm
--- old/Web-MREST-0.285/lib/Web/MREST.pm        2016-09-05 09:02:58.000000000 
+0200
+++ new/Web-MREST-0.286/lib/Web/MREST.pm        2016-09-27 17:03:10.000000000 
+0200
@@ -57,11 +57,11 @@
 
 =head1 VERSION
 
-Version 0.285
+Version 0.286
 
 =cut
 
-our $VERSION = '0.285';
+our $VERSION = '0.286';
 
 
 =head2 Development status


Reply via email to