[libdancer-plugin-rest-perl] 05/05: Build results of 8321c38 (on master)
Jonas Smedegaard
dr at jones.dk
Wed Jul 2 11:45:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v0.11
in repository libdancer-plugin-rest-perl.
commit ff6c9fc93c2450e4d6e6a2968c754733e01c1dcd
Merge: 8321c38 d78de76
Author: Yanick Champoux <yanick at babyl.dyndns.org>
Date: Tue Mar 25 08:06:25 2014 -0400
Build results of 8321c38 (on master)
.gitignore | 9 -
.mailmap | 2 -
.perlcriticrc | 57 -------
.perltidyrc | 34 ----
Build.PL | 68 ++++++++
CONTRIBUTORS | 11 ++
Changes | 17 +-
INSTALL | 44 +++++
LICENSE | 379 +++++++++++++++++++++++++++++++++++++++++++
MANIFEST.SKIP | 11 --
META.json | 81 +++++++++
META.yml | 44 +++++
README | 114 ++++++++++++-
README.mkdn | 125 ++++++++++++++
SIGNATURE | 0
dist.ini | 14 --
lib/Dancer/Plugin/REST.pm | 45 ++++-
t/00-compile.t | 50 ++++++
t/000-report-versions-tiny.t | 82 ++++++++++
xt/release/unused-vars.t | 8 +
20 files changed, 1048 insertions(+), 147 deletions(-)
diff --cc Build.PL
index 0000000,1c514b9..ccbe97b
mode 000000,100644..100644
--- a/Build.PL
+++ b/Build.PL
@@@ -1,0 -1,68 +1,68 @@@
+
+ # This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.013.
+ use strict;
+ use warnings;
+
+ use Module::Build 0.3601;
+
+
+ my %module_build_args = (
+ "build_requires" => {
+ "Module::Build" => "0.3601"
+ },
+ "configure_requires" => {
+ "Module::Build" => "0.3601"
+ },
+ "dist_abstract" => "A plugin for writing RESTful apps with Dancer",
+ "dist_author" => [
+ "Alexis Sukrieh <sukria\@sukria.net>",
+ "Franck Cuny <franckc\@cpan.org>"
+ ],
+ "dist_name" => "Dancer-Plugin-REST",
- "dist_version" => "0.10",
++ "dist_version" => "0.11",
+ "license" => "perl",
+ "module_name" => "Dancer::Plugin::REST",
+ "recommends" => {},
+ "recursive_test_files" => 1,
+ "requires" => {
+ "Carp" => 0,
+ "Dancer" => "1.3111",
+ "Dancer::Plugin" => 0,
+ "strict" => 0,
+ "warnings" => 0
+ },
+ "script_files" => [],
+ "test_requires" => {
+ "Dancer::ModuleLoader" => 0,
+ "Dancer::Test" => 0,
+ "File::Spec" => 0,
+ "HTTP::Headers" => 0,
+ "IO::Handle" => 0,
+ "IPC::Open3" => 0,
+ "Test::More" => "0.88",
+ "perl" => "5.006"
+ }
+ );
+
+
+ my %fallback_build_requires = (
+ "Dancer::ModuleLoader" => 0,
+ "Dancer::Test" => 0,
+ "File::Spec" => 0,
+ "HTTP::Headers" => 0,
+ "IO::Handle" => 0,
+ "IPC::Open3" => 0,
+ "Module::Build" => "0.3601",
+ "Test::More" => "0.88",
+ "perl" => "5.006"
+ );
+
+
+ unless ( eval { Module::Build->VERSION(0.4004) } ) {
+ delete $module_build_args{test_requires};
+ $module_build_args{build_requires} = \%fallback_build_requires;
+ }
+
+ my $build = Module::Build->new(%module_build_args);
+
+ $build->create_build_script;
diff --cc CONTRIBUTORS
index 0000000,4a880d2..418a985
mode 000000,100644..100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@@ -1,0 -1,10 +1,11 @@@
+
+ # DANCER-PLUGIN-REST CONTRIBUTORS #
+
+ This is the (likely incomplete) list of people who have helped
+ make this distribution what it is, either via code contributions,
+ patches, bug reports, help with troubleshooting, etc. A huge
+ thank to all of them.
+
++ * Breno G. de Oliveira <garu at cpan.org>
+ * James Aitken <loonypandora at gmail.com>
+ * Yanick Champoux <yanick at babyl.dyndns.org>
diff --cc Changes
index ba86d7c,8b4a56a..2b08f33
--- a/Changes
+++ b/Changes
@@@ -1,20 -1,5 +1,13 @@@
- Revision history for {{$DIST}}
-
- {{$NEXT}}
- [API CHANGES]
+ Revision history for
++0.11 2014-03-25
+ [BUG FIXES]
- - Routes with ':id.:format' were not created properly.
- (GH#3, reported by garu)
-
- [DOCUMENTATION]
-
- [ENHANCEMENTS]
-
- [NEW FEATURES]
++ - Routes with ':id.:format' were not created properly. (GH#3, reported by
++ garu)
+
+ [STATISTICS]
++ - code churn: 4 files changed, 68 insertions(+), 3 deletions(-)
+
0.10 2014-03-22
[BUG FIXES]
- Requires Dancer v1.3111 or better. (GH#2, reported by OverlordQ)
diff --cc META.json
index 0000000,7d3d311..ad9eecf
mode 000000,100644..100644
--- a/META.json
+++ b/META.json
@@@ -1,0 -1,80 +1,81 @@@
+ {
+ "abstract" : "A plugin for writing RESTful apps with Dancer",
+ "author" : [
+ "Alexis Sukrieh <sukria at sukria.net>",
+ "Franck Cuny <franckc at cpan.org>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.140640",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Dancer-Plugin-REST",
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "Module::Build" : "0.3601"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "Module::Build" : "0.3601"
+ }
+ },
+ "develop" : {
+ "requires" : {
+ "version" : "0.9901"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Carp" : "0",
+ "Dancer" : "1.3111",
+ "Dancer::Plugin" : "0",
+ "strict" : "0",
+ "warnings" : "0"
+ }
+ },
+ "test" : {
+ "requires" : {
+ "Dancer::ModuleLoader" : "0",
+ "Dancer::Test" : "0",
+ "File::Spec" : "0",
+ "HTTP::Headers" : "0",
+ "IO::Handle" : "0",
+ "IPC::Open3" : "0",
+ "Test::More" : "0.88",
+ "perl" : "5.006"
+ }
+ }
+ },
+ "provides" : {
+ "Dancer::Plugin::REST" : {
+ "file" : "lib/Dancer/Plugin/REST.pm",
- "version" : "0.10"
++ "version" : "0.11"
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "https://github.com/perldancer/Dancer-Plugin-REST/issues"
+ },
+ "homepage" : "http://search.cpan.org/dist/Dancer-Plugin-REST/",
+ "repository" : {
+ "type" : "git",
+ "url" : "https://github.com/perldancer/Dancer-Plugin-REST.git",
+ "web" : "https://github.com/perldancer/Dancer-Plugin-REST"
+ }
+ },
- "version" : "0.10",
++ "version" : "0.11",
+ "x_authority" : "cpan:SUKRIA",
+ "x_contributors" : [
++ "Breno G. de Oliveira <garu at cpan.org>",
+ "James Aitken <loonypandora at gmail.com>",
+ "Yanick Champoux <yanick at babyl.dyndns.org>"
+ ]
+ }
+
diff --cc META.yml
index 0000000,4e0b62b..f48894d
mode 000000,100644..100644
--- a/META.yml
+++ b/META.yml
@@@ -1,0 -1,43 +1,44 @@@
+ ---
+ abstract: 'A plugin for writing RESTful apps with Dancer'
+ author:
+ - 'Alexis Sukrieh <sukria at sukria.net>'
+ - 'Franck Cuny <franckc at cpan.org>'
+ build_requires:
+ Dancer::ModuleLoader: '0'
+ Dancer::Test: '0'
+ File::Spec: '0'
+ HTTP::Headers: '0'
+ IO::Handle: '0'
+ IPC::Open3: '0'
+ Module::Build: '0.3601'
+ Test::More: '0.88'
+ perl: '5.006'
+ configure_requires:
+ Module::Build: '0.3601'
+ dynamic_config: 0
+ generated_by: 'Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.140640'
+ license: perl
+ meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+ name: Dancer-Plugin-REST
+ provides:
+ Dancer::Plugin::REST:
+ file: lib/Dancer/Plugin/REST.pm
- version: '0.10'
++ version: '0.11'
+ requires:
+ Carp: '0'
+ Dancer: '1.3111'
+ Dancer::Plugin: '0'
+ strict: '0'
+ warnings: '0'
+ resources:
+ bugtracker: https://github.com/perldancer/Dancer-Plugin-REST/issues
+ homepage: http://search.cpan.org/dist/Dancer-Plugin-REST/
+ repository: https://github.com/perldancer/Dancer-Plugin-REST.git
-version: '0.10'
++version: '0.11'
+ x_authority: cpan:SUKRIA
+ x_contributors:
++ - 'Breno G. de Oliveira <garu at cpan.org>'
+ - 'James Aitken <loonypandora at gmail.com>'
+ - 'Yanick Champoux <yanick at babyl.dyndns.org>'
diff --cc README
index e1c8f7b,e07cf36..3f88887
--- a/README
+++ b/README
@@@ -1,5 -1,113 +1,113 @@@
- Dancer::Plugin::REST
+ NAME
+ Dancer::Plugin::REST - A plugin for writing RESTful apps with Dancer
- A Dancer plugin to transform your Dancer app in a RESTful
- webservice.
+ VERSION
- version 0.10
++ version 0.11
+
+ DESCRIPTION
+ This plugin helps you write a RESTful webservice with Dancer.
+
+ SYNOPSYS
+ package MyWebService;
+
+ use Dancer;
+ use Dancer::Plugin::REST;
+
+ prepare_serializer_for_format;
+
+ get '/user/:id.:format' => sub {
+ User->find(params->{id});
+ };
+
+ # curl http://mywebservice/user/42.json
+ { "id": 42, "name": "John Foo", email: "john.foo at example.com"}
+
+ # curl http://mywebservice/user/42.yml
+ --
+ id: 42
+ name: "John Foo"
+ email: "john.foo at example.com"
+
+ KEYWORDS
+ prepare_serializer_for_format
+ When this pragma is used, a before filter is set by the plugin to
+ automatically change the serializer when a format is detected in the
+ URI.
+
+ That means that each route you define with a :format token will trigger
+ a serializer definition, if the format is known.
+
+ This lets you define all the REST actions you like as regular Dancer
+ route handlers, without explicitly handling the outgoing data format.
+
+ resource
+ This keyword lets you declare a resource your application will handle.
+
+ resource user =>
+ get => sub { # return user where id = params->{id} },
+ create => sub { # create a new user with params->{user} },
+ delete => sub { # delete user where id = params->{id} },
+ update => sub { # update user with params->{user} };
+
+ # this defines the following routes:
+ # GET /user/:id
+ # GET /user/:id.:format
+ # POST /user
+ # POST /user.:format
+ # DELETE /user/:id
+ # DELETE /user/:id.:format
+ # PUT /user/:id
+ # PUT /user/:id.:format
+
+ helpers
+ Some helpers are available. This helper will set an appropriate HTTP
+ status for you.
+
+ status_ok
+ status_ok({users => {...}});
+
+ Set the HTTP status to 200
+
+ status_created
+ status_created({users => {...}});
+
+ Set the HTTP status to 201
+
+ status_accepted
+ status_accepted({users => {...}});
+
+ Set the HTTP status to 202
+
+ status_bad_request
+ status_bad_request("user foo can't be found");
+
+ Set the HTTP status to 400. This function as for argument a scalar that
+ will be used under the key error.
+
+ status_not_found
+ status_not_found("users doesn't exists");
+
+ Set the HTTP status to 404. This function as for argument a scalar that
+ will be used under the key error.
+
+ LICENCE
+ This module is released under the same terms as Perl itself.
+
+ AUTHORS
+ This module has been written by Alexis Sukrieh "<sukria at sukria.net>" and
+ Franck Cuny.
+
+ SEE ALSO
+ Dancer <http://en.wikipedia.org/wiki/Representational_State_Transfer>
+
+ AUTHORS
+ * Alexis Sukrieh <sukria at sukria.net>
+
+ * Franck Cuny <franckc at cpan.org>
+
+ COPYRIGHT AND LICENSE
+ This software is copyright (c) 2010 by Alexis Sukrieh.
+
+ This is free software; you can redistribute it and/or modify it under
+ the same terms as the Perl 5 programming language system itself.
diff --cc README.mkdn
index 0000000,2e1cc52..6b7dc4d
mode 000000,100644..100644
--- a/README.mkdn
+++ b/README.mkdn
@@@ -1,0 -1,125 +1,125 @@@
+ # NAME
+
+ Dancer::Plugin::REST - A plugin for writing RESTful apps with Dancer
+
+ # VERSION
+
-version 0.10
++version 0.11
+
+ # DESCRIPTION
+
+ This plugin helps you write a RESTful webservice with Dancer.
+
+ # SYNOPSYS
+
+ package MyWebService;
+
+ use Dancer;
+ use Dancer::Plugin::REST;
+
+ prepare_serializer_for_format;
+
+ get '/user/:id.:format' => sub {
+ User->find(params->{id});
+ };
+
+ # curl http://mywebservice/user/42.json
+ { "id": 42, "name": "John Foo", email: "john.foo at example.com"}
+
+ # curl http://mywebservice/user/42.yml
+ --
+ id: 42
+ name: "John Foo"
+ email: "john.foo at example.com"
+
+ # KEYWORDS
+
+ ## prepare\_serializer\_for\_format
+
+ When this pragma is used, a before filter is set by the plugin to automatically
+ change the serializer when a format is detected in the URI.
+
+ That means that each route you define with a __:format__ token will trigger a
+ serializer definition, if the format is known.
+
+ This lets you define all the REST actions you like as regular Dancer route
+ handlers, without explicitly handling the outgoing data format.
+
+ ## resource
+
+ This keyword lets you declare a resource your application will handle.
+
+ resource user =>
+ get => sub { # return user where id = params->{id} },
+ create => sub { # create a new user with params->{user} },
+ delete => sub { # delete user where id = params->{id} },
+ update => sub { # update user with params->{user} };
+
+ # this defines the following routes:
+ # GET /user/:id
+ # GET /user/:id.:format
+ # POST /user
+ # POST /user.:format
+ # DELETE /user/:id
+ # DELETE /user/:id.:format
+ # PUT /user/:id
+ # PUT /user/:id.:format
+
+ ## helpers
+
+ Some helpers are available. This helper will set an appropriate HTTP status for you.
+
+ ### status\_ok
+
+ status_ok({users => {...}});
+
+ Set the HTTP status to 200
+
+ ### status\_created
+
+ status_created({users => {...}});
+
+ Set the HTTP status to 201
+
+ ### status\_accepted
+
+ status_accepted({users => {...}});
+
+ Set the HTTP status to 202
+
+ ### status\_bad\_request
+
+ status_bad_request("user foo can't be found");
+
+ Set the HTTP status to 400. This function as for argument a scalar that will be used under the key __error__.
+
+ ### status\_not\_found
+
+ status_not_found("users doesn't exists");
+
+ Set the HTTP status to 404. This function as for argument a scalar that will be used under the key __error__.
+
+ # LICENCE
+
+ This module is released under the same terms as Perl itself.
+
+ # AUTHORS
+
+ This module has been written by Alexis Sukrieh `<sukria at sukria.net>` and Franck
+ Cuny.
+
+ # SEE ALSO
+
+ [Dancer](https://metacpan.org/pod/Dancer) [http://en.wikipedia.org/wiki/Representational\_State\_Transfer](http://en.wikipedia.org/wiki/Representational_State_Transfer)
+
+ # AUTHORS
+
+ - Alexis Sukrieh <sukria at sukria.net>
+ - Franck Cuny <franckc at cpan.org>
+
+ # COPYRIGHT AND LICENSE
+
+ This software is copyright (c) 2010 by Alexis Sukrieh.
+
+ This is free software; you can redistribute it and/or modify it under
+ the same terms as the Perl 5 programming language system itself.
diff --cc lib/Dancer/Plugin/REST.pm
index 17dc899,4d07878..cb12190
--- a/lib/Dancer/Plugin/REST.pm
+++ b/lib/Dancer/Plugin/REST.pm
@@@ -1,6 -1,9 +1,9 @@@
package Dancer::Plugin::REST;
+ BEGIN {
+ $Dancer::Plugin::REST::AUTHORITY = 'cpan:SUKRIA';
+ }
# ABSTRACT: A plugin for writing RESTful apps with Dancer
-
-$Dancer::Plugin::REST::VERSION = '0.10';
++$Dancer::Plugin::REST::VERSION = '0.11';
use strict;
use warnings;
@@@ -182,6 -185,20 +186,20 @@@ __END_
=pod
+ =encoding UTF-8
+
+ =head1 NAME
+
+ Dancer::Plugin::REST - A plugin for writing RESTful apps with Dancer
+
+ =head1 VERSION
+
-version 0.10
++version 0.11
+
+ =head1 DESCRIPTION
+
+ This plugin helps you write a RESTful webservice with Dancer.
+
=head1 SYNOPSYS
package MyWebService;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdancer-plugin-rest-perl.git
More information about the Pkg-perl-cvs-commits
mailing list