Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/astj/p5-plack-middleware-revisionplate
Plack::Middleware that serves endpoint returns application's REVISION. Perl port of https://github.com/sorah/revision_plate
https://github.com/astj/p5-plack-middleware-revisionplate
perl plack
Last synced: about 1 month ago
JSON representation
Plack::Middleware that serves endpoint returns application's REVISION. Perl port of https://github.com/sorah/revision_plate
- Host: GitHub
- URL: https://github.com/astj/p5-plack-middleware-revisionplate
- Owner: astj
- License: other
- Created: 2015-05-13T01:35:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-25T03:26:17.000Z (about 9 years ago)
- Last Synced: 2024-10-08T22:46:38.280Z (about 1 month ago)
- Topics: perl, plack
- Language: Perl
- Homepage:
- Size: 168 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/astj/p5-Plack-Middleware-RevisionPlate.svg?branch=master)](https://travis-ci.org/astj/p5-Plack-Middleware-RevisionPlate)
# NAMEPlack::Middleware::RevisionPlate - Serves an endpoint returns application's `REVISION`.
# SYNOPSIS
use Plack::Builder;
use Plack::Middleware::RevisionPlate;builder {
# Default revision_filename is ./REVISION.
enable 'Plack::Middleware::RevisionPlate',
path => '/site/sha1';# Otherwise you can specify revision_filename.
enable 'Plack::Middleware::RevisionPlate',
path => '/site/sha1/somemodule', revision_filename => './modules/hoge/REVISION';sub {
my $env = shift;
return [ 200, [], ['Hello! Plack'] ];
};
};# DESCRIPTION
Plack::Middleware::RevisionPlate returns content of file `REVISION` (or the file specified by `revision_filename` option) on GET/HEAD request to path specified `path` option.
Content of endpoint doesn't change even if `REVISION` file changed, but returns 404 if `REVISION` file removed.# LICENSE
MIT License
# AUTHOR
Asato Wakisaka
This module is a perl port of ruby gem [RevisionPlate](https://github.com/sorah/revision_plate) by sorah.