-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Henning Thorsen
committed
Sep 5, 2013
1 parent
aa42104
commit e31364d
Showing
6 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Revision history for App-mojopaste | ||
|
||
0.01 | ||
* Add bin/mojopaste | ||
* Add documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
^mypp.yml | ||
.git | ||
\.old | ||
\.swp | ||
~$ | ||
^blib/ | ||
^Makefile$ | ||
^MANIFEST.* | ||
^App-mojopaste |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use ExtUtils::MakeMaker; | ||
WriteMakefile( | ||
NAME => 'App-mojopaste', | ||
ABSTRACT_FROM => 'lib/App/mojopaste.pm', | ||
VERSION_FROM => 'lib/App/mojopaste.pm', | ||
AUTHOR => 'Jan Henning Thorsen <jhthorsen@cpan.org>', | ||
LICENSE => 'perl', | ||
PREREQ_PM => { | ||
'Mojolicios' => '4.30', | ||
}, | ||
BUILD_REQUIRES => { | ||
'Test::More' => '0.90', | ||
}, | ||
META_MERGE => { | ||
resources => { | ||
license => 'http://dev.perl.org/licenses/', | ||
homepage => 'http://p.thorsen.pm', | ||
bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-mojopaste', | ||
repository => 'git://github.com/jhthorsen/app-mojopaste', | ||
}, | ||
}, | ||
test => { | ||
TESTS => 't/*.t', | ||
}, | ||
EXE_FILES => ['bin/mojobin'], | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
NAME | ||
App::mojopaste - Placeholder for mojopaste | ||
|
||
VERSION | ||
0.01 | ||
|
||
DESCRIPTION | ||
This module does nothing. | ||
|
||
SYNOPSIS | ||
$ MOJO_CONFIG=/path/to/mojopaste.conf hypnotoad $(which mojopaste) | ||
$ PASTE_DIR=/path/to/paste/dir mojopaste daemon --listen http://*:8080 | ||
$ morbo $(which mojopast) --listen http://*:8080 | ||
|
||
Example mojopaste.conf | ||
{ | ||
paste_dir => '/path/to/paste/dir', | ||
hypnotoad => { | ||
listen => ['http://*:8080'], | ||
}, | ||
} | ||
|
||
AUTHOR | ||
Jan Henning Thorsen - "jhthorsen@cpan.org" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/App/mojopaste.pm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use Test::More; | ||
use File::Find; | ||
|
||
if(($ENV{HARNESS_PERL_SWITCHES} || '') =~ /Devel::Cover/) { | ||
plan skip_all => 'HARNESS_PERL_SWITCHES =~ /Devel::Cover/'; | ||
} | ||
if(!eval 'use Test::Pod; 1') { | ||
*Test::Pod::pod_file_ok = sub { SKIP: { skip "pod_file_ok(@_) (Test::Pod is required)", 1 } }; | ||
} | ||
if(!eval 'use Test::Pod::Coverage; 1') { | ||
*Test::Pod::Coverage::pod_coverage_ok = sub { SKIP: { skip "pod_coverage_ok(@_) (Test::Pod::Coverage is required)", 1 } }; | ||
} | ||
|
||
find( | ||
{ | ||
wanted => sub { /\.pm$/ and push @files, $File::Find::name }, | ||
no_chdir => 1 | ||
}, | ||
-e 'blib' ? 'blib' : 'lib', | ||
); | ||
|
||
plan tests => @files * 3; | ||
|
||
for my $file (@files) { | ||
my $module = $file; $module =~ s,\.pm$,,; $module =~ s,.*/?lib/,,; $module =~ s,/,::,g; | ||
ok eval "use $module; 1", "use $module" or diag $@; | ||
Test::Pod::pod_file_ok($file); | ||
Test::Pod::Coverage::pod_coverage_ok($module); | ||
} |